1// Code generated by mockery; DO NOT EDIT.
2// github.com/vektra/mockery
3// template: testify
4
5package mocks
6
7import (
8 "context"
9
10 mock "github.com/stretchr/testify/mock"
11)
12
13// NewMockAppTrafficRefresher creates a new instance of MockAppTrafficRefresher. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
14// The first argument is typically a *testing.T value.
15func NewMockAppTrafficRefresher(t interface {
16 mock.TestingT
17 Cleanup(func())
18}) *MockAppTrafficRefresher {
19 if helper, ok := t.(interface{ Helper() }); ok {
20 helper.Helper()
21 }
22
23 mock := &MockAppTrafficRefresher{}
24 mock.Mock.Test(t)
25
26 t.Cleanup(func() {
27 if helper, ok := t.(interface{ Helper() }); ok {
28 helper.Helper()
29 }
30 mock.AssertExpectations(t)
31 })
32
33 return mock
34}
35
36// MockAppTrafficRefresher is an autogenerated mock type for the AppTrafficRefresher type
37type MockAppTrafficRefresher struct {
38 mock.Mock
39}
40
41type MockAppTrafficRefresher_Expecter struct {
42 mock *mock.Mock
43}
44
45func (_m *MockAppTrafficRefresher) EXPECT() *MockAppTrafficRefresher_Expecter {
46 return &MockAppTrafficRefresher_Expecter{mock: &_m.Mock}
47}
48
49// RebuildTraffic provides a mock function for the type MockAppTrafficRefresher
50func (_mock *MockAppTrafficRefresher) RebuildTraffic(ctx context.Context) error {
51 ret := _mock.Called(ctx)
52
53 if len(ret) == 0 {
54 panic("no return value specified for RebuildTraffic")
55 }
56
57 var r0 error
58 if returnFunc, ok := ret.Get(0).(func(context.Context) error); ok {
59 r0 = returnFunc(ctx)
60 } else {
61 r0 = ret.Error(0)
62 }
63 return r0
64}
65
66// MockAppTrafficRefresher_RebuildTraffic_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RebuildTraffic'
67type MockAppTrafficRefresher_RebuildTraffic_Call struct {
68 *mock.Call
69}
70
71// RebuildTraffic is a helper method to define mock.On call
72// - ctx context.Context
73func (_e *MockAppTrafficRefresher_Expecter) RebuildTraffic(ctx any) *MockAppTrafficRefresher_RebuildTraffic_Call {
74 return &MockAppTrafficRefresher_RebuildTraffic_Call{Call: _e.mock.On("RebuildTraffic", ctx)}
75}
76
77func (_c *MockAppTrafficRefresher_RebuildTraffic_Call) Run(run func(ctx context.Context)) *MockAppTrafficRefresher_RebuildTraffic_Call {
78 _c.Call.Run(func(args mock.Arguments) {
79 var arg0 context.Context
80 if args[0] != nil {
81 arg0 = args[0].(context.Context)
82 }
83 run(
84 arg0,
85 )
86 })
87 return _c
88}
89
90func (_c *MockAppTrafficRefresher_RebuildTraffic_Call) Return(err error) *MockAppTrafficRefresher_RebuildTraffic_Call {
91 _c.Call.Return(err)
92 return _c
93}
94
95func (_c *MockAppTrafficRefresher_RebuildTraffic_Call) RunAndReturn(run func(ctx context.Context) error) *MockAppTrafficRefresher_RebuildTraffic_Call {
96 _c.Call.Return(run)
97 return _c
98}
99
100// WithdrawService provides a mock function for the type MockAppTrafficRefresher
101func (_mock *MockAppTrafficRefresher) WithdrawService(ctx context.Context, app string, service string) error {
102 ret := _mock.Called(ctx, app, service)
103
104 if len(ret) == 0 {
105 panic("no return value specified for WithdrawService")
106 }
107
108 var r0 error
109 if returnFunc, ok := ret.Get(0).(func(context.Context, string, string) error); ok {
110 r0 = returnFunc(ctx, app, service)
111 } else {
112 r0 = ret.Error(0)
113 }
114 return r0
115}
116
117// MockAppTrafficRefresher_WithdrawService_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WithdrawService'
118type MockAppTrafficRefresher_WithdrawService_Call struct {
119 *mock.Call
120}
121
122// WithdrawService is a helper method to define mock.On call
123// - ctx context.Context
124// - app string
125// - service string
126func (_e *MockAppTrafficRefresher_Expecter) WithdrawService(ctx any, app any, service any) *MockAppTrafficRefresher_WithdrawService_Call {
127 return &MockAppTrafficRefresher_WithdrawService_Call{Call: _e.mock.On("WithdrawService", ctx, app, service)}
128}
129
130func (_c *MockAppTrafficRefresher_WithdrawService_Call) Run(run func(ctx context.Context, app string, service string)) *MockAppTrafficRefresher_WithdrawService_Call {
131 _c.Call.Run(func(args mock.Arguments) {
132 var arg0 context.Context
133 if args[0] != nil {
134 arg0 = args[0].(context.Context)
135 }
136 var arg1 string
137 if args[1] != nil {
138 arg1 = args[1].(string)
139 }
140 var arg2 string
141 if args[2] != nil {
142 arg2 = args[2].(string)
143 }
144 run(
145 arg0,
146 arg1,
147 arg2,
148 )
149 })
150 return _c
151}
152
153func (_c *MockAppTrafficRefresher_WithdrawService_Call) Return(err error) *MockAppTrafficRefresher_WithdrawService_Call {
154 _c.Call.Return(err)
155 return _c
156}
157
158func (_c *MockAppTrafficRefresher_WithdrawService_Call) RunAndReturn(run func(ctx context.Context, app string, service string) error) *MockAppTrafficRefresher_WithdrawService_Call {
159 _c.Call.Return(run)
160 return _c
161}
162
163// WithdrawServiceState provides a mock function for the type MockAppTrafficRefresher
164func (_mock *MockAppTrafficRefresher) WithdrawServiceState(ctx context.Context, app string, service string) error {
165 ret := _mock.Called(ctx, app, service)
166
167 if len(ret) == 0 {
168 panic("no return value specified for WithdrawServiceState")
169 }
170
171 var r0 error
172 if returnFunc, ok := ret.Get(0).(func(context.Context, string, string) error); ok {
173 r0 = returnFunc(ctx, app, service)
174 } else {
175 r0 = ret.Error(0)
176 }
177 return r0
178}
179
180// MockAppTrafficRefresher_WithdrawServiceState_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WithdrawServiceState'
181type MockAppTrafficRefresher_WithdrawServiceState_Call struct {
182 *mock.Call
183}
184
185// WithdrawServiceState is a helper method to define mock.On call
186// - ctx context.Context
187// - app string
188// - service string
189func (_e *MockAppTrafficRefresher_Expecter) WithdrawServiceState(ctx any, app any, service any) *MockAppTrafficRefresher_WithdrawServiceState_Call {
190 return &MockAppTrafficRefresher_WithdrawServiceState_Call{Call: _e.mock.On("WithdrawServiceState", ctx, app, service)}
191}
192
193func (_c *MockAppTrafficRefresher_WithdrawServiceState_Call) Run(run func(ctx context.Context, app string, service string)) *MockAppTrafficRefresher_WithdrawServiceState_Call {
194 _c.Call.Run(func(args mock.Arguments) {
195 var arg0 context.Context
196 if args[0] != nil {
197 arg0 = args[0].(context.Context)
198 }
199 var arg1 string
200 if args[1] != nil {
201 arg1 = args[1].(string)
202 }
203 var arg2 string
204 if args[2] != nil {
205 arg2 = args[2].(string)
206 }
207 run(
208 arg0,
209 arg1,
210 arg2,
211 )
212 })
213 return _c
214}
215
216func (_c *MockAppTrafficRefresher_WithdrawServiceState_Call) Return(err error) *MockAppTrafficRefresher_WithdrawServiceState_Call {
217 _c.Call.Return(err)
218 return _c
219}
220
221func (_c *MockAppTrafficRefresher_WithdrawServiceState_Call) RunAndReturn(run func(ctx context.Context, app string, service string) error) *MockAppTrafficRefresher_WithdrawServiceState_Call {
222 _c.Call.Return(run)
223 return _c
224}