/
amm_keeper.go
168 lines (136 loc) · 4.94 KB
/
amm_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
// Code generated by mockery v2.32.4. DO NOT EDIT.
package mocks
import (
ammtypes "github.com/elys-network/elys/x/amm/types"
mock "github.com/stretchr/testify/mock"
types "github.com/cosmos/cosmos-sdk/types"
)
// AmmKeeper is an autogenerated mock type for the AmmKeeper type
type AmmKeeper struct {
mock.Mock
}
type AmmKeeper_Expecter struct {
mock *mock.Mock
}
func (_m *AmmKeeper) EXPECT() *AmmKeeper_Expecter {
return &AmmKeeper_Expecter{mock: &_m.Mock}
}
// GetAllPool provides a mock function with given fields: _a0
func (_m *AmmKeeper) GetAllPool(_a0 types.Context) []ammtypes.Pool {
ret := _m.Called(_a0)
var r0 []ammtypes.Pool
if rf, ok := ret.Get(0).(func(types.Context) []ammtypes.Pool); ok {
r0 = rf(_a0)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).([]ammtypes.Pool)
}
}
return r0
}
// AmmKeeper_GetAllPool_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetAllPool'
type AmmKeeper_GetAllPool_Call struct {
*mock.Call
}
// GetAllPool is a helper method to define mock.On call
// - _a0 types.Context
func (_e *AmmKeeper_Expecter) GetAllPool(_a0 interface{}) *AmmKeeper_GetAllPool_Call {
return &AmmKeeper_GetAllPool_Call{Call: _e.mock.On("GetAllPool", _a0)}
}
func (_c *AmmKeeper_GetAllPool_Call) Run(run func(_a0 types.Context)) *AmmKeeper_GetAllPool_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(types.Context))
})
return _c
}
func (_c *AmmKeeper_GetAllPool_Call) Return(_a0 []ammtypes.Pool) *AmmKeeper_GetAllPool_Call {
_c.Call.Return(_a0)
return _c
}
func (_c *AmmKeeper_GetAllPool_Call) RunAndReturn(run func(types.Context) []ammtypes.Pool) *AmmKeeper_GetAllPool_Call {
_c.Call.Return(run)
return _c
}
// GetPool provides a mock function with given fields: _a0, _a1
func (_m *AmmKeeper) GetPool(_a0 types.Context, _a1 uint64) (ammtypes.Pool, bool) {
ret := _m.Called(_a0, _a1)
var r0 ammtypes.Pool
var r1 bool
if rf, ok := ret.Get(0).(func(types.Context, uint64) (ammtypes.Pool, bool)); ok {
return rf(_a0, _a1)
}
if rf, ok := ret.Get(0).(func(types.Context, uint64) ammtypes.Pool); ok {
r0 = rf(_a0, _a1)
} else {
r0 = ret.Get(0).(ammtypes.Pool)
}
if rf, ok := ret.Get(1).(func(types.Context, uint64) bool); ok {
r1 = rf(_a0, _a1)
} else {
r1 = ret.Get(1).(bool)
}
return r0, r1
}
// AmmKeeper_GetPool_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPool'
type AmmKeeper_GetPool_Call struct {
*mock.Call
}
// GetPool is a helper method to define mock.On call
// - _a0 types.Context
// - _a1 uint64
func (_e *AmmKeeper_Expecter) GetPool(_a0 interface{}, _a1 interface{}) *AmmKeeper_GetPool_Call {
return &AmmKeeper_GetPool_Call{Call: _e.mock.On("GetPool", _a0, _a1)}
}
func (_c *AmmKeeper_GetPool_Call) Run(run func(_a0 types.Context, _a1 uint64)) *AmmKeeper_GetPool_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(types.Context), args[1].(uint64))
})
return _c
}
func (_c *AmmKeeper_GetPool_Call) Return(_a0 ammtypes.Pool, _a1 bool) *AmmKeeper_GetPool_Call {
_c.Call.Return(_a0, _a1)
return _c
}
func (_c *AmmKeeper_GetPool_Call) RunAndReturn(run func(types.Context, uint64) (ammtypes.Pool, bool)) *AmmKeeper_GetPool_Call {
_c.Call.Return(run)
return _c
}
// IterateLiquidityPools provides a mock function with given fields: _a0, _a1
func (_m *AmmKeeper) IterateLiquidityPools(_a0 types.Context, _a1 func(ammtypes.Pool) bool) {
_m.Called(_a0, _a1)
}
// AmmKeeper_IterateLiquidityPools_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'IterateLiquidityPools'
type AmmKeeper_IterateLiquidityPools_Call struct {
*mock.Call
}
// IterateLiquidityPools is a helper method to define mock.On call
// - _a0 types.Context
// - _a1 func(ammtypes.Pool) bool
func (_e *AmmKeeper_Expecter) IterateLiquidityPools(_a0 interface{}, _a1 interface{}) *AmmKeeper_IterateLiquidityPools_Call {
return &AmmKeeper_IterateLiquidityPools_Call{Call: _e.mock.On("IterateLiquidityPools", _a0, _a1)}
}
func (_c *AmmKeeper_IterateLiquidityPools_Call) Run(run func(_a0 types.Context, _a1 func(ammtypes.Pool) bool)) *AmmKeeper_IterateLiquidityPools_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(types.Context), args[1].(func(ammtypes.Pool) bool))
})
return _c
}
func (_c *AmmKeeper_IterateLiquidityPools_Call) Return() *AmmKeeper_IterateLiquidityPools_Call {
_c.Call.Return()
return _c
}
func (_c *AmmKeeper_IterateLiquidityPools_Call) RunAndReturn(run func(types.Context, func(ammtypes.Pool) bool)) *AmmKeeper_IterateLiquidityPools_Call {
_c.Call.Return(run)
return _c
}
// NewAmmKeeper creates a new instance of AmmKeeper. 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 NewAmmKeeper(t interface {
mock.TestingT
Cleanup(func())
}) *AmmKeeper {
mock := &AmmKeeper{}
mock.Mock.Test(t)
t.Cleanup(func() { mock.AssertExpectations(t) })
return mock
}