// Code generated by mockery; DO NOT EDIT. // github.com/vektra/mockery // template: testify package portsmocks import ( "context" "github.com/bnema/vev/internal/ports" mock "github.com/stretchr/testify/mock" ) // NewMockBrokerHostAuthorityReader creates a new instance of MockBrokerHostAuthorityReader. 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 NewMockBrokerHostAuthorityReader(t interface { mock.TestingT Cleanup(func()) }) *MockBrokerHostAuthorityReader { if helper, ok := t.(interface{ Helper() }); ok { helper.Helper() } mock := &MockBrokerHostAuthorityReader{} mock.Mock.Test(t) t.Cleanup(func() { if helper, ok := t.(interface{ Helper() }); ok { helper.Helper() } mock.AssertExpectations(t) }) return mock } // MockBrokerHostAuthorityReader is an autogenerated mock type for the BrokerHostAuthorityReader type type MockBrokerHostAuthorityReader struct { mock.Mock } type MockBrokerHostAuthorityReader_Expecter struct { mock *mock.Mock } func (_m *MockBrokerHostAuthorityReader) EXPECT() *MockBrokerHostAuthorityReader_Expecter { return &MockBrokerHostAuthorityReader_Expecter{mock: &_m.Mock} } // LookupHost provides a mock function for the type MockBrokerHostAuthorityReader func (_mock *MockBrokerHostAuthorityReader) LookupHost(ctx context.Context, endpoint string) (ports.BrokerHostRecord, bool, error) { ret := _mock.Called(ctx, endpoint) if len(ret) == 0 { panic("no return value specified for LookupHost") } var r0 ports.BrokerHostRecord var r1 bool var r2 error if returnFunc, ok := ret.Get(0).(func(context.Context, string) (ports.BrokerHostRecord, bool, error)); ok { return returnFunc(ctx, endpoint) } if returnFunc, ok := ret.Get(0).(func(context.Context, string) ports.BrokerHostRecord); ok { r0 = returnFunc(ctx, endpoint) } else { r0 = ret.Get(0).(ports.BrokerHostRecord) } if returnFunc, ok := ret.Get(1).(func(context.Context, string) bool); ok { r1 = returnFunc(ctx, endpoint) } else { r1 = ret.Get(1).(bool) } if returnFunc, ok := ret.Get(2).(func(context.Context, string) error); ok { r2 = returnFunc(ctx, endpoint) } else { r2 = ret.Error(2) } return r0, r1, r2 } // MockBrokerHostAuthorityReader_LookupHost_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'LookupHost' type MockBrokerHostAuthorityReader_LookupHost_Call struct { *mock.Call } // LookupHost is a helper method to define mock.On call // - ctx context.Context // - endpoint string func (_e *MockBrokerHostAuthorityReader_Expecter) LookupHost(ctx any, endpoint any) *MockBrokerHostAuthorityReader_LookupHost_Call { return &MockBrokerHostAuthorityReader_LookupHost_Call{Call: _e.mock.On("LookupHost", ctx, endpoint)} } func (_c *MockBrokerHostAuthorityReader_LookupHost_Call) Run(run func(ctx context.Context, endpoint string)) *MockBrokerHostAuthorityReader_LookupHost_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) } run( arg0, arg1, ) }) return _c } func (_c *MockBrokerHostAuthorityReader_LookupHost_Call) Return(brokerHostRecord ports.BrokerHostRecord, b bool, err error) *MockBrokerHostAuthorityReader_LookupHost_Call { _c.Call.Return(brokerHostRecord, b, err) return _c } func (_c *MockBrokerHostAuthorityReader_LookupHost_Call) RunAndReturn(run func(ctx context.Context, endpoint string) (ports.BrokerHostRecord, bool, error)) *MockBrokerHostAuthorityReader_LookupHost_Call { _c.Call.Return(run) return _c } // NewMockBrokerHostStore creates a new instance of MockBrokerHostStore. 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 NewMockBrokerHostStore(t interface { mock.TestingT Cleanup(func()) }) *MockBrokerHostStore { if helper, ok := t.(interface{ Helper() }); ok { helper.Helper() } mock := &MockBrokerHostStore{} mock.Mock.Test(t) t.Cleanup(func() { if helper, ok := t.(interface{ Helper() }); ok { helper.Helper() } mock.AssertExpectations(t) }) return mock } // MockBrokerHostStore is an autogenerated mock type for the BrokerHostStore type type MockBrokerHostStore struct { mock.Mock } type MockBrokerHostStore_Expecter struct { mock *mock.Mock } func (_m *MockBrokerHostStore) EXPECT() *MockBrokerHostStore_Expecter { return &MockBrokerHostStore_Expecter{mock: &_m.Mock} } // Close provides a mock function for the type MockBrokerHostStore func (_mock *MockBrokerHostStore) Close() error { ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for Close") } var r0 error if returnFunc, ok := ret.Get(0).(func() error); ok { r0 = returnFunc() } else { r0 = ret.Error(0) } return r0 } // MockBrokerHostStore_Close_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Close' type MockBrokerHostStore_Close_Call struct { *mock.Call } // Close is a helper method to define mock.On call func (_e *MockBrokerHostStore_Expecter) Close() *MockBrokerHostStore_Close_Call { return &MockBrokerHostStore_Close_Call{Call: _e.mock.On("Close")} } func (_c *MockBrokerHostStore_Close_Call) Run(run func()) *MockBrokerHostStore_Close_Call { _c.Call.Run(func(args mock.Arguments) { run() }) return _c } func (_c *MockBrokerHostStore_Close_Call) Return(err error) *MockBrokerHostStore_Close_Call { _c.Call.Return(err) return _c } func (_c *MockBrokerHostStore_Close_Call) RunAndReturn(run func() error) *MockBrokerHostStore_Close_Call { _c.Call.Return(run) return _c } // Load provides a mock function for the type MockBrokerHostStore func (_mock *MockBrokerHostStore) Load() (ports.BrokerSnapshot, error) { ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for Load") } var r0 ports.BrokerSnapshot var r1 error if returnFunc, ok := ret.Get(0).(func() (ports.BrokerSnapshot, error)); ok { return returnFunc() } if returnFunc, ok := ret.Get(0).(func() ports.BrokerSnapshot); ok { r0 = returnFunc() } else { r0 = ret.Get(0).(ports.BrokerSnapshot) } if returnFunc, ok := ret.Get(1).(func() error); ok { r1 = returnFunc() } else { r1 = ret.Error(1) } return r0, r1 } // MockBrokerHostStore_Load_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Load' type MockBrokerHostStore_Load_Call struct { *mock.Call } // Load is a helper method to define mock.On call func (_e *MockBrokerHostStore_Expecter) Load() *MockBrokerHostStore_Load_Call { return &MockBrokerHostStore_Load_Call{Call: _e.mock.On("Load")} } func (_c *MockBrokerHostStore_Load_Call) Run(run func()) *MockBrokerHostStore_Load_Call { _c.Call.Run(func(args mock.Arguments) { run() }) return _c } func (_c *MockBrokerHostStore_Load_Call) Return(brokerSnapshot ports.BrokerSnapshot, err error) *MockBrokerHostStore_Load_Call { _c.Call.Return(brokerSnapshot, err) return _c } func (_c *MockBrokerHostStore_Load_Call) RunAndReturn(run func() (ports.BrokerSnapshot, error)) *MockBrokerHostStore_Load_Call { _c.Call.Return(run) return _c } // LoadHosts provides a mock function for the type MockBrokerHostStore func (_mock *MockBrokerHostStore) LoadHosts() (ports.BrokerHosts, error) { ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for LoadHosts") } var r0 ports.BrokerHosts var r1 error if returnFunc, ok := ret.Get(0).(func() (ports.BrokerHosts, error)); ok { return returnFunc() } if returnFunc, ok := ret.Get(0).(func() ports.BrokerHosts); ok { r0 = returnFunc() } else { r0 = ret.Get(0).(ports.BrokerHosts) } if returnFunc, ok := ret.Get(1).(func() error); ok { r1 = returnFunc() } else { r1 = ret.Error(1) } return r0, r1 } // MockBrokerHostStore_LoadHosts_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'LoadHosts' type MockBrokerHostStore_LoadHosts_Call struct { *mock.Call } // LoadHosts is a helper method to define mock.On call func (_e *MockBrokerHostStore_Expecter) LoadHosts() *MockBrokerHostStore_LoadHosts_Call { return &MockBrokerHostStore_LoadHosts_Call{Call: _e.mock.On("LoadHosts")} } func (_c *MockBrokerHostStore_LoadHosts_Call) Run(run func()) *MockBrokerHostStore_LoadHosts_Call { _c.Call.Run(func(args mock.Arguments) { run() }) return _c } func (_c *MockBrokerHostStore_LoadHosts_Call) Return(brokerHosts ports.BrokerHosts, err error) *MockBrokerHostStore_LoadHosts_Call { _c.Call.Return(brokerHosts, err) return _c } func (_c *MockBrokerHostStore_LoadHosts_Call) RunAndReturn(run func() (ports.BrokerHosts, error)) *MockBrokerHostStore_LoadHosts_Call { _c.Call.Return(run) return _c } // ReplaceHosts provides a mock function for the type MockBrokerHostStore func (_mock *MockBrokerHostStore) ReplaceHosts(expected uint64, hosts []ports.BrokerHostRecord) error { ret := _mock.Called(expected, hosts) if len(ret) == 0 { panic("no return value specified for ReplaceHosts") } var r0 error if returnFunc, ok := ret.Get(0).(func(uint64, []ports.BrokerHostRecord) error); ok { r0 = returnFunc(expected, hosts) } else { r0 = ret.Error(0) } return r0 } // MockBrokerHostStore_ReplaceHosts_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ReplaceHosts' type MockBrokerHostStore_ReplaceHosts_Call struct { *mock.Call } // ReplaceHosts is a helper method to define mock.On call // - expected uint64 // - hosts []ports.BrokerHostRecord func (_e *MockBrokerHostStore_Expecter) ReplaceHosts(expected any, hosts any) *MockBrokerHostStore_ReplaceHosts_Call { return &MockBrokerHostStore_ReplaceHosts_Call{Call: _e.mock.On("ReplaceHosts", expected, hosts)} } func (_c *MockBrokerHostStore_ReplaceHosts_Call) Run(run func(expected uint64, hosts []ports.BrokerHostRecord)) *MockBrokerHostStore_ReplaceHosts_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 uint64 if args[0] != nil { arg0 = args[0].(uint64) } var arg1 []ports.BrokerHostRecord if args[1] != nil { arg1 = args[1].([]ports.BrokerHostRecord) } run( arg0, arg1, ) }) return _c } func (_c *MockBrokerHostStore_ReplaceHosts_Call) Return(err error) *MockBrokerHostStore_ReplaceHosts_Call { _c.Call.Return(err) return _c } func (_c *MockBrokerHostStore_ReplaceHosts_Call) RunAndReturn(run func(expected uint64, hosts []ports.BrokerHostRecord) error) *MockBrokerHostStore_ReplaceHosts_Call { _c.Call.Return(run) return _c } // Store provides a mock function for the type MockBrokerHostStore func (_mock *MockBrokerHostStore) Store(brokerSnapshot ports.BrokerSnapshot) error { ret := _mock.Called(brokerSnapshot) if len(ret) == 0 { panic("no return value specified for Store") } var r0 error if returnFunc, ok := ret.Get(0).(func(ports.BrokerSnapshot) error); ok { r0 = returnFunc(brokerSnapshot) } else { r0 = ret.Error(0) } return r0 } // MockBrokerHostStore_Store_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Store' type MockBrokerHostStore_Store_Call struct { *mock.Call } // Store is a helper method to define mock.On call // - brokerSnapshot ports.BrokerSnapshot func (_e *MockBrokerHostStore_Expecter) Store(brokerSnapshot any) *MockBrokerHostStore_Store_Call { return &MockBrokerHostStore_Store_Call{Call: _e.mock.On("Store", brokerSnapshot)} } func (_c *MockBrokerHostStore_Store_Call) Run(run func(brokerSnapshot ports.BrokerSnapshot)) *MockBrokerHostStore_Store_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 ports.BrokerSnapshot if args[0] != nil { arg0 = args[0].(ports.BrokerSnapshot) } run( arg0, ) }) return _c } func (_c *MockBrokerHostStore_Store_Call) Return(err error) *MockBrokerHostStore_Store_Call { _c.Call.Return(err) return _c } func (_c *MockBrokerHostStore_Store_Call) RunAndReturn(run func(brokerSnapshot ports.BrokerSnapshot) error) *MockBrokerHostStore_Store_Call { _c.Call.Return(run) return _c }