AlbyService.go raw
1 // Code generated by mockery; DO NOT EDIT.
2 // github.com/vektra/mockery
3 // template: testify
4
5 package mocks
6
7 import (
8 "context"
9
10 "github.com/getAlby/hub/alby"
11 mock "github.com/stretchr/testify/mock"
12 )
13
14 // NewMockAlbyService creates a new instance of MockAlbyService. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
15 // The first argument is typically a *testing.T value.
16 func NewMockAlbyService(t interface {
17 mock.TestingT
18 Cleanup(func())
19 }) *MockAlbyService {
20 mock := &MockAlbyService{}
21 mock.Mock.Test(t)
22
23 t.Cleanup(func() { mock.AssertExpectations(t) })
24
25 return mock
26 }
27
28 // MockAlbyService is an autogenerated mock type for the AlbyService type
29 type MockAlbyService struct {
30 mock.Mock
31 }
32
33 type MockAlbyService_Expecter struct {
34 mock *mock.Mock
35 }
36
37 func (_m *MockAlbyService) EXPECT() *MockAlbyService_Expecter {
38 return &MockAlbyService_Expecter{mock: &_m.Mock}
39 }
40
41 // GetBitcoinRate provides a mock function for the type MockAlbyService
42 func (_mock *MockAlbyService) GetBitcoinRate(ctx context.Context, currency string) (*alby.BitcoinRate, error) {
43 ret := _mock.Called(ctx, currency)
44
45 if len(ret) == 0 {
46 panic("no return value specified for GetBitcoinRate")
47 }
48
49 var r0 *alby.BitcoinRate
50 var r1 error
51 if returnFunc, ok := ret.Get(0).(func(context.Context, string) (*alby.BitcoinRate, error)); ok {
52 return returnFunc(ctx, currency)
53 }
54 if returnFunc, ok := ret.Get(0).(func(context.Context, string) *alby.BitcoinRate); ok {
55 r0 = returnFunc(ctx, currency)
56 } else {
57 if ret.Get(0) != nil {
58 r0 = ret.Get(0).(*alby.BitcoinRate)
59 }
60 }
61 if returnFunc, ok := ret.Get(1).(func(context.Context, string) error); ok {
62 r1 = returnFunc(ctx, currency)
63 } else {
64 r1 = ret.Error(1)
65 }
66 return r0, r1
67 }
68
69 // MockAlbyService_GetBitcoinRate_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetBitcoinRate'
70 type MockAlbyService_GetBitcoinRate_Call struct {
71 *mock.Call
72 }
73
74 // GetBitcoinRate is a helper method to define mock.On call
75 // - ctx context.Context
76 // - currency string
77 func (_e *MockAlbyService_Expecter) GetBitcoinRate(ctx interface{}, currency interface{}) *MockAlbyService_GetBitcoinRate_Call {
78 return &MockAlbyService_GetBitcoinRate_Call{Call: _e.mock.On("GetBitcoinRate", ctx, currency)}
79 }
80
81 func (_c *MockAlbyService_GetBitcoinRate_Call) Run(run func(ctx context.Context, currency string)) *MockAlbyService_GetBitcoinRate_Call {
82 _c.Call.Run(func(args mock.Arguments) {
83 var arg0 context.Context
84 if args[0] != nil {
85 arg0 = args[0].(context.Context)
86 }
87 var arg1 string
88 if args[1] != nil {
89 arg1 = args[1].(string)
90 }
91 run(
92 arg0,
93 arg1,
94 )
95 })
96 return _c
97 }
98
99 func (_c *MockAlbyService_GetBitcoinRate_Call) Return(bitcoinRate *alby.BitcoinRate, err error) *MockAlbyService_GetBitcoinRate_Call {
100 _c.Call.Return(bitcoinRate, err)
101 return _c
102 }
103
104 func (_c *MockAlbyService_GetBitcoinRate_Call) RunAndReturn(run func(ctx context.Context, currency string) (*alby.BitcoinRate, error)) *MockAlbyService_GetBitcoinRate_Call {
105 _c.Call.Return(run)
106 return _c
107 }
108
109 // GetChannelPeerSuggestions provides a mock function for the type MockAlbyService
110 func (_mock *MockAlbyService) GetChannelPeerSuggestions(ctx context.Context) ([]alby.ChannelPeerSuggestion, error) {
111 ret := _mock.Called(ctx)
112
113 if len(ret) == 0 {
114 panic("no return value specified for GetChannelPeerSuggestions")
115 }
116
117 var r0 []alby.ChannelPeerSuggestion
118 var r1 error
119 if returnFunc, ok := ret.Get(0).(func(context.Context) ([]alby.ChannelPeerSuggestion, error)); ok {
120 return returnFunc(ctx)
121 }
122 if returnFunc, ok := ret.Get(0).(func(context.Context) []alby.ChannelPeerSuggestion); ok {
123 r0 = returnFunc(ctx)
124 } else {
125 if ret.Get(0) != nil {
126 r0 = ret.Get(0).([]alby.ChannelPeerSuggestion)
127 }
128 }
129 if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok {
130 r1 = returnFunc(ctx)
131 } else {
132 r1 = ret.Error(1)
133 }
134 return r0, r1
135 }
136
137 // MockAlbyService_GetChannelPeerSuggestions_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetChannelPeerSuggestions'
138 type MockAlbyService_GetChannelPeerSuggestions_Call struct {
139 *mock.Call
140 }
141
142 // GetChannelPeerSuggestions is a helper method to define mock.On call
143 // - ctx context.Context
144 func (_e *MockAlbyService_Expecter) GetChannelPeerSuggestions(ctx interface{}) *MockAlbyService_GetChannelPeerSuggestions_Call {
145 return &MockAlbyService_GetChannelPeerSuggestions_Call{Call: _e.mock.On("GetChannelPeerSuggestions", ctx)}
146 }
147
148 func (_c *MockAlbyService_GetChannelPeerSuggestions_Call) Run(run func(ctx context.Context)) *MockAlbyService_GetChannelPeerSuggestions_Call {
149 _c.Call.Run(func(args mock.Arguments) {
150 var arg0 context.Context
151 if args[0] != nil {
152 arg0 = args[0].(context.Context)
153 }
154 run(
155 arg0,
156 )
157 })
158 return _c
159 }
160
161 func (_c *MockAlbyService_GetChannelPeerSuggestions_Call) Return(channelPeerSuggestions []alby.ChannelPeerSuggestion, err error) *MockAlbyService_GetChannelPeerSuggestions_Call {
162 _c.Call.Return(channelPeerSuggestions, err)
163 return _c
164 }
165
166 func (_c *MockAlbyService_GetChannelPeerSuggestions_Call) RunAndReturn(run func(ctx context.Context) ([]alby.ChannelPeerSuggestion, error)) *MockAlbyService_GetChannelPeerSuggestions_Call {
167 _c.Call.Return(run)
168 return _c
169 }
170
171 // GetCurrencies provides a mock function for the type MockAlbyService
172 func (_mock *MockAlbyService) GetCurrencies(ctx context.Context) ([]alby.Currency, error) {
173 ret := _mock.Called(ctx)
174
175 if len(ret) == 0 {
176 panic("no return value specified for GetCurrencies")
177 }
178
179 var r0 []alby.Currency
180 var r1 error
181 if returnFunc, ok := ret.Get(0).(func(context.Context) ([]alby.Currency, error)); ok {
182 return returnFunc(ctx)
183 }
184 if returnFunc, ok := ret.Get(0).(func(context.Context) []alby.Currency); ok {
185 r0 = returnFunc(ctx)
186 } else {
187 if ret.Get(0) != nil {
188 r0 = ret.Get(0).([]alby.Currency)
189 }
190 }
191 if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok {
192 r1 = returnFunc(ctx)
193 } else {
194 r1 = ret.Error(1)
195 }
196 return r0, r1
197 }
198
199 // MockAlbyService_GetCurrencies_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetCurrencies'
200 type MockAlbyService_GetCurrencies_Call struct {
201 *mock.Call
202 }
203
204 // GetCurrencies is a helper method to define mock.On call
205 // - ctx context.Context
206 func (_e *MockAlbyService_Expecter) GetCurrencies(ctx interface{}) *MockAlbyService_GetCurrencies_Call {
207 return &MockAlbyService_GetCurrencies_Call{Call: _e.mock.On("GetCurrencies", ctx)}
208 }
209
210 func (_c *MockAlbyService_GetCurrencies_Call) Run(run func(ctx context.Context)) *MockAlbyService_GetCurrencies_Call {
211 _c.Call.Run(func(args mock.Arguments) {
212 var arg0 context.Context
213 if args[0] != nil {
214 arg0 = args[0].(context.Context)
215 }
216 run(
217 arg0,
218 )
219 })
220 return _c
221 }
222
223 func (_c *MockAlbyService_GetCurrencies_Call) Return(currencys []alby.Currency, err error) *MockAlbyService_GetCurrencies_Call {
224 _c.Call.Return(currencys, err)
225 return _c
226 }
227
228 func (_c *MockAlbyService_GetCurrencies_Call) RunAndReturn(run func(ctx context.Context) ([]alby.Currency, error)) *MockAlbyService_GetCurrencies_Call {
229 _c.Call.Return(run)
230 return _c
231 }
232
233 // GetInfo provides a mock function for the type MockAlbyService
234 func (_mock *MockAlbyService) GetInfo(ctx context.Context) (*alby.AlbyInfo, error) {
235 ret := _mock.Called(ctx)
236
237 if len(ret) == 0 {
238 panic("no return value specified for GetInfo")
239 }
240
241 var r0 *alby.AlbyInfo
242 var r1 error
243 if returnFunc, ok := ret.Get(0).(func(context.Context) (*alby.AlbyInfo, error)); ok {
244 return returnFunc(ctx)
245 }
246 if returnFunc, ok := ret.Get(0).(func(context.Context) *alby.AlbyInfo); ok {
247 r0 = returnFunc(ctx)
248 } else {
249 if ret.Get(0) != nil {
250 r0 = ret.Get(0).(*alby.AlbyInfo)
251 }
252 }
253 if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok {
254 r1 = returnFunc(ctx)
255 } else {
256 r1 = ret.Error(1)
257 }
258 return r0, r1
259 }
260
261 // MockAlbyService_GetInfo_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetInfo'
262 type MockAlbyService_GetInfo_Call struct {
263 *mock.Call
264 }
265
266 // GetInfo is a helper method to define mock.On call
267 // - ctx context.Context
268 func (_e *MockAlbyService_Expecter) GetInfo(ctx interface{}) *MockAlbyService_GetInfo_Call {
269 return &MockAlbyService_GetInfo_Call{Call: _e.mock.On("GetInfo", ctx)}
270 }
271
272 func (_c *MockAlbyService_GetInfo_Call) Run(run func(ctx context.Context)) *MockAlbyService_GetInfo_Call {
273 _c.Call.Run(func(args mock.Arguments) {
274 var arg0 context.Context
275 if args[0] != nil {
276 arg0 = args[0].(context.Context)
277 }
278 run(
279 arg0,
280 )
281 })
282 return _c
283 }
284
285 func (_c *MockAlbyService_GetInfo_Call) Return(albyInfo *alby.AlbyInfo, err error) *MockAlbyService_GetInfo_Call {
286 _c.Call.Return(albyInfo, err)
287 return _c
288 }
289
290 func (_c *MockAlbyService_GetInfo_Call) RunAndReturn(run func(ctx context.Context) (*alby.AlbyInfo, error)) *MockAlbyService_GetInfo_Call {
291 _c.Call.Return(run)
292 return _c
293 }
294