From 337ef5ce8226f0dda1eb088920de9602401751fc Mon Sep 17 00:00:00 2001 From: Danilo Pantani Date: Fri, 25 Oct 2024 05:13:42 -0300 Subject: [PATCH] update mocks --- network/.mockery.yml | 19 +- network/network/mocks/account_info.go | 17 +- network/network/mocks/bank_client.go | 550 +++++++++++++++++- network/network/mocks/chain.go | 336 ++++++++++- network/network/mocks/launch_client.go | 509 ++++++++++++++++- network/network/mocks/monitoringc_client.go | 413 ++++++++++++-- network/network/mocks/monitoringp_client.go | 225 +++++++- network/network/mocks/profile_client.go | 304 +++++++++- network/network/mocks/project_client.go | 427 +++++++++++++- network/network/mocks/reward_client.go | 140 ++++- network/network/mocks/staking_client.go | 591 +++++++++++++++++++- network/network/network.go | 3 +- network/network/testutil/mocks.go | 9 + 13 files changed, 3431 insertions(+), 112 deletions(-) diff --git a/network/.mockery.yml b/network/.mockery.yml index 62c5cd0a..0a2f5478 100644 --- a/network/.mockery.yml +++ b/network/.mockery.yml @@ -1,11 +1,10 @@ quiet: False -keeptree: True disable-version-string: True with-expecter: True all: False mockname: "{{.InterfaceName}}" filename: "{{.InterfaceNameSnake}}.go" -dir: "mocks" +dir: "network/mocks" outpkg: "mocks" log-level: debug recursive: True @@ -13,14 +12,16 @@ packages: github.com/ignite/apps/network/network: interfaces: Chain: - CosmosClient: + # CosmosClient: github.com/ignite/apps/network/network/testutil: interfaces: - AccountInfo: - BankClient: - IBCClient: - LaunchClient: - ProfileClient: ProjectClient: + ProfileClient: + LaunchClient: + BankClient: RewardClient: - StakingClient: \ No newline at end of file + StakingClient: + MonitoringcClient: + MonitoringpClient: + AccountInfo: +# IBCClient: diff --git a/network/network/mocks/account_info.go b/network/network/mocks/account_info.go index db7e16dd..a2f383b9 100644 --- a/network/network/mocks/account_info.go +++ b/network/network/mocks/account_info.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.27.1. DO NOT EDIT. +// Code generated by mockery. DO NOT EDIT. package mocks @@ -9,13 +9,20 @@ type AccountInfo struct { mock.Mock } -type mockConstructorTestingTNewAccountInfo interface { - mock.TestingT - Cleanup(func()) +type AccountInfo_Expecter struct { + mock *mock.Mock +} + +func (_m *AccountInfo) EXPECT() *AccountInfo_Expecter { + return &AccountInfo_Expecter{mock: &_m.Mock} } // NewAccountInfo creates a new instance of AccountInfo. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewAccountInfo(t mockConstructorTestingTNewAccountInfo) *AccountInfo { +// The first argument is typically a *testing.T value. +func NewAccountInfo(t interface { + mock.TestingT + Cleanup(func()) +}) *AccountInfo { mock := &AccountInfo{} mock.Mock.Test(t) diff --git a/network/network/mocks/bank_client.go b/network/network/mocks/bank_client.go index 8c52c6d3..8fff30eb 100644 --- a/network/network/mocks/bank_client.go +++ b/network/network/mocks/bank_client.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.27.1. DO NOT EDIT. +// Code generated by mockery. DO NOT EDIT. package mocks @@ -17,6 +17,14 @@ type BankClient struct { mock.Mock } +type BankClient_Expecter struct { + mock *mock.Mock +} + +func (_m *BankClient) EXPECT() *BankClient_Expecter { + return &BankClient_Expecter{mock: &_m.Mock} +} + // AllBalances provides a mock function with given fields: ctx, in, opts func (_m *BankClient) AllBalances(ctx context.Context, in *types.QueryAllBalancesRequest, opts ...grpc.CallOption) (*types.QueryAllBalancesResponse, error) { _va := make([]interface{}, len(opts)) @@ -28,6 +36,10 @@ func (_m *BankClient) AllBalances(ctx context.Context, in *types.QueryAllBalance _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for AllBalances") + } + var r0 *types.QueryAllBalancesResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *types.QueryAllBalancesRequest, ...grpc.CallOption) (*types.QueryAllBalancesResponse, error)); ok { @@ -50,6 +62,43 @@ func (_m *BankClient) AllBalances(ctx context.Context, in *types.QueryAllBalance return r0, r1 } +// BankClient_AllBalances_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AllBalances' +type BankClient_AllBalances_Call struct { + *mock.Call +} + +// AllBalances is a helper method to define mock.On call +// - ctx context.Context +// - in *types.QueryAllBalancesRequest +// - opts ...grpc.CallOption +func (_e *BankClient_Expecter) AllBalances(ctx interface{}, in interface{}, opts ...interface{}) *BankClient_AllBalances_Call { + return &BankClient_AllBalances_Call{Call: _e.mock.On("AllBalances", + append([]interface{}{ctx, in}, opts...)...)} +} + +func (_c *BankClient_AllBalances_Call) Run(run func(ctx context.Context, in *types.QueryAllBalancesRequest, opts ...grpc.CallOption)) *BankClient_AllBalances_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]grpc.CallOption, len(args)-2) + for i, a := range args[2:] { + if a != nil { + variadicArgs[i] = a.(grpc.CallOption) + } + } + run(args[0].(context.Context), args[1].(*types.QueryAllBalancesRequest), variadicArgs...) + }) + return _c +} + +func (_c *BankClient_AllBalances_Call) Return(_a0 *types.QueryAllBalancesResponse, _a1 error) *BankClient_AllBalances_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *BankClient_AllBalances_Call) RunAndReturn(run func(context.Context, *types.QueryAllBalancesRequest, ...grpc.CallOption) (*types.QueryAllBalancesResponse, error)) *BankClient_AllBalances_Call { + _c.Call.Return(run) + return _c +} + // Balance provides a mock function with given fields: ctx, in, opts func (_m *BankClient) Balance(ctx context.Context, in *types.QueryBalanceRequest, opts ...grpc.CallOption) (*types.QueryBalanceResponse, error) { _va := make([]interface{}, len(opts)) @@ -61,6 +110,10 @@ func (_m *BankClient) Balance(ctx context.Context, in *types.QueryBalanceRequest _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for Balance") + } + var r0 *types.QueryBalanceResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *types.QueryBalanceRequest, ...grpc.CallOption) (*types.QueryBalanceResponse, error)); ok { @@ -83,6 +136,43 @@ func (_m *BankClient) Balance(ctx context.Context, in *types.QueryBalanceRequest return r0, r1 } +// BankClient_Balance_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Balance' +type BankClient_Balance_Call struct { + *mock.Call +} + +// Balance is a helper method to define mock.On call +// - ctx context.Context +// - in *types.QueryBalanceRequest +// - opts ...grpc.CallOption +func (_e *BankClient_Expecter) Balance(ctx interface{}, in interface{}, opts ...interface{}) *BankClient_Balance_Call { + return &BankClient_Balance_Call{Call: _e.mock.On("Balance", + append([]interface{}{ctx, in}, opts...)...)} +} + +func (_c *BankClient_Balance_Call) Run(run func(ctx context.Context, in *types.QueryBalanceRequest, opts ...grpc.CallOption)) *BankClient_Balance_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]grpc.CallOption, len(args)-2) + for i, a := range args[2:] { + if a != nil { + variadicArgs[i] = a.(grpc.CallOption) + } + } + run(args[0].(context.Context), args[1].(*types.QueryBalanceRequest), variadicArgs...) + }) + return _c +} + +func (_c *BankClient_Balance_Call) Return(_a0 *types.QueryBalanceResponse, _a1 error) *BankClient_Balance_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *BankClient_Balance_Call) RunAndReturn(run func(context.Context, *types.QueryBalanceRequest, ...grpc.CallOption) (*types.QueryBalanceResponse, error)) *BankClient_Balance_Call { + _c.Call.Return(run) + return _c +} + // DenomMetadata provides a mock function with given fields: ctx, in, opts func (_m *BankClient) DenomMetadata(ctx context.Context, in *types.QueryDenomMetadataRequest, opts ...grpc.CallOption) (*types.QueryDenomMetadataResponse, error) { _va := make([]interface{}, len(opts)) @@ -94,6 +184,10 @@ func (_m *BankClient) DenomMetadata(ctx context.Context, in *types.QueryDenomMet _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for DenomMetadata") + } + var r0 *types.QueryDenomMetadataResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *types.QueryDenomMetadataRequest, ...grpc.CallOption) (*types.QueryDenomMetadataResponse, error)); ok { @@ -116,6 +210,43 @@ func (_m *BankClient) DenomMetadata(ctx context.Context, in *types.QueryDenomMet return r0, r1 } +// BankClient_DenomMetadata_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DenomMetadata' +type BankClient_DenomMetadata_Call struct { + *mock.Call +} + +// DenomMetadata is a helper method to define mock.On call +// - ctx context.Context +// - in *types.QueryDenomMetadataRequest +// - opts ...grpc.CallOption +func (_e *BankClient_Expecter) DenomMetadata(ctx interface{}, in interface{}, opts ...interface{}) *BankClient_DenomMetadata_Call { + return &BankClient_DenomMetadata_Call{Call: _e.mock.On("DenomMetadata", + append([]interface{}{ctx, in}, opts...)...)} +} + +func (_c *BankClient_DenomMetadata_Call) Run(run func(ctx context.Context, in *types.QueryDenomMetadataRequest, opts ...grpc.CallOption)) *BankClient_DenomMetadata_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]grpc.CallOption, len(args)-2) + for i, a := range args[2:] { + if a != nil { + variadicArgs[i] = a.(grpc.CallOption) + } + } + run(args[0].(context.Context), args[1].(*types.QueryDenomMetadataRequest), variadicArgs...) + }) + return _c +} + +func (_c *BankClient_DenomMetadata_Call) Return(_a0 *types.QueryDenomMetadataResponse, _a1 error) *BankClient_DenomMetadata_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *BankClient_DenomMetadata_Call) RunAndReturn(run func(context.Context, *types.QueryDenomMetadataRequest, ...grpc.CallOption) (*types.QueryDenomMetadataResponse, error)) *BankClient_DenomMetadata_Call { + _c.Call.Return(run) + return _c +} + // DenomMetadataByQueryString provides a mock function with given fields: ctx, in, opts func (_m *BankClient) DenomMetadataByQueryString(ctx context.Context, in *types.QueryDenomMetadataByQueryStringRequest, opts ...grpc.CallOption) (*types.QueryDenomMetadataByQueryStringResponse, error) { _va := make([]interface{}, len(opts)) @@ -127,6 +258,10 @@ func (_m *BankClient) DenomMetadataByQueryString(ctx context.Context, in *types. _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for DenomMetadataByQueryString") + } + var r0 *types.QueryDenomMetadataByQueryStringResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *types.QueryDenomMetadataByQueryStringRequest, ...grpc.CallOption) (*types.QueryDenomMetadataByQueryStringResponse, error)); ok { @@ -149,6 +284,43 @@ func (_m *BankClient) DenomMetadataByQueryString(ctx context.Context, in *types. return r0, r1 } +// BankClient_DenomMetadataByQueryString_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DenomMetadataByQueryString' +type BankClient_DenomMetadataByQueryString_Call struct { + *mock.Call +} + +// DenomMetadataByQueryString is a helper method to define mock.On call +// - ctx context.Context +// - in *types.QueryDenomMetadataByQueryStringRequest +// - opts ...grpc.CallOption +func (_e *BankClient_Expecter) DenomMetadataByQueryString(ctx interface{}, in interface{}, opts ...interface{}) *BankClient_DenomMetadataByQueryString_Call { + return &BankClient_DenomMetadataByQueryString_Call{Call: _e.mock.On("DenomMetadataByQueryString", + append([]interface{}{ctx, in}, opts...)...)} +} + +func (_c *BankClient_DenomMetadataByQueryString_Call) Run(run func(ctx context.Context, in *types.QueryDenomMetadataByQueryStringRequest, opts ...grpc.CallOption)) *BankClient_DenomMetadataByQueryString_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]grpc.CallOption, len(args)-2) + for i, a := range args[2:] { + if a != nil { + variadicArgs[i] = a.(grpc.CallOption) + } + } + run(args[0].(context.Context), args[1].(*types.QueryDenomMetadataByQueryStringRequest), variadicArgs...) + }) + return _c +} + +func (_c *BankClient_DenomMetadataByQueryString_Call) Return(_a0 *types.QueryDenomMetadataByQueryStringResponse, _a1 error) *BankClient_DenomMetadataByQueryString_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *BankClient_DenomMetadataByQueryString_Call) RunAndReturn(run func(context.Context, *types.QueryDenomMetadataByQueryStringRequest, ...grpc.CallOption) (*types.QueryDenomMetadataByQueryStringResponse, error)) *BankClient_DenomMetadataByQueryString_Call { + _c.Call.Return(run) + return _c +} + // DenomOwners provides a mock function with given fields: ctx, in, opts func (_m *BankClient) DenomOwners(ctx context.Context, in *types.QueryDenomOwnersRequest, opts ...grpc.CallOption) (*types.QueryDenomOwnersResponse, error) { _va := make([]interface{}, len(opts)) @@ -160,6 +332,10 @@ func (_m *BankClient) DenomOwners(ctx context.Context, in *types.QueryDenomOwner _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for DenomOwners") + } + var r0 *types.QueryDenomOwnersResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *types.QueryDenomOwnersRequest, ...grpc.CallOption) (*types.QueryDenomOwnersResponse, error)); ok { @@ -182,6 +358,43 @@ func (_m *BankClient) DenomOwners(ctx context.Context, in *types.QueryDenomOwner return r0, r1 } +// BankClient_DenomOwners_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DenomOwners' +type BankClient_DenomOwners_Call struct { + *mock.Call +} + +// DenomOwners is a helper method to define mock.On call +// - ctx context.Context +// - in *types.QueryDenomOwnersRequest +// - opts ...grpc.CallOption +func (_e *BankClient_Expecter) DenomOwners(ctx interface{}, in interface{}, opts ...interface{}) *BankClient_DenomOwners_Call { + return &BankClient_DenomOwners_Call{Call: _e.mock.On("DenomOwners", + append([]interface{}{ctx, in}, opts...)...)} +} + +func (_c *BankClient_DenomOwners_Call) Run(run func(ctx context.Context, in *types.QueryDenomOwnersRequest, opts ...grpc.CallOption)) *BankClient_DenomOwners_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]grpc.CallOption, len(args)-2) + for i, a := range args[2:] { + if a != nil { + variadicArgs[i] = a.(grpc.CallOption) + } + } + run(args[0].(context.Context), args[1].(*types.QueryDenomOwnersRequest), variadicArgs...) + }) + return _c +} + +func (_c *BankClient_DenomOwners_Call) Return(_a0 *types.QueryDenomOwnersResponse, _a1 error) *BankClient_DenomOwners_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *BankClient_DenomOwners_Call) RunAndReturn(run func(context.Context, *types.QueryDenomOwnersRequest, ...grpc.CallOption) (*types.QueryDenomOwnersResponse, error)) *BankClient_DenomOwners_Call { + _c.Call.Return(run) + return _c +} + // DenomOwnersByQuery provides a mock function with given fields: ctx, in, opts func (_m *BankClient) DenomOwnersByQuery(ctx context.Context, in *types.QueryDenomOwnersByQueryRequest, opts ...grpc.CallOption) (*types.QueryDenomOwnersByQueryResponse, error) { _va := make([]interface{}, len(opts)) @@ -193,6 +406,10 @@ func (_m *BankClient) DenomOwnersByQuery(ctx context.Context, in *types.QueryDen _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for DenomOwnersByQuery") + } + var r0 *types.QueryDenomOwnersByQueryResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *types.QueryDenomOwnersByQueryRequest, ...grpc.CallOption) (*types.QueryDenomOwnersByQueryResponse, error)); ok { @@ -215,6 +432,43 @@ func (_m *BankClient) DenomOwnersByQuery(ctx context.Context, in *types.QueryDen return r0, r1 } +// BankClient_DenomOwnersByQuery_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DenomOwnersByQuery' +type BankClient_DenomOwnersByQuery_Call struct { + *mock.Call +} + +// DenomOwnersByQuery is a helper method to define mock.On call +// - ctx context.Context +// - in *types.QueryDenomOwnersByQueryRequest +// - opts ...grpc.CallOption +func (_e *BankClient_Expecter) DenomOwnersByQuery(ctx interface{}, in interface{}, opts ...interface{}) *BankClient_DenomOwnersByQuery_Call { + return &BankClient_DenomOwnersByQuery_Call{Call: _e.mock.On("DenomOwnersByQuery", + append([]interface{}{ctx, in}, opts...)...)} +} + +func (_c *BankClient_DenomOwnersByQuery_Call) Run(run func(ctx context.Context, in *types.QueryDenomOwnersByQueryRequest, opts ...grpc.CallOption)) *BankClient_DenomOwnersByQuery_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]grpc.CallOption, len(args)-2) + for i, a := range args[2:] { + if a != nil { + variadicArgs[i] = a.(grpc.CallOption) + } + } + run(args[0].(context.Context), args[1].(*types.QueryDenomOwnersByQueryRequest), variadicArgs...) + }) + return _c +} + +func (_c *BankClient_DenomOwnersByQuery_Call) Return(_a0 *types.QueryDenomOwnersByQueryResponse, _a1 error) *BankClient_DenomOwnersByQuery_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *BankClient_DenomOwnersByQuery_Call) RunAndReturn(run func(context.Context, *types.QueryDenomOwnersByQueryRequest, ...grpc.CallOption) (*types.QueryDenomOwnersByQueryResponse, error)) *BankClient_DenomOwnersByQuery_Call { + _c.Call.Return(run) + return _c +} + // DenomsMetadata provides a mock function with given fields: ctx, in, opts func (_m *BankClient) DenomsMetadata(ctx context.Context, in *types.QueryDenomsMetadataRequest, opts ...grpc.CallOption) (*types.QueryDenomsMetadataResponse, error) { _va := make([]interface{}, len(opts)) @@ -226,6 +480,10 @@ func (_m *BankClient) DenomsMetadata(ctx context.Context, in *types.QueryDenomsM _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for DenomsMetadata") + } + var r0 *types.QueryDenomsMetadataResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *types.QueryDenomsMetadataRequest, ...grpc.CallOption) (*types.QueryDenomsMetadataResponse, error)); ok { @@ -248,6 +506,43 @@ func (_m *BankClient) DenomsMetadata(ctx context.Context, in *types.QueryDenomsM return r0, r1 } +// BankClient_DenomsMetadata_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DenomsMetadata' +type BankClient_DenomsMetadata_Call struct { + *mock.Call +} + +// DenomsMetadata is a helper method to define mock.On call +// - ctx context.Context +// - in *types.QueryDenomsMetadataRequest +// - opts ...grpc.CallOption +func (_e *BankClient_Expecter) DenomsMetadata(ctx interface{}, in interface{}, opts ...interface{}) *BankClient_DenomsMetadata_Call { + return &BankClient_DenomsMetadata_Call{Call: _e.mock.On("DenomsMetadata", + append([]interface{}{ctx, in}, opts...)...)} +} + +func (_c *BankClient_DenomsMetadata_Call) Run(run func(ctx context.Context, in *types.QueryDenomsMetadataRequest, opts ...grpc.CallOption)) *BankClient_DenomsMetadata_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]grpc.CallOption, len(args)-2) + for i, a := range args[2:] { + if a != nil { + variadicArgs[i] = a.(grpc.CallOption) + } + } + run(args[0].(context.Context), args[1].(*types.QueryDenomsMetadataRequest), variadicArgs...) + }) + return _c +} + +func (_c *BankClient_DenomsMetadata_Call) Return(_a0 *types.QueryDenomsMetadataResponse, _a1 error) *BankClient_DenomsMetadata_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *BankClient_DenomsMetadata_Call) RunAndReturn(run func(context.Context, *types.QueryDenomsMetadataRequest, ...grpc.CallOption) (*types.QueryDenomsMetadataResponse, error)) *BankClient_DenomsMetadata_Call { + _c.Call.Return(run) + return _c +} + // Params provides a mock function with given fields: ctx, in, opts func (_m *BankClient) Params(ctx context.Context, in *types.QueryParamsRequest, opts ...grpc.CallOption) (*types.QueryParamsResponse, error) { _va := make([]interface{}, len(opts)) @@ -259,6 +554,10 @@ func (_m *BankClient) Params(ctx context.Context, in *types.QueryParamsRequest, _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for Params") + } + var r0 *types.QueryParamsResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *types.QueryParamsRequest, ...grpc.CallOption) (*types.QueryParamsResponse, error)); ok { @@ -281,6 +580,43 @@ func (_m *BankClient) Params(ctx context.Context, in *types.QueryParamsRequest, return r0, r1 } +// BankClient_Params_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Params' +type BankClient_Params_Call struct { + *mock.Call +} + +// Params is a helper method to define mock.On call +// - ctx context.Context +// - in *types.QueryParamsRequest +// - opts ...grpc.CallOption +func (_e *BankClient_Expecter) Params(ctx interface{}, in interface{}, opts ...interface{}) *BankClient_Params_Call { + return &BankClient_Params_Call{Call: _e.mock.On("Params", + append([]interface{}{ctx, in}, opts...)...)} +} + +func (_c *BankClient_Params_Call) Run(run func(ctx context.Context, in *types.QueryParamsRequest, opts ...grpc.CallOption)) *BankClient_Params_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]grpc.CallOption, len(args)-2) + for i, a := range args[2:] { + if a != nil { + variadicArgs[i] = a.(grpc.CallOption) + } + } + run(args[0].(context.Context), args[1].(*types.QueryParamsRequest), variadicArgs...) + }) + return _c +} + +func (_c *BankClient_Params_Call) Return(_a0 *types.QueryParamsResponse, _a1 error) *BankClient_Params_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *BankClient_Params_Call) RunAndReturn(run func(context.Context, *types.QueryParamsRequest, ...grpc.CallOption) (*types.QueryParamsResponse, error)) *BankClient_Params_Call { + _c.Call.Return(run) + return _c +} + // SendEnabled provides a mock function with given fields: ctx, in, opts func (_m *BankClient) SendEnabled(ctx context.Context, in *types.QuerySendEnabledRequest, opts ...grpc.CallOption) (*types.QuerySendEnabledResponse, error) { _va := make([]interface{}, len(opts)) @@ -292,6 +628,10 @@ func (_m *BankClient) SendEnabled(ctx context.Context, in *types.QuerySendEnable _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for SendEnabled") + } + var r0 *types.QuerySendEnabledResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *types.QuerySendEnabledRequest, ...grpc.CallOption) (*types.QuerySendEnabledResponse, error)); ok { @@ -314,6 +654,43 @@ func (_m *BankClient) SendEnabled(ctx context.Context, in *types.QuerySendEnable return r0, r1 } +// BankClient_SendEnabled_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SendEnabled' +type BankClient_SendEnabled_Call struct { + *mock.Call +} + +// SendEnabled is a helper method to define mock.On call +// - ctx context.Context +// - in *types.QuerySendEnabledRequest +// - opts ...grpc.CallOption +func (_e *BankClient_Expecter) SendEnabled(ctx interface{}, in interface{}, opts ...interface{}) *BankClient_SendEnabled_Call { + return &BankClient_SendEnabled_Call{Call: _e.mock.On("SendEnabled", + append([]interface{}{ctx, in}, opts...)...)} +} + +func (_c *BankClient_SendEnabled_Call) Run(run func(ctx context.Context, in *types.QuerySendEnabledRequest, opts ...grpc.CallOption)) *BankClient_SendEnabled_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]grpc.CallOption, len(args)-2) + for i, a := range args[2:] { + if a != nil { + variadicArgs[i] = a.(grpc.CallOption) + } + } + run(args[0].(context.Context), args[1].(*types.QuerySendEnabledRequest), variadicArgs...) + }) + return _c +} + +func (_c *BankClient_SendEnabled_Call) Return(_a0 *types.QuerySendEnabledResponse, _a1 error) *BankClient_SendEnabled_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *BankClient_SendEnabled_Call) RunAndReturn(run func(context.Context, *types.QuerySendEnabledRequest, ...grpc.CallOption) (*types.QuerySendEnabledResponse, error)) *BankClient_SendEnabled_Call { + _c.Call.Return(run) + return _c +} + // SpendableBalanceByDenom provides a mock function with given fields: ctx, in, opts func (_m *BankClient) SpendableBalanceByDenom(ctx context.Context, in *types.QuerySpendableBalanceByDenomRequest, opts ...grpc.CallOption) (*types.QuerySpendableBalanceByDenomResponse, error) { _va := make([]interface{}, len(opts)) @@ -325,6 +702,10 @@ func (_m *BankClient) SpendableBalanceByDenom(ctx context.Context, in *types.Que _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for SpendableBalanceByDenom") + } + var r0 *types.QuerySpendableBalanceByDenomResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *types.QuerySpendableBalanceByDenomRequest, ...grpc.CallOption) (*types.QuerySpendableBalanceByDenomResponse, error)); ok { @@ -347,6 +728,43 @@ func (_m *BankClient) SpendableBalanceByDenom(ctx context.Context, in *types.Que return r0, r1 } +// BankClient_SpendableBalanceByDenom_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SpendableBalanceByDenom' +type BankClient_SpendableBalanceByDenom_Call struct { + *mock.Call +} + +// SpendableBalanceByDenom is a helper method to define mock.On call +// - ctx context.Context +// - in *types.QuerySpendableBalanceByDenomRequest +// - opts ...grpc.CallOption +func (_e *BankClient_Expecter) SpendableBalanceByDenom(ctx interface{}, in interface{}, opts ...interface{}) *BankClient_SpendableBalanceByDenom_Call { + return &BankClient_SpendableBalanceByDenom_Call{Call: _e.mock.On("SpendableBalanceByDenom", + append([]interface{}{ctx, in}, opts...)...)} +} + +func (_c *BankClient_SpendableBalanceByDenom_Call) Run(run func(ctx context.Context, in *types.QuerySpendableBalanceByDenomRequest, opts ...grpc.CallOption)) *BankClient_SpendableBalanceByDenom_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]grpc.CallOption, len(args)-2) + for i, a := range args[2:] { + if a != nil { + variadicArgs[i] = a.(grpc.CallOption) + } + } + run(args[0].(context.Context), args[1].(*types.QuerySpendableBalanceByDenomRequest), variadicArgs...) + }) + return _c +} + +func (_c *BankClient_SpendableBalanceByDenom_Call) Return(_a0 *types.QuerySpendableBalanceByDenomResponse, _a1 error) *BankClient_SpendableBalanceByDenom_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *BankClient_SpendableBalanceByDenom_Call) RunAndReturn(run func(context.Context, *types.QuerySpendableBalanceByDenomRequest, ...grpc.CallOption) (*types.QuerySpendableBalanceByDenomResponse, error)) *BankClient_SpendableBalanceByDenom_Call { + _c.Call.Return(run) + return _c +} + // SpendableBalances provides a mock function with given fields: ctx, in, opts func (_m *BankClient) SpendableBalances(ctx context.Context, in *types.QuerySpendableBalancesRequest, opts ...grpc.CallOption) (*types.QuerySpendableBalancesResponse, error) { _va := make([]interface{}, len(opts)) @@ -358,6 +776,10 @@ func (_m *BankClient) SpendableBalances(ctx context.Context, in *types.QuerySpen _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for SpendableBalances") + } + var r0 *types.QuerySpendableBalancesResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *types.QuerySpendableBalancesRequest, ...grpc.CallOption) (*types.QuerySpendableBalancesResponse, error)); ok { @@ -380,6 +802,43 @@ func (_m *BankClient) SpendableBalances(ctx context.Context, in *types.QuerySpen return r0, r1 } +// BankClient_SpendableBalances_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SpendableBalances' +type BankClient_SpendableBalances_Call struct { + *mock.Call +} + +// SpendableBalances is a helper method to define mock.On call +// - ctx context.Context +// - in *types.QuerySpendableBalancesRequest +// - opts ...grpc.CallOption +func (_e *BankClient_Expecter) SpendableBalances(ctx interface{}, in interface{}, opts ...interface{}) *BankClient_SpendableBalances_Call { + return &BankClient_SpendableBalances_Call{Call: _e.mock.On("SpendableBalances", + append([]interface{}{ctx, in}, opts...)...)} +} + +func (_c *BankClient_SpendableBalances_Call) Run(run func(ctx context.Context, in *types.QuerySpendableBalancesRequest, opts ...grpc.CallOption)) *BankClient_SpendableBalances_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]grpc.CallOption, len(args)-2) + for i, a := range args[2:] { + if a != nil { + variadicArgs[i] = a.(grpc.CallOption) + } + } + run(args[0].(context.Context), args[1].(*types.QuerySpendableBalancesRequest), variadicArgs...) + }) + return _c +} + +func (_c *BankClient_SpendableBalances_Call) Return(_a0 *types.QuerySpendableBalancesResponse, _a1 error) *BankClient_SpendableBalances_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *BankClient_SpendableBalances_Call) RunAndReturn(run func(context.Context, *types.QuerySpendableBalancesRequest, ...grpc.CallOption) (*types.QuerySpendableBalancesResponse, error)) *BankClient_SpendableBalances_Call { + _c.Call.Return(run) + return _c +} + // SupplyOf provides a mock function with given fields: ctx, in, opts func (_m *BankClient) SupplyOf(ctx context.Context, in *types.QuerySupplyOfRequest, opts ...grpc.CallOption) (*types.QuerySupplyOfResponse, error) { _va := make([]interface{}, len(opts)) @@ -391,6 +850,10 @@ func (_m *BankClient) SupplyOf(ctx context.Context, in *types.QuerySupplyOfReque _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for SupplyOf") + } + var r0 *types.QuerySupplyOfResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *types.QuerySupplyOfRequest, ...grpc.CallOption) (*types.QuerySupplyOfResponse, error)); ok { @@ -413,6 +876,43 @@ func (_m *BankClient) SupplyOf(ctx context.Context, in *types.QuerySupplyOfReque return r0, r1 } +// BankClient_SupplyOf_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SupplyOf' +type BankClient_SupplyOf_Call struct { + *mock.Call +} + +// SupplyOf is a helper method to define mock.On call +// - ctx context.Context +// - in *types.QuerySupplyOfRequest +// - opts ...grpc.CallOption +func (_e *BankClient_Expecter) SupplyOf(ctx interface{}, in interface{}, opts ...interface{}) *BankClient_SupplyOf_Call { + return &BankClient_SupplyOf_Call{Call: _e.mock.On("SupplyOf", + append([]interface{}{ctx, in}, opts...)...)} +} + +func (_c *BankClient_SupplyOf_Call) Run(run func(ctx context.Context, in *types.QuerySupplyOfRequest, opts ...grpc.CallOption)) *BankClient_SupplyOf_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]grpc.CallOption, len(args)-2) + for i, a := range args[2:] { + if a != nil { + variadicArgs[i] = a.(grpc.CallOption) + } + } + run(args[0].(context.Context), args[1].(*types.QuerySupplyOfRequest), variadicArgs...) + }) + return _c +} + +func (_c *BankClient_SupplyOf_Call) Return(_a0 *types.QuerySupplyOfResponse, _a1 error) *BankClient_SupplyOf_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *BankClient_SupplyOf_Call) RunAndReturn(run func(context.Context, *types.QuerySupplyOfRequest, ...grpc.CallOption) (*types.QuerySupplyOfResponse, error)) *BankClient_SupplyOf_Call { + _c.Call.Return(run) + return _c +} + // TotalSupply provides a mock function with given fields: ctx, in, opts func (_m *BankClient) TotalSupply(ctx context.Context, in *types.QueryTotalSupplyRequest, opts ...grpc.CallOption) (*types.QueryTotalSupplyResponse, error) { _va := make([]interface{}, len(opts)) @@ -424,6 +924,10 @@ func (_m *BankClient) TotalSupply(ctx context.Context, in *types.QueryTotalSuppl _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for TotalSupply") + } + var r0 *types.QueryTotalSupplyResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *types.QueryTotalSupplyRequest, ...grpc.CallOption) (*types.QueryTotalSupplyResponse, error)); ok { @@ -446,13 +950,49 @@ func (_m *BankClient) TotalSupply(ctx context.Context, in *types.QueryTotalSuppl return r0, r1 } -type mockConstructorTestingTNewBankClient interface { - mock.TestingT - Cleanup(func()) +// BankClient_TotalSupply_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'TotalSupply' +type BankClient_TotalSupply_Call struct { + *mock.Call +} + +// TotalSupply is a helper method to define mock.On call +// - ctx context.Context +// - in *types.QueryTotalSupplyRequest +// - opts ...grpc.CallOption +func (_e *BankClient_Expecter) TotalSupply(ctx interface{}, in interface{}, opts ...interface{}) *BankClient_TotalSupply_Call { + return &BankClient_TotalSupply_Call{Call: _e.mock.On("TotalSupply", + append([]interface{}{ctx, in}, opts...)...)} +} + +func (_c *BankClient_TotalSupply_Call) Run(run func(ctx context.Context, in *types.QueryTotalSupplyRequest, opts ...grpc.CallOption)) *BankClient_TotalSupply_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]grpc.CallOption, len(args)-2) + for i, a := range args[2:] { + if a != nil { + variadicArgs[i] = a.(grpc.CallOption) + } + } + run(args[0].(context.Context), args[1].(*types.QueryTotalSupplyRequest), variadicArgs...) + }) + return _c +} + +func (_c *BankClient_TotalSupply_Call) Return(_a0 *types.QueryTotalSupplyResponse, _a1 error) *BankClient_TotalSupply_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *BankClient_TotalSupply_Call) RunAndReturn(run func(context.Context, *types.QueryTotalSupplyRequest, ...grpc.CallOption) (*types.QueryTotalSupplyResponse, error)) *BankClient_TotalSupply_Call { + _c.Call.Return(run) + return _c } // NewBankClient creates a new instance of BankClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewBankClient(t mockConstructorTestingTNewBankClient) *BankClient { +// The first argument is typically a *testing.T value. +func NewBankClient(t interface { + mock.TestingT + Cleanup(func()) +}) *BankClient { mock := &BankClient{} mock.Mock.Test(t) diff --git a/network/network/mocks/chain.go b/network/network/mocks/chain.go index f967068a..0a3030e8 100644 --- a/network/network/mocks/chain.go +++ b/network/network/mocks/chain.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.46.3. DO NOT EDIT. +// Code generated by mockery. DO NOT EDIT. package mocks @@ -13,6 +13,14 @@ type Chain struct { mock.Mock } +type Chain_Expecter struct { + mock *mock.Mock +} + +func (_m *Chain) EXPECT() *Chain_Expecter { + return &Chain_Expecter{mock: &_m.Mock} +} + // AppTOMLPath provides a mock function with given fields: func (_m *Chain) AppTOMLPath() (string, error) { ret := _m.Called() @@ -41,6 +49,33 @@ func (_m *Chain) AppTOMLPath() (string, error) { return r0, r1 } +// Chain_AppTOMLPath_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AppTOMLPath' +type Chain_AppTOMLPath_Call struct { + *mock.Call +} + +// AppTOMLPath is a helper method to define mock.On call +func (_e *Chain_Expecter) AppTOMLPath() *Chain_AppTOMLPath_Call { + return &Chain_AppTOMLPath_Call{Call: _e.mock.On("AppTOMLPath")} +} + +func (_c *Chain_AppTOMLPath_Call) Run(run func()) *Chain_AppTOMLPath_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *Chain_AppTOMLPath_Call) Return(_a0 string, _a1 error) *Chain_AppTOMLPath_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Chain_AppTOMLPath_Call) RunAndReturn(run func() (string, error)) *Chain_AppTOMLPath_Call { + _c.Call.Return(run) + return _c +} + // CacheBinary provides a mock function with given fields: launchID func (_m *Chain) CacheBinary(launchID uint64) error { ret := _m.Called(launchID) @@ -59,6 +94,34 @@ func (_m *Chain) CacheBinary(launchID uint64) error { return r0 } +// Chain_CacheBinary_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CacheBinary' +type Chain_CacheBinary_Call struct { + *mock.Call +} + +// CacheBinary is a helper method to define mock.On call +// - launchID uint64 +func (_e *Chain_Expecter) CacheBinary(launchID interface{}) *Chain_CacheBinary_Call { + return &Chain_CacheBinary_Call{Call: _e.mock.On("CacheBinary", launchID)} +} + +func (_c *Chain_CacheBinary_Call) Run(run func(launchID uint64)) *Chain_CacheBinary_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(uint64)) + }) + return _c +} + +func (_c *Chain_CacheBinary_Call) Return(_a0 error) *Chain_CacheBinary_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Chain_CacheBinary_Call) RunAndReturn(run func(uint64) error) *Chain_CacheBinary_Call { + _c.Call.Return(run) + return _c +} + // ChainID provides a mock function with given fields: func (_m *Chain) ChainID() (string, error) { ret := _m.Called() @@ -87,6 +150,33 @@ func (_m *Chain) ChainID() (string, error) { return r0, r1 } +// Chain_ChainID_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ChainID' +type Chain_ChainID_Call struct { + *mock.Call +} + +// ChainID is a helper method to define mock.On call +func (_e *Chain_Expecter) ChainID() *Chain_ChainID_Call { + return &Chain_ChainID_Call{Call: _e.mock.On("ChainID")} +} + +func (_c *Chain_ChainID_Call) Run(run func()) *Chain_ChainID_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *Chain_ChainID_Call) Return(_a0 string, _a1 error) *Chain_ChainID_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Chain_ChainID_Call) RunAndReturn(run func() (string, error)) *Chain_ChainID_Call { + _c.Call.Return(run) + return _c +} + // ConfigTOMLPath provides a mock function with given fields: func (_m *Chain) ConfigTOMLPath() (string, error) { ret := _m.Called() @@ -115,6 +205,33 @@ func (_m *Chain) ConfigTOMLPath() (string, error) { return r0, r1 } +// Chain_ConfigTOMLPath_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ConfigTOMLPath' +type Chain_ConfigTOMLPath_Call struct { + *mock.Call +} + +// ConfigTOMLPath is a helper method to define mock.On call +func (_e *Chain_Expecter) ConfigTOMLPath() *Chain_ConfigTOMLPath_Call { + return &Chain_ConfigTOMLPath_Call{Call: _e.mock.On("ConfigTOMLPath")} +} + +func (_c *Chain_ConfigTOMLPath_Call) Run(run func()) *Chain_ConfigTOMLPath_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *Chain_ConfigTOMLPath_Call) Return(_a0 string, _a1 error) *Chain_ConfigTOMLPath_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Chain_ConfigTOMLPath_Call) RunAndReturn(run func() (string, error)) *Chain_ConfigTOMLPath_Call { + _c.Call.Return(run) + return _c +} + // DefaultGentxPath provides a mock function with given fields: func (_m *Chain) DefaultGentxPath() (string, error) { ret := _m.Called() @@ -143,6 +260,33 @@ func (_m *Chain) DefaultGentxPath() (string, error) { return r0, r1 } +// Chain_DefaultGentxPath_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DefaultGentxPath' +type Chain_DefaultGentxPath_Call struct { + *mock.Call +} + +// DefaultGentxPath is a helper method to define mock.On call +func (_e *Chain_Expecter) DefaultGentxPath() *Chain_DefaultGentxPath_Call { + return &Chain_DefaultGentxPath_Call{Call: _e.mock.On("DefaultGentxPath")} +} + +func (_c *Chain_DefaultGentxPath_Call) Run(run func()) *Chain_DefaultGentxPath_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *Chain_DefaultGentxPath_Call) Return(_a0 string, _a1 error) *Chain_DefaultGentxPath_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Chain_DefaultGentxPath_Call) RunAndReturn(run func() (string, error)) *Chain_DefaultGentxPath_Call { + _c.Call.Return(run) + return _c +} + // GenesisPath provides a mock function with given fields: func (_m *Chain) GenesisPath() (string, error) { ret := _m.Called() @@ -171,6 +315,33 @@ func (_m *Chain) GenesisPath() (string, error) { return r0, r1 } +// Chain_GenesisPath_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GenesisPath' +type Chain_GenesisPath_Call struct { + *mock.Call +} + +// GenesisPath is a helper method to define mock.On call +func (_e *Chain_Expecter) GenesisPath() *Chain_GenesisPath_Call { + return &Chain_GenesisPath_Call{Call: _e.mock.On("GenesisPath")} +} + +func (_c *Chain_GenesisPath_Call) Run(run func()) *Chain_GenesisPath_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *Chain_GenesisPath_Call) Return(_a0 string, _a1 error) *Chain_GenesisPath_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Chain_GenesisPath_Call) RunAndReturn(run func() (string, error)) *Chain_GenesisPath_Call { + _c.Call.Return(run) + return _c +} + // GentxsPath provides a mock function with given fields: func (_m *Chain) GentxsPath() (string, error) { ret := _m.Called() @@ -199,6 +370,33 @@ func (_m *Chain) GentxsPath() (string, error) { return r0, r1 } +// Chain_GentxsPath_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GentxsPath' +type Chain_GentxsPath_Call struct { + *mock.Call +} + +// GentxsPath is a helper method to define mock.On call +func (_e *Chain_Expecter) GentxsPath() *Chain_GentxsPath_Call { + return &Chain_GentxsPath_Call{Call: _e.mock.On("GentxsPath")} +} + +func (_c *Chain_GentxsPath_Call) Run(run func()) *Chain_GentxsPath_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *Chain_GentxsPath_Call) Return(_a0 string, _a1 error) *Chain_GentxsPath_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Chain_GentxsPath_Call) RunAndReturn(run func() (string, error)) *Chain_GentxsPath_Call { + _c.Call.Return(run) + return _c +} + // ID provides a mock function with given fields: func (_m *Chain) ID() (string, error) { ret := _m.Called() @@ -227,6 +425,33 @@ func (_m *Chain) ID() (string, error) { return r0, r1 } +// Chain_ID_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ID' +type Chain_ID_Call struct { + *mock.Call +} + +// ID is a helper method to define mock.On call +func (_e *Chain_Expecter) ID() *Chain_ID_Call { + return &Chain_ID_Call{Call: _e.mock.On("ID")} +} + +func (_c *Chain_ID_Call) Run(run func()) *Chain_ID_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *Chain_ID_Call) Return(_a0 string, _a1 error) *Chain_ID_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Chain_ID_Call) RunAndReturn(run func() (string, error)) *Chain_ID_Call { + _c.Call.Return(run) + return _c +} + // Name provides a mock function with given fields: func (_m *Chain) Name() string { ret := _m.Called() @@ -245,6 +470,33 @@ func (_m *Chain) Name() string { return r0 } +// Chain_Name_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Name' +type Chain_Name_Call struct { + *mock.Call +} + +// Name is a helper method to define mock.On call +func (_e *Chain_Expecter) Name() *Chain_Name_Call { + return &Chain_Name_Call{Call: _e.mock.On("Name")} +} + +func (_c *Chain_Name_Call) Run(run func()) *Chain_Name_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *Chain_Name_Call) Return(_a0 string) *Chain_Name_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Chain_Name_Call) RunAndReturn(run func() string) *Chain_Name_Call { + _c.Call.Return(run) + return _c +} + // NodeID provides a mock function with given fields: ctx func (_m *Chain) NodeID(ctx context.Context) (string, error) { ret := _m.Called(ctx) @@ -273,6 +525,34 @@ func (_m *Chain) NodeID(ctx context.Context) (string, error) { return r0, r1 } +// Chain_NodeID_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'NodeID' +type Chain_NodeID_Call struct { + *mock.Call +} + +// NodeID is a helper method to define mock.On call +// - ctx context.Context +func (_e *Chain_Expecter) NodeID(ctx interface{}) *Chain_NodeID_Call { + return &Chain_NodeID_Call{Call: _e.mock.On("NodeID", ctx)} +} + +func (_c *Chain_NodeID_Call) Run(run func(ctx context.Context)) *Chain_NodeID_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context)) + }) + return _c +} + +func (_c *Chain_NodeID_Call) Return(_a0 string, _a1 error) *Chain_NodeID_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Chain_NodeID_Call) RunAndReturn(run func(context.Context) (string, error)) *Chain_NodeID_Call { + _c.Call.Return(run) + return _c +} + // SourceHash provides a mock function with given fields: func (_m *Chain) SourceHash() string { ret := _m.Called() @@ -291,6 +571,33 @@ func (_m *Chain) SourceHash() string { return r0 } +// Chain_SourceHash_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SourceHash' +type Chain_SourceHash_Call struct { + *mock.Call +} + +// SourceHash is a helper method to define mock.On call +func (_e *Chain_Expecter) SourceHash() *Chain_SourceHash_Call { + return &Chain_SourceHash_Call{Call: _e.mock.On("SourceHash")} +} + +func (_c *Chain_SourceHash_Call) Run(run func()) *Chain_SourceHash_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *Chain_SourceHash_Call) Return(_a0 string) *Chain_SourceHash_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Chain_SourceHash_Call) RunAndReturn(run func() string) *Chain_SourceHash_Call { + _c.Call.Return(run) + return _c +} + // SourceURL provides a mock function with given fields: func (_m *Chain) SourceURL() string { ret := _m.Called() @@ -309,6 +616,33 @@ func (_m *Chain) SourceURL() string { return r0 } +// Chain_SourceURL_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SourceURL' +type Chain_SourceURL_Call struct { + *mock.Call +} + +// SourceURL is a helper method to define mock.On call +func (_e *Chain_Expecter) SourceURL() *Chain_SourceURL_Call { + return &Chain_SourceURL_Call{Call: _e.mock.On("SourceURL")} +} + +func (_c *Chain_SourceURL_Call) Run(run func()) *Chain_SourceURL_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *Chain_SourceURL_Call) Return(_a0 string) *Chain_SourceURL_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Chain_SourceURL_Call) RunAndReturn(run func() string) *Chain_SourceURL_Call { + _c.Call.Return(run) + return _c +} + // NewChain creates a new instance of Chain. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. // The first argument is typically a *testing.T value. func NewChain(t interface { diff --git a/network/network/mocks/launch_client.go b/network/network/mocks/launch_client.go index 32f25477..58cf2510 100644 --- a/network/network/mocks/launch_client.go +++ b/network/network/mocks/launch_client.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.27.1. DO NOT EDIT. +// Code generated by mockery. DO NOT EDIT. package mocks @@ -17,6 +17,14 @@ type LaunchClient struct { mock.Mock } +type LaunchClient_Expecter struct { + mock *mock.Mock +} + +func (_m *LaunchClient) EXPECT() *LaunchClient_Expecter { + return &LaunchClient_Expecter{mock: &_m.Mock} +} + // GetChain provides a mock function with given fields: ctx, in, opts func (_m *LaunchClient) GetChain(ctx context.Context, in *types.QueryGetChainRequest, opts ...grpc.CallOption) (*types.QueryGetChainResponse, error) { _va := make([]interface{}, len(opts)) @@ -28,6 +36,10 @@ func (_m *LaunchClient) GetChain(ctx context.Context, in *types.QueryGetChainReq _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for GetChain") + } + var r0 *types.QueryGetChainResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *types.QueryGetChainRequest, ...grpc.CallOption) (*types.QueryGetChainResponse, error)); ok { @@ -50,6 +62,43 @@ func (_m *LaunchClient) GetChain(ctx context.Context, in *types.QueryGetChainReq return r0, r1 } +// LaunchClient_GetChain_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetChain' +type LaunchClient_GetChain_Call struct { + *mock.Call +} + +// GetChain is a helper method to define mock.On call +// - ctx context.Context +// - in *types.QueryGetChainRequest +// - opts ...grpc.CallOption +func (_e *LaunchClient_Expecter) GetChain(ctx interface{}, in interface{}, opts ...interface{}) *LaunchClient_GetChain_Call { + return &LaunchClient_GetChain_Call{Call: _e.mock.On("GetChain", + append([]interface{}{ctx, in}, opts...)...)} +} + +func (_c *LaunchClient_GetChain_Call) Run(run func(ctx context.Context, in *types.QueryGetChainRequest, opts ...grpc.CallOption)) *LaunchClient_GetChain_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]grpc.CallOption, len(args)-2) + for i, a := range args[2:] { + if a != nil { + variadicArgs[i] = a.(grpc.CallOption) + } + } + run(args[0].(context.Context), args[1].(*types.QueryGetChainRequest), variadicArgs...) + }) + return _c +} + +func (_c *LaunchClient_GetChain_Call) Return(_a0 *types.QueryGetChainResponse, _a1 error) *LaunchClient_GetChain_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *LaunchClient_GetChain_Call) RunAndReturn(run func(context.Context, *types.QueryGetChainRequest, ...grpc.CallOption) (*types.QueryGetChainResponse, error)) *LaunchClient_GetChain_Call { + _c.Call.Return(run) + return _c +} + // GetGenesisAccount provides a mock function with given fields: ctx, in, opts func (_m *LaunchClient) GetGenesisAccount(ctx context.Context, in *types.QueryGetGenesisAccountRequest, opts ...grpc.CallOption) (*types.QueryGetGenesisAccountResponse, error) { _va := make([]interface{}, len(opts)) @@ -61,6 +110,10 @@ func (_m *LaunchClient) GetGenesisAccount(ctx context.Context, in *types.QueryGe _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for GetGenesisAccount") + } + var r0 *types.QueryGetGenesisAccountResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *types.QueryGetGenesisAccountRequest, ...grpc.CallOption) (*types.QueryGetGenesisAccountResponse, error)); ok { @@ -83,6 +136,43 @@ func (_m *LaunchClient) GetGenesisAccount(ctx context.Context, in *types.QueryGe return r0, r1 } +// LaunchClient_GetGenesisAccount_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetGenesisAccount' +type LaunchClient_GetGenesisAccount_Call struct { + *mock.Call +} + +// GetGenesisAccount is a helper method to define mock.On call +// - ctx context.Context +// - in *types.QueryGetGenesisAccountRequest +// - opts ...grpc.CallOption +func (_e *LaunchClient_Expecter) GetGenesisAccount(ctx interface{}, in interface{}, opts ...interface{}) *LaunchClient_GetGenesisAccount_Call { + return &LaunchClient_GetGenesisAccount_Call{Call: _e.mock.On("GetGenesisAccount", + append([]interface{}{ctx, in}, opts...)...)} +} + +func (_c *LaunchClient_GetGenesisAccount_Call) Run(run func(ctx context.Context, in *types.QueryGetGenesisAccountRequest, opts ...grpc.CallOption)) *LaunchClient_GetGenesisAccount_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]grpc.CallOption, len(args)-2) + for i, a := range args[2:] { + if a != nil { + variadicArgs[i] = a.(grpc.CallOption) + } + } + run(args[0].(context.Context), args[1].(*types.QueryGetGenesisAccountRequest), variadicArgs...) + }) + return _c +} + +func (_c *LaunchClient_GetGenesisAccount_Call) Return(_a0 *types.QueryGetGenesisAccountResponse, _a1 error) *LaunchClient_GetGenesisAccount_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *LaunchClient_GetGenesisAccount_Call) RunAndReturn(run func(context.Context, *types.QueryGetGenesisAccountRequest, ...grpc.CallOption) (*types.QueryGetGenesisAccountResponse, error)) *LaunchClient_GetGenesisAccount_Call { + _c.Call.Return(run) + return _c +} + // GetGenesisValidator provides a mock function with given fields: ctx, in, opts func (_m *LaunchClient) GetGenesisValidator(ctx context.Context, in *types.QueryGetGenesisValidatorRequest, opts ...grpc.CallOption) (*types.QueryGetGenesisValidatorResponse, error) { _va := make([]interface{}, len(opts)) @@ -94,6 +184,10 @@ func (_m *LaunchClient) GetGenesisValidator(ctx context.Context, in *types.Query _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for GetGenesisValidator") + } + var r0 *types.QueryGetGenesisValidatorResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *types.QueryGetGenesisValidatorRequest, ...grpc.CallOption) (*types.QueryGetGenesisValidatorResponse, error)); ok { @@ -116,6 +210,43 @@ func (_m *LaunchClient) GetGenesisValidator(ctx context.Context, in *types.Query return r0, r1 } +// LaunchClient_GetGenesisValidator_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetGenesisValidator' +type LaunchClient_GetGenesisValidator_Call struct { + *mock.Call +} + +// GetGenesisValidator is a helper method to define mock.On call +// - ctx context.Context +// - in *types.QueryGetGenesisValidatorRequest +// - opts ...grpc.CallOption +func (_e *LaunchClient_Expecter) GetGenesisValidator(ctx interface{}, in interface{}, opts ...interface{}) *LaunchClient_GetGenesisValidator_Call { + return &LaunchClient_GetGenesisValidator_Call{Call: _e.mock.On("GetGenesisValidator", + append([]interface{}{ctx, in}, opts...)...)} +} + +func (_c *LaunchClient_GetGenesisValidator_Call) Run(run func(ctx context.Context, in *types.QueryGetGenesisValidatorRequest, opts ...grpc.CallOption)) *LaunchClient_GetGenesisValidator_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]grpc.CallOption, len(args)-2) + for i, a := range args[2:] { + if a != nil { + variadicArgs[i] = a.(grpc.CallOption) + } + } + run(args[0].(context.Context), args[1].(*types.QueryGetGenesisValidatorRequest), variadicArgs...) + }) + return _c +} + +func (_c *LaunchClient_GetGenesisValidator_Call) Return(_a0 *types.QueryGetGenesisValidatorResponse, _a1 error) *LaunchClient_GetGenesisValidator_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *LaunchClient_GetGenesisValidator_Call) RunAndReturn(run func(context.Context, *types.QueryGetGenesisValidatorRequest, ...grpc.CallOption) (*types.QueryGetGenesisValidatorResponse, error)) *LaunchClient_GetGenesisValidator_Call { + _c.Call.Return(run) + return _c +} + // GetRequest provides a mock function with given fields: ctx, in, opts func (_m *LaunchClient) GetRequest(ctx context.Context, in *types.QueryGetRequestRequest, opts ...grpc.CallOption) (*types.QueryGetRequestResponse, error) { _va := make([]interface{}, len(opts)) @@ -127,6 +258,10 @@ func (_m *LaunchClient) GetRequest(ctx context.Context, in *types.QueryGetReques _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for GetRequest") + } + var r0 *types.QueryGetRequestResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *types.QueryGetRequestRequest, ...grpc.CallOption) (*types.QueryGetRequestResponse, error)); ok { @@ -149,6 +284,43 @@ func (_m *LaunchClient) GetRequest(ctx context.Context, in *types.QueryGetReques return r0, r1 } +// LaunchClient_GetRequest_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetRequest' +type LaunchClient_GetRequest_Call struct { + *mock.Call +} + +// GetRequest is a helper method to define mock.On call +// - ctx context.Context +// - in *types.QueryGetRequestRequest +// - opts ...grpc.CallOption +func (_e *LaunchClient_Expecter) GetRequest(ctx interface{}, in interface{}, opts ...interface{}) *LaunchClient_GetRequest_Call { + return &LaunchClient_GetRequest_Call{Call: _e.mock.On("GetRequest", + append([]interface{}{ctx, in}, opts...)...)} +} + +func (_c *LaunchClient_GetRequest_Call) Run(run func(ctx context.Context, in *types.QueryGetRequestRequest, opts ...grpc.CallOption)) *LaunchClient_GetRequest_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]grpc.CallOption, len(args)-2) + for i, a := range args[2:] { + if a != nil { + variadicArgs[i] = a.(grpc.CallOption) + } + } + run(args[0].(context.Context), args[1].(*types.QueryGetRequestRequest), variadicArgs...) + }) + return _c +} + +func (_c *LaunchClient_GetRequest_Call) Return(_a0 *types.QueryGetRequestResponse, _a1 error) *LaunchClient_GetRequest_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *LaunchClient_GetRequest_Call) RunAndReturn(run func(context.Context, *types.QueryGetRequestRequest, ...grpc.CallOption) (*types.QueryGetRequestResponse, error)) *LaunchClient_GetRequest_Call { + _c.Call.Return(run) + return _c +} + // GetVestingAccount provides a mock function with given fields: ctx, in, opts func (_m *LaunchClient) GetVestingAccount(ctx context.Context, in *types.QueryGetVestingAccountRequest, opts ...grpc.CallOption) (*types.QueryGetVestingAccountResponse, error) { _va := make([]interface{}, len(opts)) @@ -160,6 +332,10 @@ func (_m *LaunchClient) GetVestingAccount(ctx context.Context, in *types.QueryGe _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for GetVestingAccount") + } + var r0 *types.QueryGetVestingAccountResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *types.QueryGetVestingAccountRequest, ...grpc.CallOption) (*types.QueryGetVestingAccountResponse, error)); ok { @@ -182,6 +358,43 @@ func (_m *LaunchClient) GetVestingAccount(ctx context.Context, in *types.QueryGe return r0, r1 } +// LaunchClient_GetVestingAccount_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetVestingAccount' +type LaunchClient_GetVestingAccount_Call struct { + *mock.Call +} + +// GetVestingAccount is a helper method to define mock.On call +// - ctx context.Context +// - in *types.QueryGetVestingAccountRequest +// - opts ...grpc.CallOption +func (_e *LaunchClient_Expecter) GetVestingAccount(ctx interface{}, in interface{}, opts ...interface{}) *LaunchClient_GetVestingAccount_Call { + return &LaunchClient_GetVestingAccount_Call{Call: _e.mock.On("GetVestingAccount", + append([]interface{}{ctx, in}, opts...)...)} +} + +func (_c *LaunchClient_GetVestingAccount_Call) Run(run func(ctx context.Context, in *types.QueryGetVestingAccountRequest, opts ...grpc.CallOption)) *LaunchClient_GetVestingAccount_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]grpc.CallOption, len(args)-2) + for i, a := range args[2:] { + if a != nil { + variadicArgs[i] = a.(grpc.CallOption) + } + } + run(args[0].(context.Context), args[1].(*types.QueryGetVestingAccountRequest), variadicArgs...) + }) + return _c +} + +func (_c *LaunchClient_GetVestingAccount_Call) Return(_a0 *types.QueryGetVestingAccountResponse, _a1 error) *LaunchClient_GetVestingAccount_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *LaunchClient_GetVestingAccount_Call) RunAndReturn(run func(context.Context, *types.QueryGetVestingAccountRequest, ...grpc.CallOption) (*types.QueryGetVestingAccountResponse, error)) *LaunchClient_GetVestingAccount_Call { + _c.Call.Return(run) + return _c +} + // ListChain provides a mock function with given fields: ctx, in, opts func (_m *LaunchClient) ListChain(ctx context.Context, in *types.QueryAllChainRequest, opts ...grpc.CallOption) (*types.QueryAllChainResponse, error) { _va := make([]interface{}, len(opts)) @@ -193,6 +406,10 @@ func (_m *LaunchClient) ListChain(ctx context.Context, in *types.QueryAllChainRe _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for ListChain") + } + var r0 *types.QueryAllChainResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *types.QueryAllChainRequest, ...grpc.CallOption) (*types.QueryAllChainResponse, error)); ok { @@ -215,6 +432,43 @@ func (_m *LaunchClient) ListChain(ctx context.Context, in *types.QueryAllChainRe return r0, r1 } +// LaunchClient_ListChain_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListChain' +type LaunchClient_ListChain_Call struct { + *mock.Call +} + +// ListChain is a helper method to define mock.On call +// - ctx context.Context +// - in *types.QueryAllChainRequest +// - opts ...grpc.CallOption +func (_e *LaunchClient_Expecter) ListChain(ctx interface{}, in interface{}, opts ...interface{}) *LaunchClient_ListChain_Call { + return &LaunchClient_ListChain_Call{Call: _e.mock.On("ListChain", + append([]interface{}{ctx, in}, opts...)...)} +} + +func (_c *LaunchClient_ListChain_Call) Run(run func(ctx context.Context, in *types.QueryAllChainRequest, opts ...grpc.CallOption)) *LaunchClient_ListChain_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]grpc.CallOption, len(args)-2) + for i, a := range args[2:] { + if a != nil { + variadicArgs[i] = a.(grpc.CallOption) + } + } + run(args[0].(context.Context), args[1].(*types.QueryAllChainRequest), variadicArgs...) + }) + return _c +} + +func (_c *LaunchClient_ListChain_Call) Return(_a0 *types.QueryAllChainResponse, _a1 error) *LaunchClient_ListChain_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *LaunchClient_ListChain_Call) RunAndReturn(run func(context.Context, *types.QueryAllChainRequest, ...grpc.CallOption) (*types.QueryAllChainResponse, error)) *LaunchClient_ListChain_Call { + _c.Call.Return(run) + return _c +} + // ListGenesisAccount provides a mock function with given fields: ctx, in, opts func (_m *LaunchClient) ListGenesisAccount(ctx context.Context, in *types.QueryAllGenesisAccountRequest, opts ...grpc.CallOption) (*types.QueryAllGenesisAccountResponse, error) { _va := make([]interface{}, len(opts)) @@ -226,6 +480,10 @@ func (_m *LaunchClient) ListGenesisAccount(ctx context.Context, in *types.QueryA _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for ListGenesisAccount") + } + var r0 *types.QueryAllGenesisAccountResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *types.QueryAllGenesisAccountRequest, ...grpc.CallOption) (*types.QueryAllGenesisAccountResponse, error)); ok { @@ -248,6 +506,43 @@ func (_m *LaunchClient) ListGenesisAccount(ctx context.Context, in *types.QueryA return r0, r1 } +// LaunchClient_ListGenesisAccount_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListGenesisAccount' +type LaunchClient_ListGenesisAccount_Call struct { + *mock.Call +} + +// ListGenesisAccount is a helper method to define mock.On call +// - ctx context.Context +// - in *types.QueryAllGenesisAccountRequest +// - opts ...grpc.CallOption +func (_e *LaunchClient_Expecter) ListGenesisAccount(ctx interface{}, in interface{}, opts ...interface{}) *LaunchClient_ListGenesisAccount_Call { + return &LaunchClient_ListGenesisAccount_Call{Call: _e.mock.On("ListGenesisAccount", + append([]interface{}{ctx, in}, opts...)...)} +} + +func (_c *LaunchClient_ListGenesisAccount_Call) Run(run func(ctx context.Context, in *types.QueryAllGenesisAccountRequest, opts ...grpc.CallOption)) *LaunchClient_ListGenesisAccount_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]grpc.CallOption, len(args)-2) + for i, a := range args[2:] { + if a != nil { + variadicArgs[i] = a.(grpc.CallOption) + } + } + run(args[0].(context.Context), args[1].(*types.QueryAllGenesisAccountRequest), variadicArgs...) + }) + return _c +} + +func (_c *LaunchClient_ListGenesisAccount_Call) Return(_a0 *types.QueryAllGenesisAccountResponse, _a1 error) *LaunchClient_ListGenesisAccount_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *LaunchClient_ListGenesisAccount_Call) RunAndReturn(run func(context.Context, *types.QueryAllGenesisAccountRequest, ...grpc.CallOption) (*types.QueryAllGenesisAccountResponse, error)) *LaunchClient_ListGenesisAccount_Call { + _c.Call.Return(run) + return _c +} + // ListGenesisValidator provides a mock function with given fields: ctx, in, opts func (_m *LaunchClient) ListGenesisValidator(ctx context.Context, in *types.QueryAllGenesisValidatorRequest, opts ...grpc.CallOption) (*types.QueryAllGenesisValidatorResponse, error) { _va := make([]interface{}, len(opts)) @@ -259,6 +554,10 @@ func (_m *LaunchClient) ListGenesisValidator(ctx context.Context, in *types.Quer _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for ListGenesisValidator") + } + var r0 *types.QueryAllGenesisValidatorResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *types.QueryAllGenesisValidatorRequest, ...grpc.CallOption) (*types.QueryAllGenesisValidatorResponse, error)); ok { @@ -281,6 +580,43 @@ func (_m *LaunchClient) ListGenesisValidator(ctx context.Context, in *types.Quer return r0, r1 } +// LaunchClient_ListGenesisValidator_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListGenesisValidator' +type LaunchClient_ListGenesisValidator_Call struct { + *mock.Call +} + +// ListGenesisValidator is a helper method to define mock.On call +// - ctx context.Context +// - in *types.QueryAllGenesisValidatorRequest +// - opts ...grpc.CallOption +func (_e *LaunchClient_Expecter) ListGenesisValidator(ctx interface{}, in interface{}, opts ...interface{}) *LaunchClient_ListGenesisValidator_Call { + return &LaunchClient_ListGenesisValidator_Call{Call: _e.mock.On("ListGenesisValidator", + append([]interface{}{ctx, in}, opts...)...)} +} + +func (_c *LaunchClient_ListGenesisValidator_Call) Run(run func(ctx context.Context, in *types.QueryAllGenesisValidatorRequest, opts ...grpc.CallOption)) *LaunchClient_ListGenesisValidator_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]grpc.CallOption, len(args)-2) + for i, a := range args[2:] { + if a != nil { + variadicArgs[i] = a.(grpc.CallOption) + } + } + run(args[0].(context.Context), args[1].(*types.QueryAllGenesisValidatorRequest), variadicArgs...) + }) + return _c +} + +func (_c *LaunchClient_ListGenesisValidator_Call) Return(_a0 *types.QueryAllGenesisValidatorResponse, _a1 error) *LaunchClient_ListGenesisValidator_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *LaunchClient_ListGenesisValidator_Call) RunAndReturn(run func(context.Context, *types.QueryAllGenesisValidatorRequest, ...grpc.CallOption) (*types.QueryAllGenesisValidatorResponse, error)) *LaunchClient_ListGenesisValidator_Call { + _c.Call.Return(run) + return _c +} + // ListParamChange provides a mock function with given fields: ctx, in, opts func (_m *LaunchClient) ListParamChange(ctx context.Context, in *types.QueryAllParamChangeRequest, opts ...grpc.CallOption) (*types.QueryAllParamChangeResponse, error) { _va := make([]interface{}, len(opts)) @@ -292,6 +628,10 @@ func (_m *LaunchClient) ListParamChange(ctx context.Context, in *types.QueryAllP _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for ListParamChange") + } + var r0 *types.QueryAllParamChangeResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *types.QueryAllParamChangeRequest, ...grpc.CallOption) (*types.QueryAllParamChangeResponse, error)); ok { @@ -314,6 +654,43 @@ func (_m *LaunchClient) ListParamChange(ctx context.Context, in *types.QueryAllP return r0, r1 } +// LaunchClient_ListParamChange_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListParamChange' +type LaunchClient_ListParamChange_Call struct { + *mock.Call +} + +// ListParamChange is a helper method to define mock.On call +// - ctx context.Context +// - in *types.QueryAllParamChangeRequest +// - opts ...grpc.CallOption +func (_e *LaunchClient_Expecter) ListParamChange(ctx interface{}, in interface{}, opts ...interface{}) *LaunchClient_ListParamChange_Call { + return &LaunchClient_ListParamChange_Call{Call: _e.mock.On("ListParamChange", + append([]interface{}{ctx, in}, opts...)...)} +} + +func (_c *LaunchClient_ListParamChange_Call) Run(run func(ctx context.Context, in *types.QueryAllParamChangeRequest, opts ...grpc.CallOption)) *LaunchClient_ListParamChange_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]grpc.CallOption, len(args)-2) + for i, a := range args[2:] { + if a != nil { + variadicArgs[i] = a.(grpc.CallOption) + } + } + run(args[0].(context.Context), args[1].(*types.QueryAllParamChangeRequest), variadicArgs...) + }) + return _c +} + +func (_c *LaunchClient_ListParamChange_Call) Return(_a0 *types.QueryAllParamChangeResponse, _a1 error) *LaunchClient_ListParamChange_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *LaunchClient_ListParamChange_Call) RunAndReturn(run func(context.Context, *types.QueryAllParamChangeRequest, ...grpc.CallOption) (*types.QueryAllParamChangeResponse, error)) *LaunchClient_ListParamChange_Call { + _c.Call.Return(run) + return _c +} + // ListRequest provides a mock function with given fields: ctx, in, opts func (_m *LaunchClient) ListRequest(ctx context.Context, in *types.QueryAllRequestRequest, opts ...grpc.CallOption) (*types.QueryAllRequestResponse, error) { _va := make([]interface{}, len(opts)) @@ -325,6 +702,10 @@ func (_m *LaunchClient) ListRequest(ctx context.Context, in *types.QueryAllReque _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for ListRequest") + } + var r0 *types.QueryAllRequestResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *types.QueryAllRequestRequest, ...grpc.CallOption) (*types.QueryAllRequestResponse, error)); ok { @@ -347,6 +728,43 @@ func (_m *LaunchClient) ListRequest(ctx context.Context, in *types.QueryAllReque return r0, r1 } +// LaunchClient_ListRequest_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListRequest' +type LaunchClient_ListRequest_Call struct { + *mock.Call +} + +// ListRequest is a helper method to define mock.On call +// - ctx context.Context +// - in *types.QueryAllRequestRequest +// - opts ...grpc.CallOption +func (_e *LaunchClient_Expecter) ListRequest(ctx interface{}, in interface{}, opts ...interface{}) *LaunchClient_ListRequest_Call { + return &LaunchClient_ListRequest_Call{Call: _e.mock.On("ListRequest", + append([]interface{}{ctx, in}, opts...)...)} +} + +func (_c *LaunchClient_ListRequest_Call) Run(run func(ctx context.Context, in *types.QueryAllRequestRequest, opts ...grpc.CallOption)) *LaunchClient_ListRequest_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]grpc.CallOption, len(args)-2) + for i, a := range args[2:] { + if a != nil { + variadicArgs[i] = a.(grpc.CallOption) + } + } + run(args[0].(context.Context), args[1].(*types.QueryAllRequestRequest), variadicArgs...) + }) + return _c +} + +func (_c *LaunchClient_ListRequest_Call) Return(_a0 *types.QueryAllRequestResponse, _a1 error) *LaunchClient_ListRequest_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *LaunchClient_ListRequest_Call) RunAndReturn(run func(context.Context, *types.QueryAllRequestRequest, ...grpc.CallOption) (*types.QueryAllRequestResponse, error)) *LaunchClient_ListRequest_Call { + _c.Call.Return(run) + return _c +} + // ListVestingAccount provides a mock function with given fields: ctx, in, opts func (_m *LaunchClient) ListVestingAccount(ctx context.Context, in *types.QueryAllVestingAccountRequest, opts ...grpc.CallOption) (*types.QueryAllVestingAccountResponse, error) { _va := make([]interface{}, len(opts)) @@ -358,6 +776,10 @@ func (_m *LaunchClient) ListVestingAccount(ctx context.Context, in *types.QueryA _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for ListVestingAccount") + } + var r0 *types.QueryAllVestingAccountResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *types.QueryAllVestingAccountRequest, ...grpc.CallOption) (*types.QueryAllVestingAccountResponse, error)); ok { @@ -380,6 +802,43 @@ func (_m *LaunchClient) ListVestingAccount(ctx context.Context, in *types.QueryA return r0, r1 } +// LaunchClient_ListVestingAccount_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListVestingAccount' +type LaunchClient_ListVestingAccount_Call struct { + *mock.Call +} + +// ListVestingAccount is a helper method to define mock.On call +// - ctx context.Context +// - in *types.QueryAllVestingAccountRequest +// - opts ...grpc.CallOption +func (_e *LaunchClient_Expecter) ListVestingAccount(ctx interface{}, in interface{}, opts ...interface{}) *LaunchClient_ListVestingAccount_Call { + return &LaunchClient_ListVestingAccount_Call{Call: _e.mock.On("ListVestingAccount", + append([]interface{}{ctx, in}, opts...)...)} +} + +func (_c *LaunchClient_ListVestingAccount_Call) Run(run func(ctx context.Context, in *types.QueryAllVestingAccountRequest, opts ...grpc.CallOption)) *LaunchClient_ListVestingAccount_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]grpc.CallOption, len(args)-2) + for i, a := range args[2:] { + if a != nil { + variadicArgs[i] = a.(grpc.CallOption) + } + } + run(args[0].(context.Context), args[1].(*types.QueryAllVestingAccountRequest), variadicArgs...) + }) + return _c +} + +func (_c *LaunchClient_ListVestingAccount_Call) Return(_a0 *types.QueryAllVestingAccountResponse, _a1 error) *LaunchClient_ListVestingAccount_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *LaunchClient_ListVestingAccount_Call) RunAndReturn(run func(context.Context, *types.QueryAllVestingAccountRequest, ...grpc.CallOption) (*types.QueryAllVestingAccountResponse, error)) *LaunchClient_ListVestingAccount_Call { + _c.Call.Return(run) + return _c +} + // Params provides a mock function with given fields: ctx, in, opts func (_m *LaunchClient) Params(ctx context.Context, in *types.QueryParamsRequest, opts ...grpc.CallOption) (*types.QueryParamsResponse, error) { _va := make([]interface{}, len(opts)) @@ -391,6 +850,10 @@ func (_m *LaunchClient) Params(ctx context.Context, in *types.QueryParamsRequest _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for Params") + } + var r0 *types.QueryParamsResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *types.QueryParamsRequest, ...grpc.CallOption) (*types.QueryParamsResponse, error)); ok { @@ -413,13 +876,49 @@ func (_m *LaunchClient) Params(ctx context.Context, in *types.QueryParamsRequest return r0, r1 } -type mockConstructorTestingTNewLaunchClient interface { - mock.TestingT - Cleanup(func()) +// LaunchClient_Params_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Params' +type LaunchClient_Params_Call struct { + *mock.Call +} + +// Params is a helper method to define mock.On call +// - ctx context.Context +// - in *types.QueryParamsRequest +// - opts ...grpc.CallOption +func (_e *LaunchClient_Expecter) Params(ctx interface{}, in interface{}, opts ...interface{}) *LaunchClient_Params_Call { + return &LaunchClient_Params_Call{Call: _e.mock.On("Params", + append([]interface{}{ctx, in}, opts...)...)} +} + +func (_c *LaunchClient_Params_Call) Run(run func(ctx context.Context, in *types.QueryParamsRequest, opts ...grpc.CallOption)) *LaunchClient_Params_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]grpc.CallOption, len(args)-2) + for i, a := range args[2:] { + if a != nil { + variadicArgs[i] = a.(grpc.CallOption) + } + } + run(args[0].(context.Context), args[1].(*types.QueryParamsRequest), variadicArgs...) + }) + return _c +} + +func (_c *LaunchClient_Params_Call) Return(_a0 *types.QueryParamsResponse, _a1 error) *LaunchClient_Params_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *LaunchClient_Params_Call) RunAndReturn(run func(context.Context, *types.QueryParamsRequest, ...grpc.CallOption) (*types.QueryParamsResponse, error)) *LaunchClient_Params_Call { + _c.Call.Return(run) + return _c } // NewLaunchClient creates a new instance of LaunchClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewLaunchClient(t mockConstructorTestingTNewLaunchClient) *LaunchClient { +// The first argument is typically a *testing.T value. +func NewLaunchClient(t interface { + mock.TestingT + Cleanup(func()) +}) *LaunchClient { mock := &LaunchClient{} mock.Mock.Test(t) diff --git a/network/network/mocks/monitoringc_client.go b/network/network/mocks/monitoringc_client.go index 9a1c1f30..e13e7888 100644 --- a/network/network/mocks/monitoringc_client.go +++ b/network/network/mocks/monitoringc_client.go @@ -1,21 +1,30 @@ -// Code generated by mockery v2.12.2. DO NOT EDIT. +// Code generated by mockery. DO NOT EDIT. package mocks import ( - "context" - "testing" + context "context" - "github.com/ignite/network/x/monitoringc/types" - "github.com/stretchr/testify/mock" - "google.golang.org/grpc" + grpc "google.golang.org/grpc" + + mock "github.com/stretchr/testify/mock" + + types "github.com/ignite/network/x/monitoringc/types" ) -// MonitoringcClient is an autogenerated mock type for the QueryClient type +// MonitoringcClient is an autogenerated mock type for the MonitoringcClient type type MonitoringcClient struct { mock.Mock } +type MonitoringcClient_Expecter struct { + mock *mock.Mock +} + +func (_m *MonitoringcClient) EXPECT() *MonitoringcClient_Expecter { + return &MonitoringcClient_Expecter{mock: &_m.Mock} +} + // GetLaunchIDFromChannelID provides a mock function with given fields: ctx, in, opts func (_m *MonitoringcClient) GetLaunchIDFromChannelID(ctx context.Context, in *types.QueryGetLaunchIDFromChannelIDRequest, opts ...grpc.CallOption) (*types.QueryGetLaunchIDFromChannelIDResponse, error) { _va := make([]interface{}, len(opts)) @@ -27,7 +36,15 @@ func (_m *MonitoringcClient) GetLaunchIDFromChannelID(ctx context.Context, in *t _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for GetLaunchIDFromChannelID") + } + var r0 *types.QueryGetLaunchIDFromChannelIDResponse + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *types.QueryGetLaunchIDFromChannelIDRequest, ...grpc.CallOption) (*types.QueryGetLaunchIDFromChannelIDResponse, error)); ok { + return rf(ctx, in, opts...) + } if rf, ok := ret.Get(0).(func(context.Context, *types.QueryGetLaunchIDFromChannelIDRequest, ...grpc.CallOption) *types.QueryGetLaunchIDFromChannelIDResponse); ok { r0 = rf(ctx, in, opts...) } else { @@ -36,7 +53,6 @@ func (_m *MonitoringcClient) GetLaunchIDFromChannelID(ctx context.Context, in *t } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, *types.QueryGetLaunchIDFromChannelIDRequest, ...grpc.CallOption) error); ok { r1 = rf(ctx, in, opts...) } else { @@ -46,8 +62,45 @@ func (_m *MonitoringcClient) GetLaunchIDFromChannelID(ctx context.Context, in *t return r0, r1 } -// ListLaunchIDFromChannelID provides a mock function with given fields: ctx, in, opts -func (_m *MonitoringcClient) ListLaunchIDFromChannelID(ctx context.Context, in *types.QueryAllLaunchIDFromChannelIDRequest, opts ...grpc.CallOption) (*types.QueryAllLaunchIDFromChannelIDResponse, error) { +// MonitoringcClient_GetLaunchIDFromChannelID_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetLaunchIDFromChannelID' +type MonitoringcClient_GetLaunchIDFromChannelID_Call struct { + *mock.Call +} + +// GetLaunchIDFromChannelID is a helper method to define mock.On call +// - ctx context.Context +// - in *types.QueryGetLaunchIDFromChannelIDRequest +// - opts ...grpc.CallOption +func (_e *MonitoringcClient_Expecter) GetLaunchIDFromChannelID(ctx interface{}, in interface{}, opts ...interface{}) *MonitoringcClient_GetLaunchIDFromChannelID_Call { + return &MonitoringcClient_GetLaunchIDFromChannelID_Call{Call: _e.mock.On("GetLaunchIDFromChannelID", + append([]interface{}{ctx, in}, opts...)...)} +} + +func (_c *MonitoringcClient_GetLaunchIDFromChannelID_Call) Run(run func(ctx context.Context, in *types.QueryGetLaunchIDFromChannelIDRequest, opts ...grpc.CallOption)) *MonitoringcClient_GetLaunchIDFromChannelID_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]grpc.CallOption, len(args)-2) + for i, a := range args[2:] { + if a != nil { + variadicArgs[i] = a.(grpc.CallOption) + } + } + run(args[0].(context.Context), args[1].(*types.QueryGetLaunchIDFromChannelIDRequest), variadicArgs...) + }) + return _c +} + +func (_c *MonitoringcClient_GetLaunchIDFromChannelID_Call) Return(_a0 *types.QueryGetLaunchIDFromChannelIDResponse, _a1 error) *MonitoringcClient_GetLaunchIDFromChannelID_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MonitoringcClient_GetLaunchIDFromChannelID_Call) RunAndReturn(run func(context.Context, *types.QueryGetLaunchIDFromChannelIDRequest, ...grpc.CallOption) (*types.QueryGetLaunchIDFromChannelIDResponse, error)) *MonitoringcClient_GetLaunchIDFromChannelID_Call { + _c.Call.Return(run) + return _c +} + +// GetMonitoringHistory provides a mock function with given fields: ctx, in, opts +func (_m *MonitoringcClient) GetMonitoringHistory(ctx context.Context, in *types.QueryGetMonitoringHistoryRequest, opts ...grpc.CallOption) (*types.QueryGetMonitoringHistoryResponse, error) { _va := make([]interface{}, len(opts)) for _i := range opts { _va[_i] = opts[_i] @@ -57,17 +110,24 @@ func (_m *MonitoringcClient) ListLaunchIDFromChannelID(ctx context.Context, in * _ca = append(_ca, _va...) ret := _m.Called(_ca...) - var r0 *types.QueryAllLaunchIDFromChannelIDResponse - if rf, ok := ret.Get(0).(func(context.Context, *types.QueryAllLaunchIDFromChannelIDRequest, ...grpc.CallOption) *types.QueryAllLaunchIDFromChannelIDResponse); ok { + if len(ret) == 0 { + panic("no return value specified for GetMonitoringHistory") + } + + var r0 *types.QueryGetMonitoringHistoryResponse + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *types.QueryGetMonitoringHistoryRequest, ...grpc.CallOption) (*types.QueryGetMonitoringHistoryResponse, error)); ok { + return rf(ctx, in, opts...) + } + if rf, ok := ret.Get(0).(func(context.Context, *types.QueryGetMonitoringHistoryRequest, ...grpc.CallOption) *types.QueryGetMonitoringHistoryResponse); ok { r0 = rf(ctx, in, opts...) } else { if ret.Get(0) != nil { - r0 = ret.Get(0).(*types.QueryAllLaunchIDFromChannelIDResponse) + r0 = ret.Get(0).(*types.QueryGetMonitoringHistoryResponse) } } - var r1 error - if rf, ok := ret.Get(1).(func(context.Context, *types.QueryAllLaunchIDFromChannelIDRequest, ...grpc.CallOption) error); ok { + if rf, ok := ret.Get(1).(func(context.Context, *types.QueryGetMonitoringHistoryRequest, ...grpc.CallOption) error); ok { r1 = rf(ctx, in, opts...) } else { r1 = ret.Error(1) @@ -76,8 +136,45 @@ func (_m *MonitoringcClient) ListLaunchIDFromChannelID(ctx context.Context, in * return r0, r1 } -// GetMonitoringHistory provides a mock function with given fields: ctx, in, opts -func (_m *MonitoringcClient) GetMonitoringHistory(ctx context.Context, in *types.QueryGetMonitoringHistoryRequest, opts ...grpc.CallOption) (*types.QueryGetMonitoringHistoryResponse, error) { +// MonitoringcClient_GetMonitoringHistory_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetMonitoringHistory' +type MonitoringcClient_GetMonitoringHistory_Call struct { + *mock.Call +} + +// GetMonitoringHistory is a helper method to define mock.On call +// - ctx context.Context +// - in *types.QueryGetMonitoringHistoryRequest +// - opts ...grpc.CallOption +func (_e *MonitoringcClient_Expecter) GetMonitoringHistory(ctx interface{}, in interface{}, opts ...interface{}) *MonitoringcClient_GetMonitoringHistory_Call { + return &MonitoringcClient_GetMonitoringHistory_Call{Call: _e.mock.On("GetMonitoringHistory", + append([]interface{}{ctx, in}, opts...)...)} +} + +func (_c *MonitoringcClient_GetMonitoringHistory_Call) Run(run func(ctx context.Context, in *types.QueryGetMonitoringHistoryRequest, opts ...grpc.CallOption)) *MonitoringcClient_GetMonitoringHistory_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]grpc.CallOption, len(args)-2) + for i, a := range args[2:] { + if a != nil { + variadicArgs[i] = a.(grpc.CallOption) + } + } + run(args[0].(context.Context), args[1].(*types.QueryGetMonitoringHistoryRequest), variadicArgs...) + }) + return _c +} + +func (_c *MonitoringcClient_GetMonitoringHistory_Call) Return(_a0 *types.QueryGetMonitoringHistoryResponse, _a1 error) *MonitoringcClient_GetMonitoringHistory_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MonitoringcClient_GetMonitoringHistory_Call) RunAndReturn(run func(context.Context, *types.QueryGetMonitoringHistoryRequest, ...grpc.CallOption) (*types.QueryGetMonitoringHistoryResponse, error)) *MonitoringcClient_GetMonitoringHistory_Call { + _c.Call.Return(run) + return _c +} + +// GetProviderClientID provides a mock function with given fields: ctx, in, opts +func (_m *MonitoringcClient) GetProviderClientID(ctx context.Context, in *types.QueryGetProviderClientIDRequest, opts ...grpc.CallOption) (*types.QueryGetProviderClientIDResponse, error) { _va := make([]interface{}, len(opts)) for _i := range opts { _va[_i] = opts[_i] @@ -87,17 +184,24 @@ func (_m *MonitoringcClient) GetMonitoringHistory(ctx context.Context, in *types _ca = append(_ca, _va...) ret := _m.Called(_ca...) - var r0 *types.QueryGetMonitoringHistoryResponse - if rf, ok := ret.Get(0).(func(context.Context, *types.QueryGetMonitoringHistoryRequest, ...grpc.CallOption) *types.QueryGetMonitoringHistoryResponse); ok { + if len(ret) == 0 { + panic("no return value specified for GetProviderClientID") + } + + var r0 *types.QueryGetProviderClientIDResponse + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *types.QueryGetProviderClientIDRequest, ...grpc.CallOption) (*types.QueryGetProviderClientIDResponse, error)); ok { + return rf(ctx, in, opts...) + } + if rf, ok := ret.Get(0).(func(context.Context, *types.QueryGetProviderClientIDRequest, ...grpc.CallOption) *types.QueryGetProviderClientIDResponse); ok { r0 = rf(ctx, in, opts...) } else { if ret.Get(0) != nil { - r0 = ret.Get(0).(*types.QueryGetMonitoringHistoryResponse) + r0 = ret.Get(0).(*types.QueryGetProviderClientIDResponse) } } - var r1 error - if rf, ok := ret.Get(1).(func(context.Context, *types.QueryGetMonitoringHistoryRequest, ...grpc.CallOption) error); ok { + if rf, ok := ret.Get(1).(func(context.Context, *types.QueryGetProviderClientIDRequest, ...grpc.CallOption) error); ok { r1 = rf(ctx, in, opts...) } else { r1 = ret.Error(1) @@ -106,8 +210,45 @@ func (_m *MonitoringcClient) GetMonitoringHistory(ctx context.Context, in *types return r0, r1 } -// Params provides a mock function with given fields: ctx, in, opts -func (_m *MonitoringcClient) Params(ctx context.Context, in *types.QueryParamsRequest, opts ...grpc.CallOption) (*types.QueryParamsResponse, error) { +// MonitoringcClient_GetProviderClientID_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetProviderClientID' +type MonitoringcClient_GetProviderClientID_Call struct { + *mock.Call +} + +// GetProviderClientID is a helper method to define mock.On call +// - ctx context.Context +// - in *types.QueryGetProviderClientIDRequest +// - opts ...grpc.CallOption +func (_e *MonitoringcClient_Expecter) GetProviderClientID(ctx interface{}, in interface{}, opts ...interface{}) *MonitoringcClient_GetProviderClientID_Call { + return &MonitoringcClient_GetProviderClientID_Call{Call: _e.mock.On("GetProviderClientID", + append([]interface{}{ctx, in}, opts...)...)} +} + +func (_c *MonitoringcClient_GetProviderClientID_Call) Run(run func(ctx context.Context, in *types.QueryGetProviderClientIDRequest, opts ...grpc.CallOption)) *MonitoringcClient_GetProviderClientID_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]grpc.CallOption, len(args)-2) + for i, a := range args[2:] { + if a != nil { + variadicArgs[i] = a.(grpc.CallOption) + } + } + run(args[0].(context.Context), args[1].(*types.QueryGetProviderClientIDRequest), variadicArgs...) + }) + return _c +} + +func (_c *MonitoringcClient_GetProviderClientID_Call) Return(_a0 *types.QueryGetProviderClientIDResponse, _a1 error) *MonitoringcClient_GetProviderClientID_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MonitoringcClient_GetProviderClientID_Call) RunAndReturn(run func(context.Context, *types.QueryGetProviderClientIDRequest, ...grpc.CallOption) (*types.QueryGetProviderClientIDResponse, error)) *MonitoringcClient_GetProviderClientID_Call { + _c.Call.Return(run) + return _c +} + +// GetVerifiedClientID provides a mock function with given fields: ctx, in, opts +func (_m *MonitoringcClient) GetVerifiedClientID(ctx context.Context, in *types.QueryGetVerifiedClientIDRequest, opts ...grpc.CallOption) (*types.QueryGetVerifiedClientIDResponse, error) { _va := make([]interface{}, len(opts)) for _i := range opts { _va[_i] = opts[_i] @@ -117,17 +258,24 @@ func (_m *MonitoringcClient) Params(ctx context.Context, in *types.QueryParamsRe _ca = append(_ca, _va...) ret := _m.Called(_ca...) - var r0 *types.QueryParamsResponse - if rf, ok := ret.Get(0).(func(context.Context, *types.QueryParamsRequest, ...grpc.CallOption) *types.QueryParamsResponse); ok { + if len(ret) == 0 { + panic("no return value specified for GetVerifiedClientID") + } + + var r0 *types.QueryGetVerifiedClientIDResponse + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *types.QueryGetVerifiedClientIDRequest, ...grpc.CallOption) (*types.QueryGetVerifiedClientIDResponse, error)); ok { + return rf(ctx, in, opts...) + } + if rf, ok := ret.Get(0).(func(context.Context, *types.QueryGetVerifiedClientIDRequest, ...grpc.CallOption) *types.QueryGetVerifiedClientIDResponse); ok { r0 = rf(ctx, in, opts...) } else { if ret.Get(0) != nil { - r0 = ret.Get(0).(*types.QueryParamsResponse) + r0 = ret.Get(0).(*types.QueryGetVerifiedClientIDResponse) } } - var r1 error - if rf, ok := ret.Get(1).(func(context.Context, *types.QueryParamsRequest, ...grpc.CallOption) error); ok { + if rf, ok := ret.Get(1).(func(context.Context, *types.QueryGetVerifiedClientIDRequest, ...grpc.CallOption) error); ok { r1 = rf(ctx, in, opts...) } else { r1 = ret.Error(1) @@ -136,8 +284,45 @@ func (_m *MonitoringcClient) Params(ctx context.Context, in *types.QueryParamsRe return r0, r1 } -// GetProviderClientID provides a mock function with given fields: ctx, in, opts -func (_m *MonitoringcClient) GetProviderClientID(ctx context.Context, in *types.QueryGetProviderClientIDRequest, opts ...grpc.CallOption) (*types.QueryGetProviderClientIDResponse, error) { +// MonitoringcClient_GetVerifiedClientID_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetVerifiedClientID' +type MonitoringcClient_GetVerifiedClientID_Call struct { + *mock.Call +} + +// GetVerifiedClientID is a helper method to define mock.On call +// - ctx context.Context +// - in *types.QueryGetVerifiedClientIDRequest +// - opts ...grpc.CallOption +func (_e *MonitoringcClient_Expecter) GetVerifiedClientID(ctx interface{}, in interface{}, opts ...interface{}) *MonitoringcClient_GetVerifiedClientID_Call { + return &MonitoringcClient_GetVerifiedClientID_Call{Call: _e.mock.On("GetVerifiedClientID", + append([]interface{}{ctx, in}, opts...)...)} +} + +func (_c *MonitoringcClient_GetVerifiedClientID_Call) Run(run func(ctx context.Context, in *types.QueryGetVerifiedClientIDRequest, opts ...grpc.CallOption)) *MonitoringcClient_GetVerifiedClientID_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]grpc.CallOption, len(args)-2) + for i, a := range args[2:] { + if a != nil { + variadicArgs[i] = a.(grpc.CallOption) + } + } + run(args[0].(context.Context), args[1].(*types.QueryGetVerifiedClientIDRequest), variadicArgs...) + }) + return _c +} + +func (_c *MonitoringcClient_GetVerifiedClientID_Call) Return(_a0 *types.QueryGetVerifiedClientIDResponse, _a1 error) *MonitoringcClient_GetVerifiedClientID_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MonitoringcClient_GetVerifiedClientID_Call) RunAndReturn(run func(context.Context, *types.QueryGetVerifiedClientIDRequest, ...grpc.CallOption) (*types.QueryGetVerifiedClientIDResponse, error)) *MonitoringcClient_GetVerifiedClientID_Call { + _c.Call.Return(run) + return _c +} + +// ListLaunchIDFromChannelID provides a mock function with given fields: ctx, in, opts +func (_m *MonitoringcClient) ListLaunchIDFromChannelID(ctx context.Context, in *types.QueryAllLaunchIDFromChannelIDRequest, opts ...grpc.CallOption) (*types.QueryAllLaunchIDFromChannelIDResponse, error) { _va := make([]interface{}, len(opts)) for _i := range opts { _va[_i] = opts[_i] @@ -147,17 +332,24 @@ func (_m *MonitoringcClient) GetProviderClientID(ctx context.Context, in *types. _ca = append(_ca, _va...) ret := _m.Called(_ca...) - var r0 *types.QueryGetProviderClientIDResponse - if rf, ok := ret.Get(0).(func(context.Context, *types.QueryGetProviderClientIDRequest, ...grpc.CallOption) *types.QueryGetProviderClientIDResponse); ok { + if len(ret) == 0 { + panic("no return value specified for ListLaunchIDFromChannelID") + } + + var r0 *types.QueryAllLaunchIDFromChannelIDResponse + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *types.QueryAllLaunchIDFromChannelIDRequest, ...grpc.CallOption) (*types.QueryAllLaunchIDFromChannelIDResponse, error)); ok { + return rf(ctx, in, opts...) + } + if rf, ok := ret.Get(0).(func(context.Context, *types.QueryAllLaunchIDFromChannelIDRequest, ...grpc.CallOption) *types.QueryAllLaunchIDFromChannelIDResponse); ok { r0 = rf(ctx, in, opts...) } else { if ret.Get(0) != nil { - r0 = ret.Get(0).(*types.QueryGetProviderClientIDResponse) + r0 = ret.Get(0).(*types.QueryAllLaunchIDFromChannelIDResponse) } } - var r1 error - if rf, ok := ret.Get(1).(func(context.Context, *types.QueryGetProviderClientIDRequest, ...grpc.CallOption) error); ok { + if rf, ok := ret.Get(1).(func(context.Context, *types.QueryAllLaunchIDFromChannelIDRequest, ...grpc.CallOption) error); ok { r1 = rf(ctx, in, opts...) } else { r1 = ret.Error(1) @@ -166,6 +358,43 @@ func (_m *MonitoringcClient) GetProviderClientID(ctx context.Context, in *types. return r0, r1 } +// MonitoringcClient_ListLaunchIDFromChannelID_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListLaunchIDFromChannelID' +type MonitoringcClient_ListLaunchIDFromChannelID_Call struct { + *mock.Call +} + +// ListLaunchIDFromChannelID is a helper method to define mock.On call +// - ctx context.Context +// - in *types.QueryAllLaunchIDFromChannelIDRequest +// - opts ...grpc.CallOption +func (_e *MonitoringcClient_Expecter) ListLaunchIDFromChannelID(ctx interface{}, in interface{}, opts ...interface{}) *MonitoringcClient_ListLaunchIDFromChannelID_Call { + return &MonitoringcClient_ListLaunchIDFromChannelID_Call{Call: _e.mock.On("ListLaunchIDFromChannelID", + append([]interface{}{ctx, in}, opts...)...)} +} + +func (_c *MonitoringcClient_ListLaunchIDFromChannelID_Call) Run(run func(ctx context.Context, in *types.QueryAllLaunchIDFromChannelIDRequest, opts ...grpc.CallOption)) *MonitoringcClient_ListLaunchIDFromChannelID_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]grpc.CallOption, len(args)-2) + for i, a := range args[2:] { + if a != nil { + variadicArgs[i] = a.(grpc.CallOption) + } + } + run(args[0].(context.Context), args[1].(*types.QueryAllLaunchIDFromChannelIDRequest), variadicArgs...) + }) + return _c +} + +func (_c *MonitoringcClient_ListLaunchIDFromChannelID_Call) Return(_a0 *types.QueryAllLaunchIDFromChannelIDResponse, _a1 error) *MonitoringcClient_ListLaunchIDFromChannelID_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MonitoringcClient_ListLaunchIDFromChannelID_Call) RunAndReturn(run func(context.Context, *types.QueryAllLaunchIDFromChannelIDRequest, ...grpc.CallOption) (*types.QueryAllLaunchIDFromChannelIDResponse, error)) *MonitoringcClient_ListLaunchIDFromChannelID_Call { + _c.Call.Return(run) + return _c +} + // ListProviderClientID provides a mock function with given fields: ctx, in, opts func (_m *MonitoringcClient) ListProviderClientID(ctx context.Context, in *types.QueryAllProviderClientIDRequest, opts ...grpc.CallOption) (*types.QueryAllProviderClientIDResponse, error) { _va := make([]interface{}, len(opts)) @@ -177,7 +406,15 @@ func (_m *MonitoringcClient) ListProviderClientID(ctx context.Context, in *types _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for ListProviderClientID") + } + var r0 *types.QueryAllProviderClientIDResponse + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *types.QueryAllProviderClientIDRequest, ...grpc.CallOption) (*types.QueryAllProviderClientIDResponse, error)); ok { + return rf(ctx, in, opts...) + } if rf, ok := ret.Get(0).(func(context.Context, *types.QueryAllProviderClientIDRequest, ...grpc.CallOption) *types.QueryAllProviderClientIDResponse); ok { r0 = rf(ctx, in, opts...) } else { @@ -186,7 +423,6 @@ func (_m *MonitoringcClient) ListProviderClientID(ctx context.Context, in *types } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, *types.QueryAllProviderClientIDRequest, ...grpc.CallOption) error); ok { r1 = rf(ctx, in, opts...) } else { @@ -196,8 +432,45 @@ func (_m *MonitoringcClient) ListProviderClientID(ctx context.Context, in *types return r0, r1 } -// GetVerifiedClientID provides a mock function with given fields: ctx, in, opts -func (_m *MonitoringcClient) GetVerifiedClientID(ctx context.Context, in *types.QueryGetVerifiedClientIDRequest, opts ...grpc.CallOption) (*types.QueryGetVerifiedClientIDResponse, error) { +// MonitoringcClient_ListProviderClientID_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListProviderClientID' +type MonitoringcClient_ListProviderClientID_Call struct { + *mock.Call +} + +// ListProviderClientID is a helper method to define mock.On call +// - ctx context.Context +// - in *types.QueryAllProviderClientIDRequest +// - opts ...grpc.CallOption +func (_e *MonitoringcClient_Expecter) ListProviderClientID(ctx interface{}, in interface{}, opts ...interface{}) *MonitoringcClient_ListProviderClientID_Call { + return &MonitoringcClient_ListProviderClientID_Call{Call: _e.mock.On("ListProviderClientID", + append([]interface{}{ctx, in}, opts...)...)} +} + +func (_c *MonitoringcClient_ListProviderClientID_Call) Run(run func(ctx context.Context, in *types.QueryAllProviderClientIDRequest, opts ...grpc.CallOption)) *MonitoringcClient_ListProviderClientID_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]grpc.CallOption, len(args)-2) + for i, a := range args[2:] { + if a != nil { + variadicArgs[i] = a.(grpc.CallOption) + } + } + run(args[0].(context.Context), args[1].(*types.QueryAllProviderClientIDRequest), variadicArgs...) + }) + return _c +} + +func (_c *MonitoringcClient_ListProviderClientID_Call) Return(_a0 *types.QueryAllProviderClientIDResponse, _a1 error) *MonitoringcClient_ListProviderClientID_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MonitoringcClient_ListProviderClientID_Call) RunAndReturn(run func(context.Context, *types.QueryAllProviderClientIDRequest, ...grpc.CallOption) (*types.QueryAllProviderClientIDResponse, error)) *MonitoringcClient_ListProviderClientID_Call { + _c.Call.Return(run) + return _c +} + +// Params provides a mock function with given fields: ctx, in, opts +func (_m *MonitoringcClient) Params(ctx context.Context, in *types.QueryParamsRequest, opts ...grpc.CallOption) (*types.QueryParamsResponse, error) { _va := make([]interface{}, len(opts)) for _i := range opts { _va[_i] = opts[_i] @@ -207,17 +480,24 @@ func (_m *MonitoringcClient) GetVerifiedClientID(ctx context.Context, in *types. _ca = append(_ca, _va...) ret := _m.Called(_ca...) - var r0 *types.QueryGetVerifiedClientIDResponse - if rf, ok := ret.Get(0).(func(context.Context, *types.QueryGetVerifiedClientIDRequest, ...grpc.CallOption) *types.QueryGetVerifiedClientIDResponse); ok { + if len(ret) == 0 { + panic("no return value specified for Params") + } + + var r0 *types.QueryParamsResponse + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *types.QueryParamsRequest, ...grpc.CallOption) (*types.QueryParamsResponse, error)); ok { + return rf(ctx, in, opts...) + } + if rf, ok := ret.Get(0).(func(context.Context, *types.QueryParamsRequest, ...grpc.CallOption) *types.QueryParamsResponse); ok { r0 = rf(ctx, in, opts...) } else { if ret.Get(0) != nil { - r0 = ret.Get(0).(*types.QueryGetVerifiedClientIDResponse) + r0 = ret.Get(0).(*types.QueryParamsResponse) } } - var r1 error - if rf, ok := ret.Get(1).(func(context.Context, *types.QueryGetVerifiedClientIDRequest, ...grpc.CallOption) error); ok { + if rf, ok := ret.Get(1).(func(context.Context, *types.QueryParamsRequest, ...grpc.CallOption) error); ok { r1 = rf(ctx, in, opts...) } else { r1 = ret.Error(1) @@ -226,8 +506,49 @@ func (_m *MonitoringcClient) GetVerifiedClientID(ctx context.Context, in *types. return r0, r1 } -// NewMonitoringcClient creates a new instance of MonitoringcClient. It also registers the testing.TB interface on the mock and a cleanup function to assert the mocks expectations. -func NewMonitoringcClient(t testing.TB) *MonitoringcClient { +// MonitoringcClient_Params_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Params' +type MonitoringcClient_Params_Call struct { + *mock.Call +} + +// Params is a helper method to define mock.On call +// - ctx context.Context +// - in *types.QueryParamsRequest +// - opts ...grpc.CallOption +func (_e *MonitoringcClient_Expecter) Params(ctx interface{}, in interface{}, opts ...interface{}) *MonitoringcClient_Params_Call { + return &MonitoringcClient_Params_Call{Call: _e.mock.On("Params", + append([]interface{}{ctx, in}, opts...)...)} +} + +func (_c *MonitoringcClient_Params_Call) Run(run func(ctx context.Context, in *types.QueryParamsRequest, opts ...grpc.CallOption)) *MonitoringcClient_Params_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]grpc.CallOption, len(args)-2) + for i, a := range args[2:] { + if a != nil { + variadicArgs[i] = a.(grpc.CallOption) + } + } + run(args[0].(context.Context), args[1].(*types.QueryParamsRequest), variadicArgs...) + }) + return _c +} + +func (_c *MonitoringcClient_Params_Call) Return(_a0 *types.QueryParamsResponse, _a1 error) *MonitoringcClient_Params_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MonitoringcClient_Params_Call) RunAndReturn(run func(context.Context, *types.QueryParamsRequest, ...grpc.CallOption) (*types.QueryParamsResponse, error)) *MonitoringcClient_Params_Call { + _c.Call.Return(run) + return _c +} + +// NewMonitoringcClient creates a new instance of MonitoringcClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func NewMonitoringcClient(t interface { + mock.TestingT + Cleanup(func()) +}) *MonitoringcClient { mock := &MonitoringcClient{} mock.Mock.Test(t) diff --git a/network/network/mocks/monitoringp_client.go b/network/network/mocks/monitoringp_client.go index 72fd2c67..756db240 100644 --- a/network/network/mocks/monitoringp_client.go +++ b/network/network/mocks/monitoringp_client.go @@ -1,22 +1,32 @@ -// Code generated by mockery v2.12.3. DO NOT EDIT. +// Code generated by mockery. DO NOT EDIT. package mocks import ( - "context" + context "context" - "github.com/ignite/network/x/monitoringp/types" - "github.com/stretchr/testify/mock" - "google.golang.org/grpc" + grpc "google.golang.org/grpc" + + mock "github.com/stretchr/testify/mock" + + types "github.com/ignite/network/x/monitoringp/types" ) -// MonitoringpClient is an autogenerated mock type for the QueryClient type +// MonitoringpClient is an autogenerated mock type for the MonitoringpClient type type MonitoringpClient struct { mock.Mock } -// ConnectionChannelID provides a mock function with given fields: ctx, in, opts -func (_m *MonitoringpClient) ConnectionChannelID(ctx context.Context, in *types.QueryGetConnectionChannelIDRequest, opts ...grpc.CallOption) (*types.QueryGetConnectionChannelIDResponse, error) { +type MonitoringpClient_Expecter struct { + mock *mock.Mock +} + +func (_m *MonitoringpClient) EXPECT() *MonitoringpClient_Expecter { + return &MonitoringpClient_Expecter{mock: &_m.Mock} +} + +// GetConnectionChannelID provides a mock function with given fields: ctx, in, opts +func (_m *MonitoringpClient) GetConnectionChannelID(ctx context.Context, in *types.QueryGetConnectionChannelIDRequest, opts ...grpc.CallOption) (*types.QueryGetConnectionChannelIDResponse, error) { _va := make([]interface{}, len(opts)) for _i := range opts { _va[_i] = opts[_i] @@ -26,7 +36,15 @@ func (_m *MonitoringpClient) ConnectionChannelID(ctx context.Context, in *types. _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for GetConnectionChannelID") + } + var r0 *types.QueryGetConnectionChannelIDResponse + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *types.QueryGetConnectionChannelIDRequest, ...grpc.CallOption) (*types.QueryGetConnectionChannelIDResponse, error)); ok { + return rf(ctx, in, opts...) + } if rf, ok := ret.Get(0).(func(context.Context, *types.QueryGetConnectionChannelIDRequest, ...grpc.CallOption) *types.QueryGetConnectionChannelIDResponse); ok { r0 = rf(ctx, in, opts...) } else { @@ -35,7 +53,6 @@ func (_m *MonitoringpClient) ConnectionChannelID(ctx context.Context, in *types. } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, *types.QueryGetConnectionChannelIDRequest, ...grpc.CallOption) error); ok { r1 = rf(ctx, in, opts...) } else { @@ -45,8 +62,45 @@ func (_m *MonitoringpClient) ConnectionChannelID(ctx context.Context, in *types. return r0, r1 } -// ConsumerClientID provides a mock function with given fields: ctx, in, opts -func (_m *MonitoringpClient) ConsumerClientID(ctx context.Context, in *types.QueryGetConsumerClientIDRequest, opts ...grpc.CallOption) (*types.QueryGetConsumerClientIDResponse, error) { +// MonitoringpClient_GetConnectionChannelID_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetConnectionChannelID' +type MonitoringpClient_GetConnectionChannelID_Call struct { + *mock.Call +} + +// GetConnectionChannelID is a helper method to define mock.On call +// - ctx context.Context +// - in *types.QueryGetConnectionChannelIDRequest +// - opts ...grpc.CallOption +func (_e *MonitoringpClient_Expecter) GetConnectionChannelID(ctx interface{}, in interface{}, opts ...interface{}) *MonitoringpClient_GetConnectionChannelID_Call { + return &MonitoringpClient_GetConnectionChannelID_Call{Call: _e.mock.On("GetConnectionChannelID", + append([]interface{}{ctx, in}, opts...)...)} +} + +func (_c *MonitoringpClient_GetConnectionChannelID_Call) Run(run func(ctx context.Context, in *types.QueryGetConnectionChannelIDRequest, opts ...grpc.CallOption)) *MonitoringpClient_GetConnectionChannelID_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]grpc.CallOption, len(args)-2) + for i, a := range args[2:] { + if a != nil { + variadicArgs[i] = a.(grpc.CallOption) + } + } + run(args[0].(context.Context), args[1].(*types.QueryGetConnectionChannelIDRequest), variadicArgs...) + }) + return _c +} + +func (_c *MonitoringpClient_GetConnectionChannelID_Call) Return(_a0 *types.QueryGetConnectionChannelIDResponse, _a1 error) *MonitoringpClient_GetConnectionChannelID_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MonitoringpClient_GetConnectionChannelID_Call) RunAndReturn(run func(context.Context, *types.QueryGetConnectionChannelIDRequest, ...grpc.CallOption) (*types.QueryGetConnectionChannelIDResponse, error)) *MonitoringpClient_GetConnectionChannelID_Call { + _c.Call.Return(run) + return _c +} + +// GetConsumerClientID provides a mock function with given fields: ctx, in, opts +func (_m *MonitoringpClient) GetConsumerClientID(ctx context.Context, in *types.QueryGetConsumerClientIDRequest, opts ...grpc.CallOption) (*types.QueryGetConsumerClientIDResponse, error) { _va := make([]interface{}, len(opts)) for _i := range opts { _va[_i] = opts[_i] @@ -56,7 +110,15 @@ func (_m *MonitoringpClient) ConsumerClientID(ctx context.Context, in *types.Que _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for GetConsumerClientID") + } + var r0 *types.QueryGetConsumerClientIDResponse + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *types.QueryGetConsumerClientIDRequest, ...grpc.CallOption) (*types.QueryGetConsumerClientIDResponse, error)); ok { + return rf(ctx, in, opts...) + } if rf, ok := ret.Get(0).(func(context.Context, *types.QueryGetConsumerClientIDRequest, ...grpc.CallOption) *types.QueryGetConsumerClientIDResponse); ok { r0 = rf(ctx, in, opts...) } else { @@ -65,7 +127,6 @@ func (_m *MonitoringpClient) ConsumerClientID(ctx context.Context, in *types.Que } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, *types.QueryGetConsumerClientIDRequest, ...grpc.CallOption) error); ok { r1 = rf(ctx, in, opts...) } else { @@ -75,8 +136,45 @@ func (_m *MonitoringpClient) ConsumerClientID(ctx context.Context, in *types.Que return r0, r1 } -// MonitoringInfo provides a mock function with given fields: ctx, in, opts -func (_m *MonitoringpClient) MonitoringInfo(ctx context.Context, in *types.QueryGetMonitoringInfoRequest, opts ...grpc.CallOption) (*types.QueryGetMonitoringInfoResponse, error) { +// MonitoringpClient_GetConsumerClientID_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetConsumerClientID' +type MonitoringpClient_GetConsumerClientID_Call struct { + *mock.Call +} + +// GetConsumerClientID is a helper method to define mock.On call +// - ctx context.Context +// - in *types.QueryGetConsumerClientIDRequest +// - opts ...grpc.CallOption +func (_e *MonitoringpClient_Expecter) GetConsumerClientID(ctx interface{}, in interface{}, opts ...interface{}) *MonitoringpClient_GetConsumerClientID_Call { + return &MonitoringpClient_GetConsumerClientID_Call{Call: _e.mock.On("GetConsumerClientID", + append([]interface{}{ctx, in}, opts...)...)} +} + +func (_c *MonitoringpClient_GetConsumerClientID_Call) Run(run func(ctx context.Context, in *types.QueryGetConsumerClientIDRequest, opts ...grpc.CallOption)) *MonitoringpClient_GetConsumerClientID_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]grpc.CallOption, len(args)-2) + for i, a := range args[2:] { + if a != nil { + variadicArgs[i] = a.(grpc.CallOption) + } + } + run(args[0].(context.Context), args[1].(*types.QueryGetConsumerClientIDRequest), variadicArgs...) + }) + return _c +} + +func (_c *MonitoringpClient_GetConsumerClientID_Call) Return(_a0 *types.QueryGetConsumerClientIDResponse, _a1 error) *MonitoringpClient_GetConsumerClientID_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MonitoringpClient_GetConsumerClientID_Call) RunAndReturn(run func(context.Context, *types.QueryGetConsumerClientIDRequest, ...grpc.CallOption) (*types.QueryGetConsumerClientIDResponse, error)) *MonitoringpClient_GetConsumerClientID_Call { + _c.Call.Return(run) + return _c +} + +// GetMonitoringInfo provides a mock function with given fields: ctx, in, opts +func (_m *MonitoringpClient) GetMonitoringInfo(ctx context.Context, in *types.QueryGetMonitoringInfoRequest, opts ...grpc.CallOption) (*types.QueryGetMonitoringInfoResponse, error) { _va := make([]interface{}, len(opts)) for _i := range opts { _va[_i] = opts[_i] @@ -86,7 +184,15 @@ func (_m *MonitoringpClient) MonitoringInfo(ctx context.Context, in *types.Query _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for GetMonitoringInfo") + } + var r0 *types.QueryGetMonitoringInfoResponse + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *types.QueryGetMonitoringInfoRequest, ...grpc.CallOption) (*types.QueryGetMonitoringInfoResponse, error)); ok { + return rf(ctx, in, opts...) + } if rf, ok := ret.Get(0).(func(context.Context, *types.QueryGetMonitoringInfoRequest, ...grpc.CallOption) *types.QueryGetMonitoringInfoResponse); ok { r0 = rf(ctx, in, opts...) } else { @@ -95,7 +201,6 @@ func (_m *MonitoringpClient) MonitoringInfo(ctx context.Context, in *types.Query } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, *types.QueryGetMonitoringInfoRequest, ...grpc.CallOption) error); ok { r1 = rf(ctx, in, opts...) } else { @@ -105,6 +210,43 @@ func (_m *MonitoringpClient) MonitoringInfo(ctx context.Context, in *types.Query return r0, r1 } +// MonitoringpClient_GetMonitoringInfo_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetMonitoringInfo' +type MonitoringpClient_GetMonitoringInfo_Call struct { + *mock.Call +} + +// GetMonitoringInfo is a helper method to define mock.On call +// - ctx context.Context +// - in *types.QueryGetMonitoringInfoRequest +// - opts ...grpc.CallOption +func (_e *MonitoringpClient_Expecter) GetMonitoringInfo(ctx interface{}, in interface{}, opts ...interface{}) *MonitoringpClient_GetMonitoringInfo_Call { + return &MonitoringpClient_GetMonitoringInfo_Call{Call: _e.mock.On("GetMonitoringInfo", + append([]interface{}{ctx, in}, opts...)...)} +} + +func (_c *MonitoringpClient_GetMonitoringInfo_Call) Run(run func(ctx context.Context, in *types.QueryGetMonitoringInfoRequest, opts ...grpc.CallOption)) *MonitoringpClient_GetMonitoringInfo_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]grpc.CallOption, len(args)-2) + for i, a := range args[2:] { + if a != nil { + variadicArgs[i] = a.(grpc.CallOption) + } + } + run(args[0].(context.Context), args[1].(*types.QueryGetMonitoringInfoRequest), variadicArgs...) + }) + return _c +} + +func (_c *MonitoringpClient_GetMonitoringInfo_Call) Return(_a0 *types.QueryGetMonitoringInfoResponse, _a1 error) *MonitoringpClient_GetMonitoringInfo_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MonitoringpClient_GetMonitoringInfo_Call) RunAndReturn(run func(context.Context, *types.QueryGetMonitoringInfoRequest, ...grpc.CallOption) (*types.QueryGetMonitoringInfoResponse, error)) *MonitoringpClient_GetMonitoringInfo_Call { + _c.Call.Return(run) + return _c +} + // Params provides a mock function with given fields: ctx, in, opts func (_m *MonitoringpClient) Params(ctx context.Context, in *types.QueryParamsRequest, opts ...grpc.CallOption) (*types.QueryParamsResponse, error) { _va := make([]interface{}, len(opts)) @@ -116,7 +258,15 @@ func (_m *MonitoringpClient) Params(ctx context.Context, in *types.QueryParamsRe _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for Params") + } + var r0 *types.QueryParamsResponse + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *types.QueryParamsRequest, ...grpc.CallOption) (*types.QueryParamsResponse, error)); ok { + return rf(ctx, in, opts...) + } if rf, ok := ret.Get(0).(func(context.Context, *types.QueryParamsRequest, ...grpc.CallOption) *types.QueryParamsResponse); ok { r0 = rf(ctx, in, opts...) } else { @@ -125,7 +275,6 @@ func (_m *MonitoringpClient) Params(ctx context.Context, in *types.QueryParamsRe } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, *types.QueryParamsRequest, ...grpc.CallOption) error); ok { r1 = rf(ctx, in, opts...) } else { @@ -135,13 +284,49 @@ func (_m *MonitoringpClient) Params(ctx context.Context, in *types.QueryParamsRe return r0, r1 } -type NewMonitoringpClientT interface { - mock.TestingT - Cleanup(func()) +// MonitoringpClient_Params_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Params' +type MonitoringpClient_Params_Call struct { + *mock.Call +} + +// Params is a helper method to define mock.On call +// - ctx context.Context +// - in *types.QueryParamsRequest +// - opts ...grpc.CallOption +func (_e *MonitoringpClient_Expecter) Params(ctx interface{}, in interface{}, opts ...interface{}) *MonitoringpClient_Params_Call { + return &MonitoringpClient_Params_Call{Call: _e.mock.On("Params", + append([]interface{}{ctx, in}, opts...)...)} +} + +func (_c *MonitoringpClient_Params_Call) Run(run func(ctx context.Context, in *types.QueryParamsRequest, opts ...grpc.CallOption)) *MonitoringpClient_Params_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]grpc.CallOption, len(args)-2) + for i, a := range args[2:] { + if a != nil { + variadicArgs[i] = a.(grpc.CallOption) + } + } + run(args[0].(context.Context), args[1].(*types.QueryParamsRequest), variadicArgs...) + }) + return _c +} + +func (_c *MonitoringpClient_Params_Call) Return(_a0 *types.QueryParamsResponse, _a1 error) *MonitoringpClient_Params_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MonitoringpClient_Params_Call) RunAndReturn(run func(context.Context, *types.QueryParamsRequest, ...grpc.CallOption) (*types.QueryParamsResponse, error)) *MonitoringpClient_Params_Call { + _c.Call.Return(run) + return _c } // NewMonitoringpClient creates a new instance of MonitoringpClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewMonitoringpClient(t NewMonitoringpClientT) *MonitoringpClient { +// The first argument is typically a *testing.T value. +func NewMonitoringpClient(t interface { + mock.TestingT + Cleanup(func()) +}) *MonitoringpClient { mock := &MonitoringpClient{} mock.Mock.Test(t) diff --git a/network/network/mocks/profile_client.go b/network/network/mocks/profile_client.go index 31bec00a..8d59681c 100644 --- a/network/network/mocks/profile_client.go +++ b/network/network/mocks/profile_client.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.27.1. DO NOT EDIT. +// Code generated by mockery. DO NOT EDIT. package mocks @@ -17,6 +17,14 @@ type ProfileClient struct { mock.Mock } +type ProfileClient_Expecter struct { + mock *mock.Mock +} + +func (_m *ProfileClient) EXPECT() *ProfileClient_Expecter { + return &ProfileClient_Expecter{mock: &_m.Mock} +} + // GetCoordinator provides a mock function with given fields: ctx, in, opts func (_m *ProfileClient) GetCoordinator(ctx context.Context, in *types.QueryGetCoordinatorRequest, opts ...grpc.CallOption) (*types.QueryGetCoordinatorResponse, error) { _va := make([]interface{}, len(opts)) @@ -28,6 +36,10 @@ func (_m *ProfileClient) GetCoordinator(ctx context.Context, in *types.QueryGetC _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for GetCoordinator") + } + var r0 *types.QueryGetCoordinatorResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *types.QueryGetCoordinatorRequest, ...grpc.CallOption) (*types.QueryGetCoordinatorResponse, error)); ok { @@ -50,6 +62,43 @@ func (_m *ProfileClient) GetCoordinator(ctx context.Context, in *types.QueryGetC return r0, r1 } +// ProfileClient_GetCoordinator_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetCoordinator' +type ProfileClient_GetCoordinator_Call struct { + *mock.Call +} + +// GetCoordinator is a helper method to define mock.On call +// - ctx context.Context +// - in *types.QueryGetCoordinatorRequest +// - opts ...grpc.CallOption +func (_e *ProfileClient_Expecter) GetCoordinator(ctx interface{}, in interface{}, opts ...interface{}) *ProfileClient_GetCoordinator_Call { + return &ProfileClient_GetCoordinator_Call{Call: _e.mock.On("GetCoordinator", + append([]interface{}{ctx, in}, opts...)...)} +} + +func (_c *ProfileClient_GetCoordinator_Call) Run(run func(ctx context.Context, in *types.QueryGetCoordinatorRequest, opts ...grpc.CallOption)) *ProfileClient_GetCoordinator_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]grpc.CallOption, len(args)-2) + for i, a := range args[2:] { + if a != nil { + variadicArgs[i] = a.(grpc.CallOption) + } + } + run(args[0].(context.Context), args[1].(*types.QueryGetCoordinatorRequest), variadicArgs...) + }) + return _c +} + +func (_c *ProfileClient_GetCoordinator_Call) Return(_a0 *types.QueryGetCoordinatorResponse, _a1 error) *ProfileClient_GetCoordinator_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *ProfileClient_GetCoordinator_Call) RunAndReturn(run func(context.Context, *types.QueryGetCoordinatorRequest, ...grpc.CallOption) (*types.QueryGetCoordinatorResponse, error)) *ProfileClient_GetCoordinator_Call { + _c.Call.Return(run) + return _c +} + // GetCoordinatorByAddress provides a mock function with given fields: ctx, in, opts func (_m *ProfileClient) GetCoordinatorByAddress(ctx context.Context, in *types.QueryGetCoordinatorByAddressRequest, opts ...grpc.CallOption) (*types.QueryGetCoordinatorByAddressResponse, error) { _va := make([]interface{}, len(opts)) @@ -61,6 +110,10 @@ func (_m *ProfileClient) GetCoordinatorByAddress(ctx context.Context, in *types. _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for GetCoordinatorByAddress") + } + var r0 *types.QueryGetCoordinatorByAddressResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *types.QueryGetCoordinatorByAddressRequest, ...grpc.CallOption) (*types.QueryGetCoordinatorByAddressResponse, error)); ok { @@ -83,6 +136,43 @@ func (_m *ProfileClient) GetCoordinatorByAddress(ctx context.Context, in *types. return r0, r1 } +// ProfileClient_GetCoordinatorByAddress_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetCoordinatorByAddress' +type ProfileClient_GetCoordinatorByAddress_Call struct { + *mock.Call +} + +// GetCoordinatorByAddress is a helper method to define mock.On call +// - ctx context.Context +// - in *types.QueryGetCoordinatorByAddressRequest +// - opts ...grpc.CallOption +func (_e *ProfileClient_Expecter) GetCoordinatorByAddress(ctx interface{}, in interface{}, opts ...interface{}) *ProfileClient_GetCoordinatorByAddress_Call { + return &ProfileClient_GetCoordinatorByAddress_Call{Call: _e.mock.On("GetCoordinatorByAddress", + append([]interface{}{ctx, in}, opts...)...)} +} + +func (_c *ProfileClient_GetCoordinatorByAddress_Call) Run(run func(ctx context.Context, in *types.QueryGetCoordinatorByAddressRequest, opts ...grpc.CallOption)) *ProfileClient_GetCoordinatorByAddress_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]grpc.CallOption, len(args)-2) + for i, a := range args[2:] { + if a != nil { + variadicArgs[i] = a.(grpc.CallOption) + } + } + run(args[0].(context.Context), args[1].(*types.QueryGetCoordinatorByAddressRequest), variadicArgs...) + }) + return _c +} + +func (_c *ProfileClient_GetCoordinatorByAddress_Call) Return(_a0 *types.QueryGetCoordinatorByAddressResponse, _a1 error) *ProfileClient_GetCoordinatorByAddress_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *ProfileClient_GetCoordinatorByAddress_Call) RunAndReturn(run func(context.Context, *types.QueryGetCoordinatorByAddressRequest, ...grpc.CallOption) (*types.QueryGetCoordinatorByAddressResponse, error)) *ProfileClient_GetCoordinatorByAddress_Call { + _c.Call.Return(run) + return _c +} + // GetValidator provides a mock function with given fields: ctx, in, opts func (_m *ProfileClient) GetValidator(ctx context.Context, in *types.QueryGetValidatorRequest, opts ...grpc.CallOption) (*types.QueryGetValidatorResponse, error) { _va := make([]interface{}, len(opts)) @@ -94,6 +184,10 @@ func (_m *ProfileClient) GetValidator(ctx context.Context, in *types.QueryGetVal _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for GetValidator") + } + var r0 *types.QueryGetValidatorResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *types.QueryGetValidatorRequest, ...grpc.CallOption) (*types.QueryGetValidatorResponse, error)); ok { @@ -116,6 +210,43 @@ func (_m *ProfileClient) GetValidator(ctx context.Context, in *types.QueryGetVal return r0, r1 } +// ProfileClient_GetValidator_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetValidator' +type ProfileClient_GetValidator_Call struct { + *mock.Call +} + +// GetValidator is a helper method to define mock.On call +// - ctx context.Context +// - in *types.QueryGetValidatorRequest +// - opts ...grpc.CallOption +func (_e *ProfileClient_Expecter) GetValidator(ctx interface{}, in interface{}, opts ...interface{}) *ProfileClient_GetValidator_Call { + return &ProfileClient_GetValidator_Call{Call: _e.mock.On("GetValidator", + append([]interface{}{ctx, in}, opts...)...)} +} + +func (_c *ProfileClient_GetValidator_Call) Run(run func(ctx context.Context, in *types.QueryGetValidatorRequest, opts ...grpc.CallOption)) *ProfileClient_GetValidator_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]grpc.CallOption, len(args)-2) + for i, a := range args[2:] { + if a != nil { + variadicArgs[i] = a.(grpc.CallOption) + } + } + run(args[0].(context.Context), args[1].(*types.QueryGetValidatorRequest), variadicArgs...) + }) + return _c +} + +func (_c *ProfileClient_GetValidator_Call) Return(_a0 *types.QueryGetValidatorResponse, _a1 error) *ProfileClient_GetValidator_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *ProfileClient_GetValidator_Call) RunAndReturn(run func(context.Context, *types.QueryGetValidatorRequest, ...grpc.CallOption) (*types.QueryGetValidatorResponse, error)) *ProfileClient_GetValidator_Call { + _c.Call.Return(run) + return _c +} + // GetValidatorByOperatorAddress provides a mock function with given fields: ctx, in, opts func (_m *ProfileClient) GetValidatorByOperatorAddress(ctx context.Context, in *types.QueryGetValidatorByOperatorAddressRequest, opts ...grpc.CallOption) (*types.QueryGetValidatorByOperatorAddressResponse, error) { _va := make([]interface{}, len(opts)) @@ -127,6 +258,10 @@ func (_m *ProfileClient) GetValidatorByOperatorAddress(ctx context.Context, in * _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for GetValidatorByOperatorAddress") + } + var r0 *types.QueryGetValidatorByOperatorAddressResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *types.QueryGetValidatorByOperatorAddressRequest, ...grpc.CallOption) (*types.QueryGetValidatorByOperatorAddressResponse, error)); ok { @@ -149,6 +284,43 @@ func (_m *ProfileClient) GetValidatorByOperatorAddress(ctx context.Context, in * return r0, r1 } +// ProfileClient_GetValidatorByOperatorAddress_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetValidatorByOperatorAddress' +type ProfileClient_GetValidatorByOperatorAddress_Call struct { + *mock.Call +} + +// GetValidatorByOperatorAddress is a helper method to define mock.On call +// - ctx context.Context +// - in *types.QueryGetValidatorByOperatorAddressRequest +// - opts ...grpc.CallOption +func (_e *ProfileClient_Expecter) GetValidatorByOperatorAddress(ctx interface{}, in interface{}, opts ...interface{}) *ProfileClient_GetValidatorByOperatorAddress_Call { + return &ProfileClient_GetValidatorByOperatorAddress_Call{Call: _e.mock.On("GetValidatorByOperatorAddress", + append([]interface{}{ctx, in}, opts...)...)} +} + +func (_c *ProfileClient_GetValidatorByOperatorAddress_Call) Run(run func(ctx context.Context, in *types.QueryGetValidatorByOperatorAddressRequest, opts ...grpc.CallOption)) *ProfileClient_GetValidatorByOperatorAddress_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]grpc.CallOption, len(args)-2) + for i, a := range args[2:] { + if a != nil { + variadicArgs[i] = a.(grpc.CallOption) + } + } + run(args[0].(context.Context), args[1].(*types.QueryGetValidatorByOperatorAddressRequest), variadicArgs...) + }) + return _c +} + +func (_c *ProfileClient_GetValidatorByOperatorAddress_Call) Return(_a0 *types.QueryGetValidatorByOperatorAddressResponse, _a1 error) *ProfileClient_GetValidatorByOperatorAddress_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *ProfileClient_GetValidatorByOperatorAddress_Call) RunAndReturn(run func(context.Context, *types.QueryGetValidatorByOperatorAddressRequest, ...grpc.CallOption) (*types.QueryGetValidatorByOperatorAddressResponse, error)) *ProfileClient_GetValidatorByOperatorAddress_Call { + _c.Call.Return(run) + return _c +} + // ListCoordinator provides a mock function with given fields: ctx, in, opts func (_m *ProfileClient) ListCoordinator(ctx context.Context, in *types.QueryAllCoordinatorRequest, opts ...grpc.CallOption) (*types.QueryAllCoordinatorResponse, error) { _va := make([]interface{}, len(opts)) @@ -160,6 +332,10 @@ func (_m *ProfileClient) ListCoordinator(ctx context.Context, in *types.QueryAll _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for ListCoordinator") + } + var r0 *types.QueryAllCoordinatorResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *types.QueryAllCoordinatorRequest, ...grpc.CallOption) (*types.QueryAllCoordinatorResponse, error)); ok { @@ -182,6 +358,43 @@ func (_m *ProfileClient) ListCoordinator(ctx context.Context, in *types.QueryAll return r0, r1 } +// ProfileClient_ListCoordinator_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListCoordinator' +type ProfileClient_ListCoordinator_Call struct { + *mock.Call +} + +// ListCoordinator is a helper method to define mock.On call +// - ctx context.Context +// - in *types.QueryAllCoordinatorRequest +// - opts ...grpc.CallOption +func (_e *ProfileClient_Expecter) ListCoordinator(ctx interface{}, in interface{}, opts ...interface{}) *ProfileClient_ListCoordinator_Call { + return &ProfileClient_ListCoordinator_Call{Call: _e.mock.On("ListCoordinator", + append([]interface{}{ctx, in}, opts...)...)} +} + +func (_c *ProfileClient_ListCoordinator_Call) Run(run func(ctx context.Context, in *types.QueryAllCoordinatorRequest, opts ...grpc.CallOption)) *ProfileClient_ListCoordinator_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]grpc.CallOption, len(args)-2) + for i, a := range args[2:] { + if a != nil { + variadicArgs[i] = a.(grpc.CallOption) + } + } + run(args[0].(context.Context), args[1].(*types.QueryAllCoordinatorRequest), variadicArgs...) + }) + return _c +} + +func (_c *ProfileClient_ListCoordinator_Call) Return(_a0 *types.QueryAllCoordinatorResponse, _a1 error) *ProfileClient_ListCoordinator_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *ProfileClient_ListCoordinator_Call) RunAndReturn(run func(context.Context, *types.QueryAllCoordinatorRequest, ...grpc.CallOption) (*types.QueryAllCoordinatorResponse, error)) *ProfileClient_ListCoordinator_Call { + _c.Call.Return(run) + return _c +} + // ListValidator provides a mock function with given fields: ctx, in, opts func (_m *ProfileClient) ListValidator(ctx context.Context, in *types.QueryAllValidatorRequest, opts ...grpc.CallOption) (*types.QueryAllValidatorResponse, error) { _va := make([]interface{}, len(opts)) @@ -193,6 +406,10 @@ func (_m *ProfileClient) ListValidator(ctx context.Context, in *types.QueryAllVa _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for ListValidator") + } + var r0 *types.QueryAllValidatorResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *types.QueryAllValidatorRequest, ...grpc.CallOption) (*types.QueryAllValidatorResponse, error)); ok { @@ -215,6 +432,43 @@ func (_m *ProfileClient) ListValidator(ctx context.Context, in *types.QueryAllVa return r0, r1 } +// ProfileClient_ListValidator_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListValidator' +type ProfileClient_ListValidator_Call struct { + *mock.Call +} + +// ListValidator is a helper method to define mock.On call +// - ctx context.Context +// - in *types.QueryAllValidatorRequest +// - opts ...grpc.CallOption +func (_e *ProfileClient_Expecter) ListValidator(ctx interface{}, in interface{}, opts ...interface{}) *ProfileClient_ListValidator_Call { + return &ProfileClient_ListValidator_Call{Call: _e.mock.On("ListValidator", + append([]interface{}{ctx, in}, opts...)...)} +} + +func (_c *ProfileClient_ListValidator_Call) Run(run func(ctx context.Context, in *types.QueryAllValidatorRequest, opts ...grpc.CallOption)) *ProfileClient_ListValidator_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]grpc.CallOption, len(args)-2) + for i, a := range args[2:] { + if a != nil { + variadicArgs[i] = a.(grpc.CallOption) + } + } + run(args[0].(context.Context), args[1].(*types.QueryAllValidatorRequest), variadicArgs...) + }) + return _c +} + +func (_c *ProfileClient_ListValidator_Call) Return(_a0 *types.QueryAllValidatorResponse, _a1 error) *ProfileClient_ListValidator_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *ProfileClient_ListValidator_Call) RunAndReturn(run func(context.Context, *types.QueryAllValidatorRequest, ...grpc.CallOption) (*types.QueryAllValidatorResponse, error)) *ProfileClient_ListValidator_Call { + _c.Call.Return(run) + return _c +} + // Params provides a mock function with given fields: ctx, in, opts func (_m *ProfileClient) Params(ctx context.Context, in *types.QueryParamsRequest, opts ...grpc.CallOption) (*types.QueryParamsResponse, error) { _va := make([]interface{}, len(opts)) @@ -226,6 +480,10 @@ func (_m *ProfileClient) Params(ctx context.Context, in *types.QueryParamsReques _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for Params") + } + var r0 *types.QueryParamsResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *types.QueryParamsRequest, ...grpc.CallOption) (*types.QueryParamsResponse, error)); ok { @@ -248,13 +506,49 @@ func (_m *ProfileClient) Params(ctx context.Context, in *types.QueryParamsReques return r0, r1 } -type mockConstructorTestingTNewProfileClient interface { - mock.TestingT - Cleanup(func()) +// ProfileClient_Params_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Params' +type ProfileClient_Params_Call struct { + *mock.Call +} + +// Params is a helper method to define mock.On call +// - ctx context.Context +// - in *types.QueryParamsRequest +// - opts ...grpc.CallOption +func (_e *ProfileClient_Expecter) Params(ctx interface{}, in interface{}, opts ...interface{}) *ProfileClient_Params_Call { + return &ProfileClient_Params_Call{Call: _e.mock.On("Params", + append([]interface{}{ctx, in}, opts...)...)} +} + +func (_c *ProfileClient_Params_Call) Run(run func(ctx context.Context, in *types.QueryParamsRequest, opts ...grpc.CallOption)) *ProfileClient_Params_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]grpc.CallOption, len(args)-2) + for i, a := range args[2:] { + if a != nil { + variadicArgs[i] = a.(grpc.CallOption) + } + } + run(args[0].(context.Context), args[1].(*types.QueryParamsRequest), variadicArgs...) + }) + return _c +} + +func (_c *ProfileClient_Params_Call) Return(_a0 *types.QueryParamsResponse, _a1 error) *ProfileClient_Params_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *ProfileClient_Params_Call) RunAndReturn(run func(context.Context, *types.QueryParamsRequest, ...grpc.CallOption) (*types.QueryParamsResponse, error)) *ProfileClient_Params_Call { + _c.Call.Return(run) + return _c } // NewProfileClient creates a new instance of ProfileClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewProfileClient(t mockConstructorTestingTNewProfileClient) *ProfileClient { +// The first argument is typically a *testing.T value. +func NewProfileClient(t interface { + mock.TestingT + Cleanup(func()) +}) *ProfileClient { mock := &ProfileClient{} mock.Mock.Test(t) diff --git a/network/network/mocks/project_client.go b/network/network/mocks/project_client.go index bf2cff8d..02120128 100644 --- a/network/network/mocks/project_client.go +++ b/network/network/mocks/project_client.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.27.1. DO NOT EDIT. +// Code generated by mockery. DO NOT EDIT. package mocks @@ -17,6 +17,14 @@ type ProjectClient struct { mock.Mock } +type ProjectClient_Expecter struct { + mock *mock.Mock +} + +func (_m *ProjectClient) EXPECT() *ProjectClient_Expecter { + return &ProjectClient_Expecter{mock: &_m.Mock} +} + // GetMainnetAccount provides a mock function with given fields: ctx, in, opts func (_m *ProjectClient) GetMainnetAccount(ctx context.Context, in *types.QueryGetMainnetAccountRequest, opts ...grpc.CallOption) (*types.QueryGetMainnetAccountResponse, error) { _va := make([]interface{}, len(opts)) @@ -28,6 +36,10 @@ func (_m *ProjectClient) GetMainnetAccount(ctx context.Context, in *types.QueryG _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for GetMainnetAccount") + } + var r0 *types.QueryGetMainnetAccountResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *types.QueryGetMainnetAccountRequest, ...grpc.CallOption) (*types.QueryGetMainnetAccountResponse, error)); ok { @@ -50,6 +62,43 @@ func (_m *ProjectClient) GetMainnetAccount(ctx context.Context, in *types.QueryG return r0, r1 } +// ProjectClient_GetMainnetAccount_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetMainnetAccount' +type ProjectClient_GetMainnetAccount_Call struct { + *mock.Call +} + +// GetMainnetAccount is a helper method to define mock.On call +// - ctx context.Context +// - in *types.QueryGetMainnetAccountRequest +// - opts ...grpc.CallOption +func (_e *ProjectClient_Expecter) GetMainnetAccount(ctx interface{}, in interface{}, opts ...interface{}) *ProjectClient_GetMainnetAccount_Call { + return &ProjectClient_GetMainnetAccount_Call{Call: _e.mock.On("GetMainnetAccount", + append([]interface{}{ctx, in}, opts...)...)} +} + +func (_c *ProjectClient_GetMainnetAccount_Call) Run(run func(ctx context.Context, in *types.QueryGetMainnetAccountRequest, opts ...grpc.CallOption)) *ProjectClient_GetMainnetAccount_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]grpc.CallOption, len(args)-2) + for i, a := range args[2:] { + if a != nil { + variadicArgs[i] = a.(grpc.CallOption) + } + } + run(args[0].(context.Context), args[1].(*types.QueryGetMainnetAccountRequest), variadicArgs...) + }) + return _c +} + +func (_c *ProjectClient_GetMainnetAccount_Call) Return(_a0 *types.QueryGetMainnetAccountResponse, _a1 error) *ProjectClient_GetMainnetAccount_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *ProjectClient_GetMainnetAccount_Call) RunAndReturn(run func(context.Context, *types.QueryGetMainnetAccountRequest, ...grpc.CallOption) (*types.QueryGetMainnetAccountResponse, error)) *ProjectClient_GetMainnetAccount_Call { + _c.Call.Return(run) + return _c +} + // GetProject provides a mock function with given fields: ctx, in, opts func (_m *ProjectClient) GetProject(ctx context.Context, in *types.QueryGetProjectRequest, opts ...grpc.CallOption) (*types.QueryGetProjectResponse, error) { _va := make([]interface{}, len(opts)) @@ -61,6 +110,10 @@ func (_m *ProjectClient) GetProject(ctx context.Context, in *types.QueryGetProje _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for GetProject") + } + var r0 *types.QueryGetProjectResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *types.QueryGetProjectRequest, ...grpc.CallOption) (*types.QueryGetProjectResponse, error)); ok { @@ -83,6 +136,43 @@ func (_m *ProjectClient) GetProject(ctx context.Context, in *types.QueryGetProje return r0, r1 } +// ProjectClient_GetProject_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetProject' +type ProjectClient_GetProject_Call struct { + *mock.Call +} + +// GetProject is a helper method to define mock.On call +// - ctx context.Context +// - in *types.QueryGetProjectRequest +// - opts ...grpc.CallOption +func (_e *ProjectClient_Expecter) GetProject(ctx interface{}, in interface{}, opts ...interface{}) *ProjectClient_GetProject_Call { + return &ProjectClient_GetProject_Call{Call: _e.mock.On("GetProject", + append([]interface{}{ctx, in}, opts...)...)} +} + +func (_c *ProjectClient_GetProject_Call) Run(run func(ctx context.Context, in *types.QueryGetProjectRequest, opts ...grpc.CallOption)) *ProjectClient_GetProject_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]grpc.CallOption, len(args)-2) + for i, a := range args[2:] { + if a != nil { + variadicArgs[i] = a.(grpc.CallOption) + } + } + run(args[0].(context.Context), args[1].(*types.QueryGetProjectRequest), variadicArgs...) + }) + return _c +} + +func (_c *ProjectClient_GetProject_Call) Return(_a0 *types.QueryGetProjectResponse, _a1 error) *ProjectClient_GetProject_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *ProjectClient_GetProject_Call) RunAndReturn(run func(context.Context, *types.QueryGetProjectRequest, ...grpc.CallOption) (*types.QueryGetProjectResponse, error)) *ProjectClient_GetProject_Call { + _c.Call.Return(run) + return _c +} + // GetProjectChains provides a mock function with given fields: ctx, in, opts func (_m *ProjectClient) GetProjectChains(ctx context.Context, in *types.QueryGetProjectChainsRequest, opts ...grpc.CallOption) (*types.QueryGetProjectChainsResponse, error) { _va := make([]interface{}, len(opts)) @@ -94,6 +184,10 @@ func (_m *ProjectClient) GetProjectChains(ctx context.Context, in *types.QueryGe _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for GetProjectChains") + } + var r0 *types.QueryGetProjectChainsResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *types.QueryGetProjectChainsRequest, ...grpc.CallOption) (*types.QueryGetProjectChainsResponse, error)); ok { @@ -116,6 +210,43 @@ func (_m *ProjectClient) GetProjectChains(ctx context.Context, in *types.QueryGe return r0, r1 } +// ProjectClient_GetProjectChains_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetProjectChains' +type ProjectClient_GetProjectChains_Call struct { + *mock.Call +} + +// GetProjectChains is a helper method to define mock.On call +// - ctx context.Context +// - in *types.QueryGetProjectChainsRequest +// - opts ...grpc.CallOption +func (_e *ProjectClient_Expecter) GetProjectChains(ctx interface{}, in interface{}, opts ...interface{}) *ProjectClient_GetProjectChains_Call { + return &ProjectClient_GetProjectChains_Call{Call: _e.mock.On("GetProjectChains", + append([]interface{}{ctx, in}, opts...)...)} +} + +func (_c *ProjectClient_GetProjectChains_Call) Run(run func(ctx context.Context, in *types.QueryGetProjectChainsRequest, opts ...grpc.CallOption)) *ProjectClient_GetProjectChains_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]grpc.CallOption, len(args)-2) + for i, a := range args[2:] { + if a != nil { + variadicArgs[i] = a.(grpc.CallOption) + } + } + run(args[0].(context.Context), args[1].(*types.QueryGetProjectChainsRequest), variadicArgs...) + }) + return _c +} + +func (_c *ProjectClient_GetProjectChains_Call) Return(_a0 *types.QueryGetProjectChainsResponse, _a1 error) *ProjectClient_GetProjectChains_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *ProjectClient_GetProjectChains_Call) RunAndReturn(run func(context.Context, *types.QueryGetProjectChainsRequest, ...grpc.CallOption) (*types.QueryGetProjectChainsResponse, error)) *ProjectClient_GetProjectChains_Call { + _c.Call.Return(run) + return _c +} + // ListMainnetAccount provides a mock function with given fields: ctx, in, opts func (_m *ProjectClient) ListMainnetAccount(ctx context.Context, in *types.QueryAllMainnetAccountRequest, opts ...grpc.CallOption) (*types.QueryAllMainnetAccountResponse, error) { _va := make([]interface{}, len(opts)) @@ -127,6 +258,10 @@ func (_m *ProjectClient) ListMainnetAccount(ctx context.Context, in *types.Query _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for ListMainnetAccount") + } + var r0 *types.QueryAllMainnetAccountResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *types.QueryAllMainnetAccountRequest, ...grpc.CallOption) (*types.QueryAllMainnetAccountResponse, error)); ok { @@ -149,6 +284,43 @@ func (_m *ProjectClient) ListMainnetAccount(ctx context.Context, in *types.Query return r0, r1 } +// ProjectClient_ListMainnetAccount_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListMainnetAccount' +type ProjectClient_ListMainnetAccount_Call struct { + *mock.Call +} + +// ListMainnetAccount is a helper method to define mock.On call +// - ctx context.Context +// - in *types.QueryAllMainnetAccountRequest +// - opts ...grpc.CallOption +func (_e *ProjectClient_Expecter) ListMainnetAccount(ctx interface{}, in interface{}, opts ...interface{}) *ProjectClient_ListMainnetAccount_Call { + return &ProjectClient_ListMainnetAccount_Call{Call: _e.mock.On("ListMainnetAccount", + append([]interface{}{ctx, in}, opts...)...)} +} + +func (_c *ProjectClient_ListMainnetAccount_Call) Run(run func(ctx context.Context, in *types.QueryAllMainnetAccountRequest, opts ...grpc.CallOption)) *ProjectClient_ListMainnetAccount_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]grpc.CallOption, len(args)-2) + for i, a := range args[2:] { + if a != nil { + variadicArgs[i] = a.(grpc.CallOption) + } + } + run(args[0].(context.Context), args[1].(*types.QueryAllMainnetAccountRequest), variadicArgs...) + }) + return _c +} + +func (_c *ProjectClient_ListMainnetAccount_Call) Return(_a0 *types.QueryAllMainnetAccountResponse, _a1 error) *ProjectClient_ListMainnetAccount_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *ProjectClient_ListMainnetAccount_Call) RunAndReturn(run func(context.Context, *types.QueryAllMainnetAccountRequest, ...grpc.CallOption) (*types.QueryAllMainnetAccountResponse, error)) *ProjectClient_ListMainnetAccount_Call { + _c.Call.Return(run) + return _c +} + // ListMainnetAccountBalance provides a mock function with given fields: ctx, in, opts func (_m *ProjectClient) ListMainnetAccountBalance(ctx context.Context, in *types.QueryListMainnetAccountBalanceRequest, opts ...grpc.CallOption) (*types.QueryListMainnetAccountBalanceResponse, error) { _va := make([]interface{}, len(opts)) @@ -160,6 +332,10 @@ func (_m *ProjectClient) ListMainnetAccountBalance(ctx context.Context, in *type _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for ListMainnetAccountBalance") + } + var r0 *types.QueryListMainnetAccountBalanceResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *types.QueryListMainnetAccountBalanceRequest, ...grpc.CallOption) (*types.QueryListMainnetAccountBalanceResponse, error)); ok { @@ -182,6 +358,43 @@ func (_m *ProjectClient) ListMainnetAccountBalance(ctx context.Context, in *type return r0, r1 } +// ProjectClient_ListMainnetAccountBalance_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListMainnetAccountBalance' +type ProjectClient_ListMainnetAccountBalance_Call struct { + *mock.Call +} + +// ListMainnetAccountBalance is a helper method to define mock.On call +// - ctx context.Context +// - in *types.QueryListMainnetAccountBalanceRequest +// - opts ...grpc.CallOption +func (_e *ProjectClient_Expecter) ListMainnetAccountBalance(ctx interface{}, in interface{}, opts ...interface{}) *ProjectClient_ListMainnetAccountBalance_Call { + return &ProjectClient_ListMainnetAccountBalance_Call{Call: _e.mock.On("ListMainnetAccountBalance", + append([]interface{}{ctx, in}, opts...)...)} +} + +func (_c *ProjectClient_ListMainnetAccountBalance_Call) Run(run func(ctx context.Context, in *types.QueryListMainnetAccountBalanceRequest, opts ...grpc.CallOption)) *ProjectClient_ListMainnetAccountBalance_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]grpc.CallOption, len(args)-2) + for i, a := range args[2:] { + if a != nil { + variadicArgs[i] = a.(grpc.CallOption) + } + } + run(args[0].(context.Context), args[1].(*types.QueryListMainnetAccountBalanceRequest), variadicArgs...) + }) + return _c +} + +func (_c *ProjectClient_ListMainnetAccountBalance_Call) Return(_a0 *types.QueryListMainnetAccountBalanceResponse, _a1 error) *ProjectClient_ListMainnetAccountBalance_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *ProjectClient_ListMainnetAccountBalance_Call) RunAndReturn(run func(context.Context, *types.QueryListMainnetAccountBalanceRequest, ...grpc.CallOption) (*types.QueryListMainnetAccountBalanceResponse, error)) *ProjectClient_ListMainnetAccountBalance_Call { + _c.Call.Return(run) + return _c +} + // ListProject provides a mock function with given fields: ctx, in, opts func (_m *ProjectClient) ListProject(ctx context.Context, in *types.QueryAllProjectRequest, opts ...grpc.CallOption) (*types.QueryAllProjectResponse, error) { _va := make([]interface{}, len(opts)) @@ -193,6 +406,10 @@ func (_m *ProjectClient) ListProject(ctx context.Context, in *types.QueryAllProj _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for ListProject") + } + var r0 *types.QueryAllProjectResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *types.QueryAllProjectRequest, ...grpc.CallOption) (*types.QueryAllProjectResponse, error)); ok { @@ -215,6 +432,43 @@ func (_m *ProjectClient) ListProject(ctx context.Context, in *types.QueryAllProj return r0, r1 } +// ProjectClient_ListProject_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListProject' +type ProjectClient_ListProject_Call struct { + *mock.Call +} + +// ListProject is a helper method to define mock.On call +// - ctx context.Context +// - in *types.QueryAllProjectRequest +// - opts ...grpc.CallOption +func (_e *ProjectClient_Expecter) ListProject(ctx interface{}, in interface{}, opts ...interface{}) *ProjectClient_ListProject_Call { + return &ProjectClient_ListProject_Call{Call: _e.mock.On("ListProject", + append([]interface{}{ctx, in}, opts...)...)} +} + +func (_c *ProjectClient_ListProject_Call) Run(run func(ctx context.Context, in *types.QueryAllProjectRequest, opts ...grpc.CallOption)) *ProjectClient_ListProject_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]grpc.CallOption, len(args)-2) + for i, a := range args[2:] { + if a != nil { + variadicArgs[i] = a.(grpc.CallOption) + } + } + run(args[0].(context.Context), args[1].(*types.QueryAllProjectRequest), variadicArgs...) + }) + return _c +} + +func (_c *ProjectClient_ListProject_Call) Return(_a0 *types.QueryAllProjectResponse, _a1 error) *ProjectClient_ListProject_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *ProjectClient_ListProject_Call) RunAndReturn(run func(context.Context, *types.QueryAllProjectRequest, ...grpc.CallOption) (*types.QueryAllProjectResponse, error)) *ProjectClient_ListProject_Call { + _c.Call.Return(run) + return _c +} + // MainnetAccountBalance provides a mock function with given fields: ctx, in, opts func (_m *ProjectClient) MainnetAccountBalance(ctx context.Context, in *types.QueryMainnetAccountBalanceRequest, opts ...grpc.CallOption) (*types.QueryMainnetAccountBalanceResponse, error) { _va := make([]interface{}, len(opts)) @@ -226,6 +480,10 @@ func (_m *ProjectClient) MainnetAccountBalance(ctx context.Context, in *types.Qu _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for MainnetAccountBalance") + } + var r0 *types.QueryMainnetAccountBalanceResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *types.QueryMainnetAccountBalanceRequest, ...grpc.CallOption) (*types.QueryMainnetAccountBalanceResponse, error)); ok { @@ -248,6 +506,43 @@ func (_m *ProjectClient) MainnetAccountBalance(ctx context.Context, in *types.Qu return r0, r1 } +// ProjectClient_MainnetAccountBalance_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'MainnetAccountBalance' +type ProjectClient_MainnetAccountBalance_Call struct { + *mock.Call +} + +// MainnetAccountBalance is a helper method to define mock.On call +// - ctx context.Context +// - in *types.QueryMainnetAccountBalanceRequest +// - opts ...grpc.CallOption +func (_e *ProjectClient_Expecter) MainnetAccountBalance(ctx interface{}, in interface{}, opts ...interface{}) *ProjectClient_MainnetAccountBalance_Call { + return &ProjectClient_MainnetAccountBalance_Call{Call: _e.mock.On("MainnetAccountBalance", + append([]interface{}{ctx, in}, opts...)...)} +} + +func (_c *ProjectClient_MainnetAccountBalance_Call) Run(run func(ctx context.Context, in *types.QueryMainnetAccountBalanceRequest, opts ...grpc.CallOption)) *ProjectClient_MainnetAccountBalance_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]grpc.CallOption, len(args)-2) + for i, a := range args[2:] { + if a != nil { + variadicArgs[i] = a.(grpc.CallOption) + } + } + run(args[0].(context.Context), args[1].(*types.QueryMainnetAccountBalanceRequest), variadicArgs...) + }) + return _c +} + +func (_c *ProjectClient_MainnetAccountBalance_Call) Return(_a0 *types.QueryMainnetAccountBalanceResponse, _a1 error) *ProjectClient_MainnetAccountBalance_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *ProjectClient_MainnetAccountBalance_Call) RunAndReturn(run func(context.Context, *types.QueryMainnetAccountBalanceRequest, ...grpc.CallOption) (*types.QueryMainnetAccountBalanceResponse, error)) *ProjectClient_MainnetAccountBalance_Call { + _c.Call.Return(run) + return _c +} + // Params provides a mock function with given fields: ctx, in, opts func (_m *ProjectClient) Params(ctx context.Context, in *types.QueryParamsRequest, opts ...grpc.CallOption) (*types.QueryParamsResponse, error) { _va := make([]interface{}, len(opts)) @@ -259,6 +554,10 @@ func (_m *ProjectClient) Params(ctx context.Context, in *types.QueryParamsReques _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for Params") + } + var r0 *types.QueryParamsResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *types.QueryParamsRequest, ...grpc.CallOption) (*types.QueryParamsResponse, error)); ok { @@ -281,6 +580,43 @@ func (_m *ProjectClient) Params(ctx context.Context, in *types.QueryParamsReques return r0, r1 } +// ProjectClient_Params_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Params' +type ProjectClient_Params_Call struct { + *mock.Call +} + +// Params is a helper method to define mock.On call +// - ctx context.Context +// - in *types.QueryParamsRequest +// - opts ...grpc.CallOption +func (_e *ProjectClient_Expecter) Params(ctx interface{}, in interface{}, opts ...interface{}) *ProjectClient_Params_Call { + return &ProjectClient_Params_Call{Call: _e.mock.On("Params", + append([]interface{}{ctx, in}, opts...)...)} +} + +func (_c *ProjectClient_Params_Call) Run(run func(ctx context.Context, in *types.QueryParamsRequest, opts ...grpc.CallOption)) *ProjectClient_Params_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]grpc.CallOption, len(args)-2) + for i, a := range args[2:] { + if a != nil { + variadicArgs[i] = a.(grpc.CallOption) + } + } + run(args[0].(context.Context), args[1].(*types.QueryParamsRequest), variadicArgs...) + }) + return _c +} + +func (_c *ProjectClient_Params_Call) Return(_a0 *types.QueryParamsResponse, _a1 error) *ProjectClient_Params_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *ProjectClient_Params_Call) RunAndReturn(run func(context.Context, *types.QueryParamsRequest, ...grpc.CallOption) (*types.QueryParamsResponse, error)) *ProjectClient_Params_Call { + _c.Call.Return(run) + return _c +} + // SpecialAllocationsBalance provides a mock function with given fields: ctx, in, opts func (_m *ProjectClient) SpecialAllocationsBalance(ctx context.Context, in *types.QuerySpecialAllocationsBalanceRequest, opts ...grpc.CallOption) (*types.QuerySpecialAllocationsBalanceResponse, error) { _va := make([]interface{}, len(opts)) @@ -292,6 +628,10 @@ func (_m *ProjectClient) SpecialAllocationsBalance(ctx context.Context, in *type _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for SpecialAllocationsBalance") + } + var r0 *types.QuerySpecialAllocationsBalanceResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *types.QuerySpecialAllocationsBalanceRequest, ...grpc.CallOption) (*types.QuerySpecialAllocationsBalanceResponse, error)); ok { @@ -314,6 +654,43 @@ func (_m *ProjectClient) SpecialAllocationsBalance(ctx context.Context, in *type return r0, r1 } +// ProjectClient_SpecialAllocationsBalance_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SpecialAllocationsBalance' +type ProjectClient_SpecialAllocationsBalance_Call struct { + *mock.Call +} + +// SpecialAllocationsBalance is a helper method to define mock.On call +// - ctx context.Context +// - in *types.QuerySpecialAllocationsBalanceRequest +// - opts ...grpc.CallOption +func (_e *ProjectClient_Expecter) SpecialAllocationsBalance(ctx interface{}, in interface{}, opts ...interface{}) *ProjectClient_SpecialAllocationsBalance_Call { + return &ProjectClient_SpecialAllocationsBalance_Call{Call: _e.mock.On("SpecialAllocationsBalance", + append([]interface{}{ctx, in}, opts...)...)} +} + +func (_c *ProjectClient_SpecialAllocationsBalance_Call) Run(run func(ctx context.Context, in *types.QuerySpecialAllocationsBalanceRequest, opts ...grpc.CallOption)) *ProjectClient_SpecialAllocationsBalance_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]grpc.CallOption, len(args)-2) + for i, a := range args[2:] { + if a != nil { + variadicArgs[i] = a.(grpc.CallOption) + } + } + run(args[0].(context.Context), args[1].(*types.QuerySpecialAllocationsBalanceRequest), variadicArgs...) + }) + return _c +} + +func (_c *ProjectClient_SpecialAllocationsBalance_Call) Return(_a0 *types.QuerySpecialAllocationsBalanceResponse, _a1 error) *ProjectClient_SpecialAllocationsBalance_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *ProjectClient_SpecialAllocationsBalance_Call) RunAndReturn(run func(context.Context, *types.QuerySpecialAllocationsBalanceRequest, ...grpc.CallOption) (*types.QuerySpecialAllocationsBalanceResponse, error)) *ProjectClient_SpecialAllocationsBalance_Call { + _c.Call.Return(run) + return _c +} + // TotalShares provides a mock function with given fields: ctx, in, opts func (_m *ProjectClient) TotalShares(ctx context.Context, in *types.QueryTotalSharesRequest, opts ...grpc.CallOption) (*types.QueryTotalSharesResponse, error) { _va := make([]interface{}, len(opts)) @@ -325,6 +702,10 @@ func (_m *ProjectClient) TotalShares(ctx context.Context, in *types.QueryTotalSh _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for TotalShares") + } + var r0 *types.QueryTotalSharesResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *types.QueryTotalSharesRequest, ...grpc.CallOption) (*types.QueryTotalSharesResponse, error)); ok { @@ -347,13 +728,49 @@ func (_m *ProjectClient) TotalShares(ctx context.Context, in *types.QueryTotalSh return r0, r1 } -type mockConstructorTestingTNewProjectClient interface { - mock.TestingT - Cleanup(func()) +// ProjectClient_TotalShares_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'TotalShares' +type ProjectClient_TotalShares_Call struct { + *mock.Call +} + +// TotalShares is a helper method to define mock.On call +// - ctx context.Context +// - in *types.QueryTotalSharesRequest +// - opts ...grpc.CallOption +func (_e *ProjectClient_Expecter) TotalShares(ctx interface{}, in interface{}, opts ...interface{}) *ProjectClient_TotalShares_Call { + return &ProjectClient_TotalShares_Call{Call: _e.mock.On("TotalShares", + append([]interface{}{ctx, in}, opts...)...)} +} + +func (_c *ProjectClient_TotalShares_Call) Run(run func(ctx context.Context, in *types.QueryTotalSharesRequest, opts ...grpc.CallOption)) *ProjectClient_TotalShares_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]grpc.CallOption, len(args)-2) + for i, a := range args[2:] { + if a != nil { + variadicArgs[i] = a.(grpc.CallOption) + } + } + run(args[0].(context.Context), args[1].(*types.QueryTotalSharesRequest), variadicArgs...) + }) + return _c +} + +func (_c *ProjectClient_TotalShares_Call) Return(_a0 *types.QueryTotalSharesResponse, _a1 error) *ProjectClient_TotalShares_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *ProjectClient_TotalShares_Call) RunAndReturn(run func(context.Context, *types.QueryTotalSharesRequest, ...grpc.CallOption) (*types.QueryTotalSharesResponse, error)) *ProjectClient_TotalShares_Call { + _c.Call.Return(run) + return _c } // NewProjectClient creates a new instance of ProjectClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewProjectClient(t mockConstructorTestingTNewProjectClient) *ProjectClient { +// The first argument is typically a *testing.T value. +func NewProjectClient(t interface { + mock.TestingT + Cleanup(func()) +}) *ProjectClient { mock := &ProjectClient{} mock.Mock.Test(t) diff --git a/network/network/mocks/reward_client.go b/network/network/mocks/reward_client.go index 02473bfd..6a7e61f4 100644 --- a/network/network/mocks/reward_client.go +++ b/network/network/mocks/reward_client.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.27.1. DO NOT EDIT. +// Code generated by mockery. DO NOT EDIT. package mocks @@ -17,6 +17,14 @@ type RewardClient struct { mock.Mock } +type RewardClient_Expecter struct { + mock *mock.Mock +} + +func (_m *RewardClient) EXPECT() *RewardClient_Expecter { + return &RewardClient_Expecter{mock: &_m.Mock} +} + // GetRewardPool provides a mock function with given fields: ctx, in, opts func (_m *RewardClient) GetRewardPool(ctx context.Context, in *types.QueryGetRewardPoolRequest, opts ...grpc.CallOption) (*types.QueryGetRewardPoolResponse, error) { _va := make([]interface{}, len(opts)) @@ -28,6 +36,10 @@ func (_m *RewardClient) GetRewardPool(ctx context.Context, in *types.QueryGetRew _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for GetRewardPool") + } + var r0 *types.QueryGetRewardPoolResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *types.QueryGetRewardPoolRequest, ...grpc.CallOption) (*types.QueryGetRewardPoolResponse, error)); ok { @@ -50,6 +62,43 @@ func (_m *RewardClient) GetRewardPool(ctx context.Context, in *types.QueryGetRew return r0, r1 } +// RewardClient_GetRewardPool_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetRewardPool' +type RewardClient_GetRewardPool_Call struct { + *mock.Call +} + +// GetRewardPool is a helper method to define mock.On call +// - ctx context.Context +// - in *types.QueryGetRewardPoolRequest +// - opts ...grpc.CallOption +func (_e *RewardClient_Expecter) GetRewardPool(ctx interface{}, in interface{}, opts ...interface{}) *RewardClient_GetRewardPool_Call { + return &RewardClient_GetRewardPool_Call{Call: _e.mock.On("GetRewardPool", + append([]interface{}{ctx, in}, opts...)...)} +} + +func (_c *RewardClient_GetRewardPool_Call) Run(run func(ctx context.Context, in *types.QueryGetRewardPoolRequest, opts ...grpc.CallOption)) *RewardClient_GetRewardPool_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]grpc.CallOption, len(args)-2) + for i, a := range args[2:] { + if a != nil { + variadicArgs[i] = a.(grpc.CallOption) + } + } + run(args[0].(context.Context), args[1].(*types.QueryGetRewardPoolRequest), variadicArgs...) + }) + return _c +} + +func (_c *RewardClient_GetRewardPool_Call) Return(_a0 *types.QueryGetRewardPoolResponse, _a1 error) *RewardClient_GetRewardPool_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *RewardClient_GetRewardPool_Call) RunAndReturn(run func(context.Context, *types.QueryGetRewardPoolRequest, ...grpc.CallOption) (*types.QueryGetRewardPoolResponse, error)) *RewardClient_GetRewardPool_Call { + _c.Call.Return(run) + return _c +} + // ListRewardPool provides a mock function with given fields: ctx, in, opts func (_m *RewardClient) ListRewardPool(ctx context.Context, in *types.QueryAllRewardPoolRequest, opts ...grpc.CallOption) (*types.QueryAllRewardPoolResponse, error) { _va := make([]interface{}, len(opts)) @@ -61,6 +110,10 @@ func (_m *RewardClient) ListRewardPool(ctx context.Context, in *types.QueryAllRe _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for ListRewardPool") + } + var r0 *types.QueryAllRewardPoolResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *types.QueryAllRewardPoolRequest, ...grpc.CallOption) (*types.QueryAllRewardPoolResponse, error)); ok { @@ -83,6 +136,43 @@ func (_m *RewardClient) ListRewardPool(ctx context.Context, in *types.QueryAllRe return r0, r1 } +// RewardClient_ListRewardPool_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListRewardPool' +type RewardClient_ListRewardPool_Call struct { + *mock.Call +} + +// ListRewardPool is a helper method to define mock.On call +// - ctx context.Context +// - in *types.QueryAllRewardPoolRequest +// - opts ...grpc.CallOption +func (_e *RewardClient_Expecter) ListRewardPool(ctx interface{}, in interface{}, opts ...interface{}) *RewardClient_ListRewardPool_Call { + return &RewardClient_ListRewardPool_Call{Call: _e.mock.On("ListRewardPool", + append([]interface{}{ctx, in}, opts...)...)} +} + +func (_c *RewardClient_ListRewardPool_Call) Run(run func(ctx context.Context, in *types.QueryAllRewardPoolRequest, opts ...grpc.CallOption)) *RewardClient_ListRewardPool_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]grpc.CallOption, len(args)-2) + for i, a := range args[2:] { + if a != nil { + variadicArgs[i] = a.(grpc.CallOption) + } + } + run(args[0].(context.Context), args[1].(*types.QueryAllRewardPoolRequest), variadicArgs...) + }) + return _c +} + +func (_c *RewardClient_ListRewardPool_Call) Return(_a0 *types.QueryAllRewardPoolResponse, _a1 error) *RewardClient_ListRewardPool_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *RewardClient_ListRewardPool_Call) RunAndReturn(run func(context.Context, *types.QueryAllRewardPoolRequest, ...grpc.CallOption) (*types.QueryAllRewardPoolResponse, error)) *RewardClient_ListRewardPool_Call { + _c.Call.Return(run) + return _c +} + // Params provides a mock function with given fields: ctx, in, opts func (_m *RewardClient) Params(ctx context.Context, in *types.QueryParamsRequest, opts ...grpc.CallOption) (*types.QueryParamsResponse, error) { _va := make([]interface{}, len(opts)) @@ -94,6 +184,10 @@ func (_m *RewardClient) Params(ctx context.Context, in *types.QueryParamsRequest _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for Params") + } + var r0 *types.QueryParamsResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *types.QueryParamsRequest, ...grpc.CallOption) (*types.QueryParamsResponse, error)); ok { @@ -116,13 +210,49 @@ func (_m *RewardClient) Params(ctx context.Context, in *types.QueryParamsRequest return r0, r1 } -type mockConstructorTestingTNewRewardClient interface { - mock.TestingT - Cleanup(func()) +// RewardClient_Params_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Params' +type RewardClient_Params_Call struct { + *mock.Call +} + +// Params is a helper method to define mock.On call +// - ctx context.Context +// - in *types.QueryParamsRequest +// - opts ...grpc.CallOption +func (_e *RewardClient_Expecter) Params(ctx interface{}, in interface{}, opts ...interface{}) *RewardClient_Params_Call { + return &RewardClient_Params_Call{Call: _e.mock.On("Params", + append([]interface{}{ctx, in}, opts...)...)} +} + +func (_c *RewardClient_Params_Call) Run(run func(ctx context.Context, in *types.QueryParamsRequest, opts ...grpc.CallOption)) *RewardClient_Params_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]grpc.CallOption, len(args)-2) + for i, a := range args[2:] { + if a != nil { + variadicArgs[i] = a.(grpc.CallOption) + } + } + run(args[0].(context.Context), args[1].(*types.QueryParamsRequest), variadicArgs...) + }) + return _c +} + +func (_c *RewardClient_Params_Call) Return(_a0 *types.QueryParamsResponse, _a1 error) *RewardClient_Params_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *RewardClient_Params_Call) RunAndReturn(run func(context.Context, *types.QueryParamsRequest, ...grpc.CallOption) (*types.QueryParamsResponse, error)) *RewardClient_Params_Call { + _c.Call.Return(run) + return _c } // NewRewardClient creates a new instance of RewardClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewRewardClient(t mockConstructorTestingTNewRewardClient) *RewardClient { +// The first argument is typically a *testing.T value. +func NewRewardClient(t interface { + mock.TestingT + Cleanup(func()) +}) *RewardClient { mock := &RewardClient{} mock.Mock.Test(t) diff --git a/network/network/mocks/staking_client.go b/network/network/mocks/staking_client.go index bfcd1384..b5863eba 100644 --- a/network/network/mocks/staking_client.go +++ b/network/network/mocks/staking_client.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.27.1. DO NOT EDIT. +// Code generated by mockery. DO NOT EDIT. package mocks @@ -17,6 +17,14 @@ type StakingClient struct { mock.Mock } +type StakingClient_Expecter struct { + mock *mock.Mock +} + +func (_m *StakingClient) EXPECT() *StakingClient_Expecter { + return &StakingClient_Expecter{mock: &_m.Mock} +} + // Delegation provides a mock function with given fields: ctx, in, opts func (_m *StakingClient) Delegation(ctx context.Context, in *types.QueryDelegationRequest, opts ...grpc.CallOption) (*types.QueryDelegationResponse, error) { _va := make([]interface{}, len(opts)) @@ -28,6 +36,10 @@ func (_m *StakingClient) Delegation(ctx context.Context, in *types.QueryDelegati _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for Delegation") + } + var r0 *types.QueryDelegationResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *types.QueryDelegationRequest, ...grpc.CallOption) (*types.QueryDelegationResponse, error)); ok { @@ -50,6 +62,43 @@ func (_m *StakingClient) Delegation(ctx context.Context, in *types.QueryDelegati return r0, r1 } +// StakingClient_Delegation_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Delegation' +type StakingClient_Delegation_Call struct { + *mock.Call +} + +// Delegation is a helper method to define mock.On call +// - ctx context.Context +// - in *types.QueryDelegationRequest +// - opts ...grpc.CallOption +func (_e *StakingClient_Expecter) Delegation(ctx interface{}, in interface{}, opts ...interface{}) *StakingClient_Delegation_Call { + return &StakingClient_Delegation_Call{Call: _e.mock.On("Delegation", + append([]interface{}{ctx, in}, opts...)...)} +} + +func (_c *StakingClient_Delegation_Call) Run(run func(ctx context.Context, in *types.QueryDelegationRequest, opts ...grpc.CallOption)) *StakingClient_Delegation_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]grpc.CallOption, len(args)-2) + for i, a := range args[2:] { + if a != nil { + variadicArgs[i] = a.(grpc.CallOption) + } + } + run(args[0].(context.Context), args[1].(*types.QueryDelegationRequest), variadicArgs...) + }) + return _c +} + +func (_c *StakingClient_Delegation_Call) Return(_a0 *types.QueryDelegationResponse, _a1 error) *StakingClient_Delegation_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *StakingClient_Delegation_Call) RunAndReturn(run func(context.Context, *types.QueryDelegationRequest, ...grpc.CallOption) (*types.QueryDelegationResponse, error)) *StakingClient_Delegation_Call { + _c.Call.Return(run) + return _c +} + // DelegatorDelegations provides a mock function with given fields: ctx, in, opts func (_m *StakingClient) DelegatorDelegations(ctx context.Context, in *types.QueryDelegatorDelegationsRequest, opts ...grpc.CallOption) (*types.QueryDelegatorDelegationsResponse, error) { _va := make([]interface{}, len(opts)) @@ -61,6 +110,10 @@ func (_m *StakingClient) DelegatorDelegations(ctx context.Context, in *types.Que _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for DelegatorDelegations") + } + var r0 *types.QueryDelegatorDelegationsResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *types.QueryDelegatorDelegationsRequest, ...grpc.CallOption) (*types.QueryDelegatorDelegationsResponse, error)); ok { @@ -83,6 +136,43 @@ func (_m *StakingClient) DelegatorDelegations(ctx context.Context, in *types.Que return r0, r1 } +// StakingClient_DelegatorDelegations_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DelegatorDelegations' +type StakingClient_DelegatorDelegations_Call struct { + *mock.Call +} + +// DelegatorDelegations is a helper method to define mock.On call +// - ctx context.Context +// - in *types.QueryDelegatorDelegationsRequest +// - opts ...grpc.CallOption +func (_e *StakingClient_Expecter) DelegatorDelegations(ctx interface{}, in interface{}, opts ...interface{}) *StakingClient_DelegatorDelegations_Call { + return &StakingClient_DelegatorDelegations_Call{Call: _e.mock.On("DelegatorDelegations", + append([]interface{}{ctx, in}, opts...)...)} +} + +func (_c *StakingClient_DelegatorDelegations_Call) Run(run func(ctx context.Context, in *types.QueryDelegatorDelegationsRequest, opts ...grpc.CallOption)) *StakingClient_DelegatorDelegations_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]grpc.CallOption, len(args)-2) + for i, a := range args[2:] { + if a != nil { + variadicArgs[i] = a.(grpc.CallOption) + } + } + run(args[0].(context.Context), args[1].(*types.QueryDelegatorDelegationsRequest), variadicArgs...) + }) + return _c +} + +func (_c *StakingClient_DelegatorDelegations_Call) Return(_a0 *types.QueryDelegatorDelegationsResponse, _a1 error) *StakingClient_DelegatorDelegations_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *StakingClient_DelegatorDelegations_Call) RunAndReturn(run func(context.Context, *types.QueryDelegatorDelegationsRequest, ...grpc.CallOption) (*types.QueryDelegatorDelegationsResponse, error)) *StakingClient_DelegatorDelegations_Call { + _c.Call.Return(run) + return _c +} + // DelegatorUnbondingDelegations provides a mock function with given fields: ctx, in, opts func (_m *StakingClient) DelegatorUnbondingDelegations(ctx context.Context, in *types.QueryDelegatorUnbondingDelegationsRequest, opts ...grpc.CallOption) (*types.QueryDelegatorUnbondingDelegationsResponse, error) { _va := make([]interface{}, len(opts)) @@ -94,6 +184,10 @@ func (_m *StakingClient) DelegatorUnbondingDelegations(ctx context.Context, in * _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for DelegatorUnbondingDelegations") + } + var r0 *types.QueryDelegatorUnbondingDelegationsResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *types.QueryDelegatorUnbondingDelegationsRequest, ...grpc.CallOption) (*types.QueryDelegatorUnbondingDelegationsResponse, error)); ok { @@ -116,6 +210,43 @@ func (_m *StakingClient) DelegatorUnbondingDelegations(ctx context.Context, in * return r0, r1 } +// StakingClient_DelegatorUnbondingDelegations_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DelegatorUnbondingDelegations' +type StakingClient_DelegatorUnbondingDelegations_Call struct { + *mock.Call +} + +// DelegatorUnbondingDelegations is a helper method to define mock.On call +// - ctx context.Context +// - in *types.QueryDelegatorUnbondingDelegationsRequest +// - opts ...grpc.CallOption +func (_e *StakingClient_Expecter) DelegatorUnbondingDelegations(ctx interface{}, in interface{}, opts ...interface{}) *StakingClient_DelegatorUnbondingDelegations_Call { + return &StakingClient_DelegatorUnbondingDelegations_Call{Call: _e.mock.On("DelegatorUnbondingDelegations", + append([]interface{}{ctx, in}, opts...)...)} +} + +func (_c *StakingClient_DelegatorUnbondingDelegations_Call) Run(run func(ctx context.Context, in *types.QueryDelegatorUnbondingDelegationsRequest, opts ...grpc.CallOption)) *StakingClient_DelegatorUnbondingDelegations_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]grpc.CallOption, len(args)-2) + for i, a := range args[2:] { + if a != nil { + variadicArgs[i] = a.(grpc.CallOption) + } + } + run(args[0].(context.Context), args[1].(*types.QueryDelegatorUnbondingDelegationsRequest), variadicArgs...) + }) + return _c +} + +func (_c *StakingClient_DelegatorUnbondingDelegations_Call) Return(_a0 *types.QueryDelegatorUnbondingDelegationsResponse, _a1 error) *StakingClient_DelegatorUnbondingDelegations_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *StakingClient_DelegatorUnbondingDelegations_Call) RunAndReturn(run func(context.Context, *types.QueryDelegatorUnbondingDelegationsRequest, ...grpc.CallOption) (*types.QueryDelegatorUnbondingDelegationsResponse, error)) *StakingClient_DelegatorUnbondingDelegations_Call { + _c.Call.Return(run) + return _c +} + // DelegatorValidator provides a mock function with given fields: ctx, in, opts func (_m *StakingClient) DelegatorValidator(ctx context.Context, in *types.QueryDelegatorValidatorRequest, opts ...grpc.CallOption) (*types.QueryDelegatorValidatorResponse, error) { _va := make([]interface{}, len(opts)) @@ -127,6 +258,10 @@ func (_m *StakingClient) DelegatorValidator(ctx context.Context, in *types.Query _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for DelegatorValidator") + } + var r0 *types.QueryDelegatorValidatorResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *types.QueryDelegatorValidatorRequest, ...grpc.CallOption) (*types.QueryDelegatorValidatorResponse, error)); ok { @@ -149,6 +284,43 @@ func (_m *StakingClient) DelegatorValidator(ctx context.Context, in *types.Query return r0, r1 } +// StakingClient_DelegatorValidator_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DelegatorValidator' +type StakingClient_DelegatorValidator_Call struct { + *mock.Call +} + +// DelegatorValidator is a helper method to define mock.On call +// - ctx context.Context +// - in *types.QueryDelegatorValidatorRequest +// - opts ...grpc.CallOption +func (_e *StakingClient_Expecter) DelegatorValidator(ctx interface{}, in interface{}, opts ...interface{}) *StakingClient_DelegatorValidator_Call { + return &StakingClient_DelegatorValidator_Call{Call: _e.mock.On("DelegatorValidator", + append([]interface{}{ctx, in}, opts...)...)} +} + +func (_c *StakingClient_DelegatorValidator_Call) Run(run func(ctx context.Context, in *types.QueryDelegatorValidatorRequest, opts ...grpc.CallOption)) *StakingClient_DelegatorValidator_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]grpc.CallOption, len(args)-2) + for i, a := range args[2:] { + if a != nil { + variadicArgs[i] = a.(grpc.CallOption) + } + } + run(args[0].(context.Context), args[1].(*types.QueryDelegatorValidatorRequest), variadicArgs...) + }) + return _c +} + +func (_c *StakingClient_DelegatorValidator_Call) Return(_a0 *types.QueryDelegatorValidatorResponse, _a1 error) *StakingClient_DelegatorValidator_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *StakingClient_DelegatorValidator_Call) RunAndReturn(run func(context.Context, *types.QueryDelegatorValidatorRequest, ...grpc.CallOption) (*types.QueryDelegatorValidatorResponse, error)) *StakingClient_DelegatorValidator_Call { + _c.Call.Return(run) + return _c +} + // DelegatorValidators provides a mock function with given fields: ctx, in, opts func (_m *StakingClient) DelegatorValidators(ctx context.Context, in *types.QueryDelegatorValidatorsRequest, opts ...grpc.CallOption) (*types.QueryDelegatorValidatorsResponse, error) { _va := make([]interface{}, len(opts)) @@ -160,6 +332,10 @@ func (_m *StakingClient) DelegatorValidators(ctx context.Context, in *types.Quer _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for DelegatorValidators") + } + var r0 *types.QueryDelegatorValidatorsResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *types.QueryDelegatorValidatorsRequest, ...grpc.CallOption) (*types.QueryDelegatorValidatorsResponse, error)); ok { @@ -182,6 +358,43 @@ func (_m *StakingClient) DelegatorValidators(ctx context.Context, in *types.Quer return r0, r1 } +// StakingClient_DelegatorValidators_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DelegatorValidators' +type StakingClient_DelegatorValidators_Call struct { + *mock.Call +} + +// DelegatorValidators is a helper method to define mock.On call +// - ctx context.Context +// - in *types.QueryDelegatorValidatorsRequest +// - opts ...grpc.CallOption +func (_e *StakingClient_Expecter) DelegatorValidators(ctx interface{}, in interface{}, opts ...interface{}) *StakingClient_DelegatorValidators_Call { + return &StakingClient_DelegatorValidators_Call{Call: _e.mock.On("DelegatorValidators", + append([]interface{}{ctx, in}, opts...)...)} +} + +func (_c *StakingClient_DelegatorValidators_Call) Run(run func(ctx context.Context, in *types.QueryDelegatorValidatorsRequest, opts ...grpc.CallOption)) *StakingClient_DelegatorValidators_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]grpc.CallOption, len(args)-2) + for i, a := range args[2:] { + if a != nil { + variadicArgs[i] = a.(grpc.CallOption) + } + } + run(args[0].(context.Context), args[1].(*types.QueryDelegatorValidatorsRequest), variadicArgs...) + }) + return _c +} + +func (_c *StakingClient_DelegatorValidators_Call) Return(_a0 *types.QueryDelegatorValidatorsResponse, _a1 error) *StakingClient_DelegatorValidators_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *StakingClient_DelegatorValidators_Call) RunAndReturn(run func(context.Context, *types.QueryDelegatorValidatorsRequest, ...grpc.CallOption) (*types.QueryDelegatorValidatorsResponse, error)) *StakingClient_DelegatorValidators_Call { + _c.Call.Return(run) + return _c +} + // HistoricalInfo provides a mock function with given fields: ctx, in, opts func (_m *StakingClient) HistoricalInfo(ctx context.Context, in *types.QueryHistoricalInfoRequest, opts ...grpc.CallOption) (*types.QueryHistoricalInfoResponse, error) { _va := make([]interface{}, len(opts)) @@ -193,6 +406,10 @@ func (_m *StakingClient) HistoricalInfo(ctx context.Context, in *types.QueryHist _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for HistoricalInfo") + } + var r0 *types.QueryHistoricalInfoResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *types.QueryHistoricalInfoRequest, ...grpc.CallOption) (*types.QueryHistoricalInfoResponse, error)); ok { @@ -215,6 +432,43 @@ func (_m *StakingClient) HistoricalInfo(ctx context.Context, in *types.QueryHist return r0, r1 } +// StakingClient_HistoricalInfo_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'HistoricalInfo' +type StakingClient_HistoricalInfo_Call struct { + *mock.Call +} + +// HistoricalInfo is a helper method to define mock.On call +// - ctx context.Context +// - in *types.QueryHistoricalInfoRequest +// - opts ...grpc.CallOption +func (_e *StakingClient_Expecter) HistoricalInfo(ctx interface{}, in interface{}, opts ...interface{}) *StakingClient_HistoricalInfo_Call { + return &StakingClient_HistoricalInfo_Call{Call: _e.mock.On("HistoricalInfo", + append([]interface{}{ctx, in}, opts...)...)} +} + +func (_c *StakingClient_HistoricalInfo_Call) Run(run func(ctx context.Context, in *types.QueryHistoricalInfoRequest, opts ...grpc.CallOption)) *StakingClient_HistoricalInfo_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]grpc.CallOption, len(args)-2) + for i, a := range args[2:] { + if a != nil { + variadicArgs[i] = a.(grpc.CallOption) + } + } + run(args[0].(context.Context), args[1].(*types.QueryHistoricalInfoRequest), variadicArgs...) + }) + return _c +} + +func (_c *StakingClient_HistoricalInfo_Call) Return(_a0 *types.QueryHistoricalInfoResponse, _a1 error) *StakingClient_HistoricalInfo_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *StakingClient_HistoricalInfo_Call) RunAndReturn(run func(context.Context, *types.QueryHistoricalInfoRequest, ...grpc.CallOption) (*types.QueryHistoricalInfoResponse, error)) *StakingClient_HistoricalInfo_Call { + _c.Call.Return(run) + return _c +} + // Params provides a mock function with given fields: ctx, in, opts func (_m *StakingClient) Params(ctx context.Context, in *types.QueryParamsRequest, opts ...grpc.CallOption) (*types.QueryParamsResponse, error) { _va := make([]interface{}, len(opts)) @@ -226,6 +480,10 @@ func (_m *StakingClient) Params(ctx context.Context, in *types.QueryParamsReques _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for Params") + } + var r0 *types.QueryParamsResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *types.QueryParamsRequest, ...grpc.CallOption) (*types.QueryParamsResponse, error)); ok { @@ -248,6 +506,43 @@ func (_m *StakingClient) Params(ctx context.Context, in *types.QueryParamsReques return r0, r1 } +// StakingClient_Params_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Params' +type StakingClient_Params_Call struct { + *mock.Call +} + +// Params is a helper method to define mock.On call +// - ctx context.Context +// - in *types.QueryParamsRequest +// - opts ...grpc.CallOption +func (_e *StakingClient_Expecter) Params(ctx interface{}, in interface{}, opts ...interface{}) *StakingClient_Params_Call { + return &StakingClient_Params_Call{Call: _e.mock.On("Params", + append([]interface{}{ctx, in}, opts...)...)} +} + +func (_c *StakingClient_Params_Call) Run(run func(ctx context.Context, in *types.QueryParamsRequest, opts ...grpc.CallOption)) *StakingClient_Params_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]grpc.CallOption, len(args)-2) + for i, a := range args[2:] { + if a != nil { + variadicArgs[i] = a.(grpc.CallOption) + } + } + run(args[0].(context.Context), args[1].(*types.QueryParamsRequest), variadicArgs...) + }) + return _c +} + +func (_c *StakingClient_Params_Call) Return(_a0 *types.QueryParamsResponse, _a1 error) *StakingClient_Params_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *StakingClient_Params_Call) RunAndReturn(run func(context.Context, *types.QueryParamsRequest, ...grpc.CallOption) (*types.QueryParamsResponse, error)) *StakingClient_Params_Call { + _c.Call.Return(run) + return _c +} + // Pool provides a mock function with given fields: ctx, in, opts func (_m *StakingClient) Pool(ctx context.Context, in *types.QueryPoolRequest, opts ...grpc.CallOption) (*types.QueryPoolResponse, error) { _va := make([]interface{}, len(opts)) @@ -259,6 +554,10 @@ func (_m *StakingClient) Pool(ctx context.Context, in *types.QueryPoolRequest, o _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for Pool") + } + var r0 *types.QueryPoolResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *types.QueryPoolRequest, ...grpc.CallOption) (*types.QueryPoolResponse, error)); ok { @@ -281,6 +580,43 @@ func (_m *StakingClient) Pool(ctx context.Context, in *types.QueryPoolRequest, o return r0, r1 } +// StakingClient_Pool_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Pool' +type StakingClient_Pool_Call struct { + *mock.Call +} + +// Pool is a helper method to define mock.On call +// - ctx context.Context +// - in *types.QueryPoolRequest +// - opts ...grpc.CallOption +func (_e *StakingClient_Expecter) Pool(ctx interface{}, in interface{}, opts ...interface{}) *StakingClient_Pool_Call { + return &StakingClient_Pool_Call{Call: _e.mock.On("Pool", + append([]interface{}{ctx, in}, opts...)...)} +} + +func (_c *StakingClient_Pool_Call) Run(run func(ctx context.Context, in *types.QueryPoolRequest, opts ...grpc.CallOption)) *StakingClient_Pool_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]grpc.CallOption, len(args)-2) + for i, a := range args[2:] { + if a != nil { + variadicArgs[i] = a.(grpc.CallOption) + } + } + run(args[0].(context.Context), args[1].(*types.QueryPoolRequest), variadicArgs...) + }) + return _c +} + +func (_c *StakingClient_Pool_Call) Return(_a0 *types.QueryPoolResponse, _a1 error) *StakingClient_Pool_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *StakingClient_Pool_Call) RunAndReturn(run func(context.Context, *types.QueryPoolRequest, ...grpc.CallOption) (*types.QueryPoolResponse, error)) *StakingClient_Pool_Call { + _c.Call.Return(run) + return _c +} + // Redelegations provides a mock function with given fields: ctx, in, opts func (_m *StakingClient) Redelegations(ctx context.Context, in *types.QueryRedelegationsRequest, opts ...grpc.CallOption) (*types.QueryRedelegationsResponse, error) { _va := make([]interface{}, len(opts)) @@ -292,6 +628,10 @@ func (_m *StakingClient) Redelegations(ctx context.Context, in *types.QueryRedel _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for Redelegations") + } + var r0 *types.QueryRedelegationsResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *types.QueryRedelegationsRequest, ...grpc.CallOption) (*types.QueryRedelegationsResponse, error)); ok { @@ -314,6 +654,43 @@ func (_m *StakingClient) Redelegations(ctx context.Context, in *types.QueryRedel return r0, r1 } +// StakingClient_Redelegations_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Redelegations' +type StakingClient_Redelegations_Call struct { + *mock.Call +} + +// Redelegations is a helper method to define mock.On call +// - ctx context.Context +// - in *types.QueryRedelegationsRequest +// - opts ...grpc.CallOption +func (_e *StakingClient_Expecter) Redelegations(ctx interface{}, in interface{}, opts ...interface{}) *StakingClient_Redelegations_Call { + return &StakingClient_Redelegations_Call{Call: _e.mock.On("Redelegations", + append([]interface{}{ctx, in}, opts...)...)} +} + +func (_c *StakingClient_Redelegations_Call) Run(run func(ctx context.Context, in *types.QueryRedelegationsRequest, opts ...grpc.CallOption)) *StakingClient_Redelegations_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]grpc.CallOption, len(args)-2) + for i, a := range args[2:] { + if a != nil { + variadicArgs[i] = a.(grpc.CallOption) + } + } + run(args[0].(context.Context), args[1].(*types.QueryRedelegationsRequest), variadicArgs...) + }) + return _c +} + +func (_c *StakingClient_Redelegations_Call) Return(_a0 *types.QueryRedelegationsResponse, _a1 error) *StakingClient_Redelegations_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *StakingClient_Redelegations_Call) RunAndReturn(run func(context.Context, *types.QueryRedelegationsRequest, ...grpc.CallOption) (*types.QueryRedelegationsResponse, error)) *StakingClient_Redelegations_Call { + _c.Call.Return(run) + return _c +} + // UnbondingDelegation provides a mock function with given fields: ctx, in, opts func (_m *StakingClient) UnbondingDelegation(ctx context.Context, in *types.QueryUnbondingDelegationRequest, opts ...grpc.CallOption) (*types.QueryUnbondingDelegationResponse, error) { _va := make([]interface{}, len(opts)) @@ -325,6 +702,10 @@ func (_m *StakingClient) UnbondingDelegation(ctx context.Context, in *types.Quer _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for UnbondingDelegation") + } + var r0 *types.QueryUnbondingDelegationResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *types.QueryUnbondingDelegationRequest, ...grpc.CallOption) (*types.QueryUnbondingDelegationResponse, error)); ok { @@ -347,6 +728,43 @@ func (_m *StakingClient) UnbondingDelegation(ctx context.Context, in *types.Quer return r0, r1 } +// StakingClient_UnbondingDelegation_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UnbondingDelegation' +type StakingClient_UnbondingDelegation_Call struct { + *mock.Call +} + +// UnbondingDelegation is a helper method to define mock.On call +// - ctx context.Context +// - in *types.QueryUnbondingDelegationRequest +// - opts ...grpc.CallOption +func (_e *StakingClient_Expecter) UnbondingDelegation(ctx interface{}, in interface{}, opts ...interface{}) *StakingClient_UnbondingDelegation_Call { + return &StakingClient_UnbondingDelegation_Call{Call: _e.mock.On("UnbondingDelegation", + append([]interface{}{ctx, in}, opts...)...)} +} + +func (_c *StakingClient_UnbondingDelegation_Call) Run(run func(ctx context.Context, in *types.QueryUnbondingDelegationRequest, opts ...grpc.CallOption)) *StakingClient_UnbondingDelegation_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]grpc.CallOption, len(args)-2) + for i, a := range args[2:] { + if a != nil { + variadicArgs[i] = a.(grpc.CallOption) + } + } + run(args[0].(context.Context), args[1].(*types.QueryUnbondingDelegationRequest), variadicArgs...) + }) + return _c +} + +func (_c *StakingClient_UnbondingDelegation_Call) Return(_a0 *types.QueryUnbondingDelegationResponse, _a1 error) *StakingClient_UnbondingDelegation_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *StakingClient_UnbondingDelegation_Call) RunAndReturn(run func(context.Context, *types.QueryUnbondingDelegationRequest, ...grpc.CallOption) (*types.QueryUnbondingDelegationResponse, error)) *StakingClient_UnbondingDelegation_Call { + _c.Call.Return(run) + return _c +} + // Validator provides a mock function with given fields: ctx, in, opts func (_m *StakingClient) Validator(ctx context.Context, in *types.QueryValidatorRequest, opts ...grpc.CallOption) (*types.QueryValidatorResponse, error) { _va := make([]interface{}, len(opts)) @@ -358,6 +776,10 @@ func (_m *StakingClient) Validator(ctx context.Context, in *types.QueryValidator _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for Validator") + } + var r0 *types.QueryValidatorResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *types.QueryValidatorRequest, ...grpc.CallOption) (*types.QueryValidatorResponse, error)); ok { @@ -380,6 +802,43 @@ func (_m *StakingClient) Validator(ctx context.Context, in *types.QueryValidator return r0, r1 } +// StakingClient_Validator_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Validator' +type StakingClient_Validator_Call struct { + *mock.Call +} + +// Validator is a helper method to define mock.On call +// - ctx context.Context +// - in *types.QueryValidatorRequest +// - opts ...grpc.CallOption +func (_e *StakingClient_Expecter) Validator(ctx interface{}, in interface{}, opts ...interface{}) *StakingClient_Validator_Call { + return &StakingClient_Validator_Call{Call: _e.mock.On("Validator", + append([]interface{}{ctx, in}, opts...)...)} +} + +func (_c *StakingClient_Validator_Call) Run(run func(ctx context.Context, in *types.QueryValidatorRequest, opts ...grpc.CallOption)) *StakingClient_Validator_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]grpc.CallOption, len(args)-2) + for i, a := range args[2:] { + if a != nil { + variadicArgs[i] = a.(grpc.CallOption) + } + } + run(args[0].(context.Context), args[1].(*types.QueryValidatorRequest), variadicArgs...) + }) + return _c +} + +func (_c *StakingClient_Validator_Call) Return(_a0 *types.QueryValidatorResponse, _a1 error) *StakingClient_Validator_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *StakingClient_Validator_Call) RunAndReturn(run func(context.Context, *types.QueryValidatorRequest, ...grpc.CallOption) (*types.QueryValidatorResponse, error)) *StakingClient_Validator_Call { + _c.Call.Return(run) + return _c +} + // ValidatorDelegations provides a mock function with given fields: ctx, in, opts func (_m *StakingClient) ValidatorDelegations(ctx context.Context, in *types.QueryValidatorDelegationsRequest, opts ...grpc.CallOption) (*types.QueryValidatorDelegationsResponse, error) { _va := make([]interface{}, len(opts)) @@ -391,6 +850,10 @@ func (_m *StakingClient) ValidatorDelegations(ctx context.Context, in *types.Que _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for ValidatorDelegations") + } + var r0 *types.QueryValidatorDelegationsResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *types.QueryValidatorDelegationsRequest, ...grpc.CallOption) (*types.QueryValidatorDelegationsResponse, error)); ok { @@ -413,6 +876,43 @@ func (_m *StakingClient) ValidatorDelegations(ctx context.Context, in *types.Que return r0, r1 } +// StakingClient_ValidatorDelegations_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ValidatorDelegations' +type StakingClient_ValidatorDelegations_Call struct { + *mock.Call +} + +// ValidatorDelegations is a helper method to define mock.On call +// - ctx context.Context +// - in *types.QueryValidatorDelegationsRequest +// - opts ...grpc.CallOption +func (_e *StakingClient_Expecter) ValidatorDelegations(ctx interface{}, in interface{}, opts ...interface{}) *StakingClient_ValidatorDelegations_Call { + return &StakingClient_ValidatorDelegations_Call{Call: _e.mock.On("ValidatorDelegations", + append([]interface{}{ctx, in}, opts...)...)} +} + +func (_c *StakingClient_ValidatorDelegations_Call) Run(run func(ctx context.Context, in *types.QueryValidatorDelegationsRequest, opts ...grpc.CallOption)) *StakingClient_ValidatorDelegations_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]grpc.CallOption, len(args)-2) + for i, a := range args[2:] { + if a != nil { + variadicArgs[i] = a.(grpc.CallOption) + } + } + run(args[0].(context.Context), args[1].(*types.QueryValidatorDelegationsRequest), variadicArgs...) + }) + return _c +} + +func (_c *StakingClient_ValidatorDelegations_Call) Return(_a0 *types.QueryValidatorDelegationsResponse, _a1 error) *StakingClient_ValidatorDelegations_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *StakingClient_ValidatorDelegations_Call) RunAndReturn(run func(context.Context, *types.QueryValidatorDelegationsRequest, ...grpc.CallOption) (*types.QueryValidatorDelegationsResponse, error)) *StakingClient_ValidatorDelegations_Call { + _c.Call.Return(run) + return _c +} + // ValidatorUnbondingDelegations provides a mock function with given fields: ctx, in, opts func (_m *StakingClient) ValidatorUnbondingDelegations(ctx context.Context, in *types.QueryValidatorUnbondingDelegationsRequest, opts ...grpc.CallOption) (*types.QueryValidatorUnbondingDelegationsResponse, error) { _va := make([]interface{}, len(opts)) @@ -424,6 +924,10 @@ func (_m *StakingClient) ValidatorUnbondingDelegations(ctx context.Context, in * _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for ValidatorUnbondingDelegations") + } + var r0 *types.QueryValidatorUnbondingDelegationsResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *types.QueryValidatorUnbondingDelegationsRequest, ...grpc.CallOption) (*types.QueryValidatorUnbondingDelegationsResponse, error)); ok { @@ -446,6 +950,43 @@ func (_m *StakingClient) ValidatorUnbondingDelegations(ctx context.Context, in * return r0, r1 } +// StakingClient_ValidatorUnbondingDelegations_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ValidatorUnbondingDelegations' +type StakingClient_ValidatorUnbondingDelegations_Call struct { + *mock.Call +} + +// ValidatorUnbondingDelegations is a helper method to define mock.On call +// - ctx context.Context +// - in *types.QueryValidatorUnbondingDelegationsRequest +// - opts ...grpc.CallOption +func (_e *StakingClient_Expecter) ValidatorUnbondingDelegations(ctx interface{}, in interface{}, opts ...interface{}) *StakingClient_ValidatorUnbondingDelegations_Call { + return &StakingClient_ValidatorUnbondingDelegations_Call{Call: _e.mock.On("ValidatorUnbondingDelegations", + append([]interface{}{ctx, in}, opts...)...)} +} + +func (_c *StakingClient_ValidatorUnbondingDelegations_Call) Run(run func(ctx context.Context, in *types.QueryValidatorUnbondingDelegationsRequest, opts ...grpc.CallOption)) *StakingClient_ValidatorUnbondingDelegations_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]grpc.CallOption, len(args)-2) + for i, a := range args[2:] { + if a != nil { + variadicArgs[i] = a.(grpc.CallOption) + } + } + run(args[0].(context.Context), args[1].(*types.QueryValidatorUnbondingDelegationsRequest), variadicArgs...) + }) + return _c +} + +func (_c *StakingClient_ValidatorUnbondingDelegations_Call) Return(_a0 *types.QueryValidatorUnbondingDelegationsResponse, _a1 error) *StakingClient_ValidatorUnbondingDelegations_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *StakingClient_ValidatorUnbondingDelegations_Call) RunAndReturn(run func(context.Context, *types.QueryValidatorUnbondingDelegationsRequest, ...grpc.CallOption) (*types.QueryValidatorUnbondingDelegationsResponse, error)) *StakingClient_ValidatorUnbondingDelegations_Call { + _c.Call.Return(run) + return _c +} + // Validators provides a mock function with given fields: ctx, in, opts func (_m *StakingClient) Validators(ctx context.Context, in *types.QueryValidatorsRequest, opts ...grpc.CallOption) (*types.QueryValidatorsResponse, error) { _va := make([]interface{}, len(opts)) @@ -457,6 +998,10 @@ func (_m *StakingClient) Validators(ctx context.Context, in *types.QueryValidato _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for Validators") + } + var r0 *types.QueryValidatorsResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *types.QueryValidatorsRequest, ...grpc.CallOption) (*types.QueryValidatorsResponse, error)); ok { @@ -479,13 +1024,49 @@ func (_m *StakingClient) Validators(ctx context.Context, in *types.QueryValidato return r0, r1 } -type mockConstructorTestingTNewStakingClient interface { - mock.TestingT - Cleanup(func()) +// StakingClient_Validators_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Validators' +type StakingClient_Validators_Call struct { + *mock.Call +} + +// Validators is a helper method to define mock.On call +// - ctx context.Context +// - in *types.QueryValidatorsRequest +// - opts ...grpc.CallOption +func (_e *StakingClient_Expecter) Validators(ctx interface{}, in interface{}, opts ...interface{}) *StakingClient_Validators_Call { + return &StakingClient_Validators_Call{Call: _e.mock.On("Validators", + append([]interface{}{ctx, in}, opts...)...)} +} + +func (_c *StakingClient_Validators_Call) Run(run func(ctx context.Context, in *types.QueryValidatorsRequest, opts ...grpc.CallOption)) *StakingClient_Validators_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]grpc.CallOption, len(args)-2) + for i, a := range args[2:] { + if a != nil { + variadicArgs[i] = a.(grpc.CallOption) + } + } + run(args[0].(context.Context), args[1].(*types.QueryValidatorsRequest), variadicArgs...) + }) + return _c +} + +func (_c *StakingClient_Validators_Call) Return(_a0 *types.QueryValidatorsResponse, _a1 error) *StakingClient_Validators_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *StakingClient_Validators_Call) RunAndReturn(run func(context.Context, *types.QueryValidatorsRequest, ...grpc.CallOption) (*types.QueryValidatorsResponse, error)) *StakingClient_Validators_Call { + _c.Call.Return(run) + return _c } // NewStakingClient creates a new instance of StakingClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewStakingClient(t mockConstructorTestingTNewStakingClient) *StakingClient { +// The first argument is typically a *testing.T value. +func NewStakingClient(t interface { + mock.TestingT + Cleanup(func()) +}) *StakingClient { mock := &StakingClient{} mock.Mock.Test(t) diff --git a/network/network/network.go b/network/network/network.go index 88cedb90..704bbd53 100644 --- a/network/network/network.go +++ b/network/network/network.go @@ -25,9 +25,9 @@ import ( type CosmosClient interface { Context() client.Context - BroadcastTx(ctx context.Context, account cosmosaccount.Account, msgs ...sdktypes.Msg) (cosmosclient.Response, error) Status(ctx context.Context) (*ctypes.ResultStatus, error) ConsensusInfo(ctx context.Context, height int64) (cosmosclient.ConsensusInfo, error) + BroadcastTx(ctx context.Context, account cosmosaccount.Account, msgs ...sdktypes.Msg) (cosmosclient.Response, error) } // Network is network builder. @@ -46,6 +46,7 @@ type Network struct { clock xtime.Clock } +//go:generate mockery --name Chain type Chain interface { ID() (string, error) ChainID() (string, error) diff --git a/network/network/testutil/mocks.go b/network/network/testutil/mocks.go index 64700aa8..3d6c410c 100644 --- a/network/network/testutil/mocks.go +++ b/network/network/testutil/mocks.go @@ -12,38 +12,47 @@ import ( rewardtypes "github.com/ignite/network/x/reward/types" ) +//go:generate mockery --name ProjectClient type ProjectClient interface { projecttypes.QueryClient } +//go:generate mockery --name ProfileClient type ProfileClient interface { profiletypes.QueryClient } +//go:generate mockery --name LaunchClient type LaunchClient interface { launchtypes.QueryClient } +//go:generate mockery --name RewardClient type RewardClient interface { rewardtypes.QueryClient } +//go:generate mockery --name BankClient type BankClient interface { banktypes.QueryClient } +//go:generate mockery --name StakingClient type StakingClient interface { stakingtypes.QueryClient } +//go:generate mockery --name MonitoringcClient type MonitoringcClient interface { monitoringctypes.QueryClient } +//go:generate mockery --name MonitoringpClient type MonitoringpClient interface { monitoringptypes.QueryClient } +//go:generate mockery --name AccountInfo type AccountInfo interface { keyring.Record }