-
Notifications
You must be signed in to change notification settings - Fork 212
/
bank_keeper.go
171 lines (138 loc) · 6.76 KB
/
bank_keeper.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
// Code generated by mockery v2.24.0. DO NOT EDIT.
package mocks
import (
types "github.com/cosmos/cosmos-sdk/types"
mock "github.com/stretchr/testify/mock"
)
// BankKeeper is an autogenerated mock type for the BankKeeper type
type BankKeeper struct {
mock.Mock
}
type BankKeeper_Expecter struct {
mock *mock.Mock
}
func (_m *BankKeeper) EXPECT() *BankKeeper_Expecter {
return &BankKeeper_Expecter{mock: &_m.Mock}
}
// SendCoinsFromAccountToModule provides a mock function with given fields: ctx, senderAddr, recipientModule, amt
func (_m *BankKeeper) SendCoinsFromAccountToModule(ctx types.Context, senderAddr types.AccAddress, recipientModule string, amt types.Coins) error {
ret := _m.Called(ctx, senderAddr, recipientModule, amt)
var r0 error
if rf, ok := ret.Get(0).(func(types.Context, types.AccAddress, string, types.Coins) error); ok {
r0 = rf(ctx, senderAddr, recipientModule, amt)
} else {
r0 = ret.Error(0)
}
return r0
}
// BankKeeper_SendCoinsFromAccountToModule_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SendCoinsFromAccountToModule'
type BankKeeper_SendCoinsFromAccountToModule_Call struct {
*mock.Call
}
// SendCoinsFromAccountToModule is a helper method to define mock.On call
// - ctx types.Context
// - senderAddr types.AccAddress
// - recipientModule string
// - amt types.Coins
func (_e *BankKeeper_Expecter) SendCoinsFromAccountToModule(ctx interface{}, senderAddr interface{}, recipientModule interface{}, amt interface{}) *BankKeeper_SendCoinsFromAccountToModule_Call {
return &BankKeeper_SendCoinsFromAccountToModule_Call{Call: _e.mock.On("SendCoinsFromAccountToModule", ctx, senderAddr, recipientModule, amt)}
}
func (_c *BankKeeper_SendCoinsFromAccountToModule_Call) Run(run func(ctx types.Context, senderAddr types.AccAddress, recipientModule string, amt types.Coins)) *BankKeeper_SendCoinsFromAccountToModule_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(types.Context), args[1].(types.AccAddress), args[2].(string), args[3].(types.Coins))
})
return _c
}
func (_c *BankKeeper_SendCoinsFromAccountToModule_Call) Return(_a0 error) *BankKeeper_SendCoinsFromAccountToModule_Call {
_c.Call.Return(_a0)
return _c
}
func (_c *BankKeeper_SendCoinsFromAccountToModule_Call) RunAndReturn(run func(types.Context, types.AccAddress, string, types.Coins) error) *BankKeeper_SendCoinsFromAccountToModule_Call {
_c.Call.Return(run)
return _c
}
// SendCoinsFromModuleToAccount provides a mock function with given fields: ctx, senderModule, recipientAddr, amt
func (_m *BankKeeper) SendCoinsFromModuleToAccount(ctx types.Context, senderModule string, recipientAddr types.AccAddress, amt types.Coins) error {
ret := _m.Called(ctx, senderModule, recipientAddr, amt)
var r0 error
if rf, ok := ret.Get(0).(func(types.Context, string, types.AccAddress, types.Coins) error); ok {
r0 = rf(ctx, senderModule, recipientAddr, amt)
} else {
r0 = ret.Error(0)
}
return r0
}
// BankKeeper_SendCoinsFromModuleToAccount_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SendCoinsFromModuleToAccount'
type BankKeeper_SendCoinsFromModuleToAccount_Call struct {
*mock.Call
}
// SendCoinsFromModuleToAccount is a helper method to define mock.On call
// - ctx types.Context
// - senderModule string
// - recipientAddr types.AccAddress
// - amt types.Coins
func (_e *BankKeeper_Expecter) SendCoinsFromModuleToAccount(ctx interface{}, senderModule interface{}, recipientAddr interface{}, amt interface{}) *BankKeeper_SendCoinsFromModuleToAccount_Call {
return &BankKeeper_SendCoinsFromModuleToAccount_Call{Call: _e.mock.On("SendCoinsFromModuleToAccount", ctx, senderModule, recipientAddr, amt)}
}
func (_c *BankKeeper_SendCoinsFromModuleToAccount_Call) Run(run func(ctx types.Context, senderModule string, recipientAddr types.AccAddress, amt types.Coins)) *BankKeeper_SendCoinsFromModuleToAccount_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(types.Context), args[1].(string), args[2].(types.AccAddress), args[3].(types.Coins))
})
return _c
}
func (_c *BankKeeper_SendCoinsFromModuleToAccount_Call) Return(_a0 error) *BankKeeper_SendCoinsFromModuleToAccount_Call {
_c.Call.Return(_a0)
return _c
}
func (_c *BankKeeper_SendCoinsFromModuleToAccount_Call) RunAndReturn(run func(types.Context, string, types.AccAddress, types.Coins) error) *BankKeeper_SendCoinsFromModuleToAccount_Call {
_c.Call.Return(run)
return _c
}
// SendCoinsFromModuleToModule provides a mock function with given fields: ctx, senderModule, recipientModule, amt
func (_m *BankKeeper) SendCoinsFromModuleToModule(ctx types.Context, senderModule string, recipientModule string, amt types.Coins) error {
ret := _m.Called(ctx, senderModule, recipientModule, amt)
var r0 error
if rf, ok := ret.Get(0).(func(types.Context, string, string, types.Coins) error); ok {
r0 = rf(ctx, senderModule, recipientModule, amt)
} else {
r0 = ret.Error(0)
}
return r0
}
// BankKeeper_SendCoinsFromModuleToModule_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SendCoinsFromModuleToModule'
type BankKeeper_SendCoinsFromModuleToModule_Call struct {
*mock.Call
}
// SendCoinsFromModuleToModule is a helper method to define mock.On call
// - ctx types.Context
// - senderModule string
// - recipientModule string
// - amt types.Coins
func (_e *BankKeeper_Expecter) SendCoinsFromModuleToModule(ctx interface{}, senderModule interface{}, recipientModule interface{}, amt interface{}) *BankKeeper_SendCoinsFromModuleToModule_Call {
return &BankKeeper_SendCoinsFromModuleToModule_Call{Call: _e.mock.On("SendCoinsFromModuleToModule", ctx, senderModule, recipientModule, amt)}
}
func (_c *BankKeeper_SendCoinsFromModuleToModule_Call) Run(run func(ctx types.Context, senderModule string, recipientModule string, amt types.Coins)) *BankKeeper_SendCoinsFromModuleToModule_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(types.Context), args[1].(string), args[2].(string), args[3].(types.Coins))
})
return _c
}
func (_c *BankKeeper_SendCoinsFromModuleToModule_Call) Return(_a0 error) *BankKeeper_SendCoinsFromModuleToModule_Call {
_c.Call.Return(_a0)
return _c
}
func (_c *BankKeeper_SendCoinsFromModuleToModule_Call) RunAndReturn(run func(types.Context, string, string, types.Coins) error) *BankKeeper_SendCoinsFromModuleToModule_Call {
_c.Call.Return(run)
return _c
}
type mockConstructorTestingTNewBankKeeper interface {
mock.TestingT
Cleanup(func())
}
// NewBankKeeper creates a new instance of BankKeeper. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func NewBankKeeper(t mockConstructorTestingTNewBankKeeper) *BankKeeper {
mock := &BankKeeper{}
mock.Mock.Test(t)
t.Cleanup(func() { mock.AssertExpectations(t) })
return mock
}