// Code generated by mockery; DO NOT EDIT. // github.com/vektra/mockery // template: testify package mocks import ( "context" mock "github.com/stretchr/testify/mock" ) // 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. // The first argument is typically a *testing.T value. func NewMockAppTrafficRefresher(t interface { mock.TestingT Cleanup(func()) }) *MockAppTrafficRefresher { if helper, ok := t.(interface{ Helper() }); ok { helper.Helper() } mock := &MockAppTrafficRefresher{} mock.Mock.Test(t) t.Cleanup(func() { if helper, ok := t.(interface{ Helper() }); ok { helper.Helper() } mock.AssertExpectations(t) }) return mock } // MockAppTrafficRefresher is an autogenerated mock type for the AppTrafficRefresher type type MockAppTrafficRefresher struct { mock.Mock } type MockAppTrafficRefresher_Expecter struct { mock *mock.Mock } func (_m *MockAppTrafficRefresher) EXPECT() *MockAppTrafficRefresher_Expecter { return &MockAppTrafficRefresher_Expecter{mock: &_m.Mock} } // RebuildTraffic provides a mock function for the type MockAppTrafficRefresher func (_mock *MockAppTrafficRefresher) RebuildTraffic(ctx context.Context) error { ret := _mock.Called(ctx) if len(ret) == 0 { panic("no return value specified for RebuildTraffic") } var r0 error if returnFunc, ok := ret.Get(0).(func(context.Context) error); ok { r0 = returnFunc(ctx) } else { r0 = ret.Error(0) } return r0 } // MockAppTrafficRefresher_RebuildTraffic_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RebuildTraffic' type MockAppTrafficRefresher_RebuildTraffic_Call struct { *mock.Call } // RebuildTraffic is a helper method to define mock.On call // - ctx context.Context func (_e *MockAppTrafficRefresher_Expecter) RebuildTraffic(ctx any) *MockAppTrafficRefresher_RebuildTraffic_Call { return &MockAppTrafficRefresher_RebuildTraffic_Call{Call: _e.mock.On("RebuildTraffic", ctx)} } func (_c *MockAppTrafficRefresher_RebuildTraffic_Call) Run(run func(ctx context.Context)) *MockAppTrafficRefresher_RebuildTraffic_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 context.Context if args[0] != nil { arg0 = args[0].(context.Context) } run( arg0, ) }) return _c } func (_c *MockAppTrafficRefresher_RebuildTraffic_Call) Return(err error) *MockAppTrafficRefresher_RebuildTraffic_Call { _c.Call.Return(err) return _c } func (_c *MockAppTrafficRefresher_RebuildTraffic_Call) RunAndReturn(run func(ctx context.Context) error) *MockAppTrafficRefresher_RebuildTraffic_Call { _c.Call.Return(run) return _c } // WithdrawService provides a mock function for the type MockAppTrafficRefresher func (_mock *MockAppTrafficRefresher) WithdrawService(ctx context.Context, app string, service string) error { ret := _mock.Called(ctx, app, service) if len(ret) == 0 { panic("no return value specified for WithdrawService") } var r0 error if returnFunc, ok := ret.Get(0).(func(context.Context, string, string) error); ok { r0 = returnFunc(ctx, app, service) } else { r0 = ret.Error(0) } return r0 } // MockAppTrafficRefresher_WithdrawService_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WithdrawService' type MockAppTrafficRefresher_WithdrawService_Call struct { *mock.Call } // WithdrawService is a helper method to define mock.On call // - ctx context.Context // - app string // - service string func (_e *MockAppTrafficRefresher_Expecter) WithdrawService(ctx any, app any, service any) *MockAppTrafficRefresher_WithdrawService_Call { return &MockAppTrafficRefresher_WithdrawService_Call{Call: _e.mock.On("WithdrawService", ctx, app, service)} } func (_c *MockAppTrafficRefresher_WithdrawService_Call) Run(run func(ctx context.Context, app string, service string)) *MockAppTrafficRefresher_WithdrawService_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 context.Context if args[0] != nil { arg0 = args[0].(context.Context) } var arg1 string if args[1] != nil { arg1 = args[1].(string) } var arg2 string if args[2] != nil { arg2 = args[2].(string) } run( arg0, arg1, arg2, ) }) return _c } func (_c *MockAppTrafficRefresher_WithdrawService_Call) Return(err error) *MockAppTrafficRefresher_WithdrawService_Call { _c.Call.Return(err) return _c } func (_c *MockAppTrafficRefresher_WithdrawService_Call) RunAndReturn(run func(ctx context.Context, app string, service string) error) *MockAppTrafficRefresher_WithdrawService_Call { _c.Call.Return(run) return _c } // WithdrawServiceState provides a mock function for the type MockAppTrafficRefresher func (_mock *MockAppTrafficRefresher) WithdrawServiceState(ctx context.Context, app string, service string) error { ret := _mock.Called(ctx, app, service) if len(ret) == 0 { panic("no return value specified for WithdrawServiceState") } var r0 error if returnFunc, ok := ret.Get(0).(func(context.Context, string, string) error); ok { r0 = returnFunc(ctx, app, service) } else { r0 = ret.Error(0) } return r0 } // MockAppTrafficRefresher_WithdrawServiceState_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WithdrawServiceState' type MockAppTrafficRefresher_WithdrawServiceState_Call struct { *mock.Call } // WithdrawServiceState is a helper method to define mock.On call // - ctx context.Context // - app string // - service string func (_e *MockAppTrafficRefresher_Expecter) WithdrawServiceState(ctx any, app any, service any) *MockAppTrafficRefresher_WithdrawServiceState_Call { return &MockAppTrafficRefresher_WithdrawServiceState_Call{Call: _e.mock.On("WithdrawServiceState", ctx, app, service)} } func (_c *MockAppTrafficRefresher_WithdrawServiceState_Call) Run(run func(ctx context.Context, app string, service string)) *MockAppTrafficRefresher_WithdrawServiceState_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 context.Context if args[0] != nil { arg0 = args[0].(context.Context) } var arg1 string if args[1] != nil { arg1 = args[1].(string) } var arg2 string if args[2] != nil { arg2 = args[2].(string) } run( arg0, arg1, arg2, ) }) return _c } func (_c *MockAppTrafficRefresher_WithdrawServiceState_Call) Return(err error) *MockAppTrafficRefresher_WithdrawServiceState_Call { _c.Call.Return(err) return _c } func (_c *MockAppTrafficRefresher_WithdrawServiceState_Call) RunAndReturn(run func(ctx context.Context, app string, service string) error) *MockAppTrafficRefresher_WithdrawServiceState_Call { _c.Call.Return(run) return _c }