// Code generated by mockery; DO NOT EDIT. // github.com/vektra/mockery // template: testify package portsmocks import ( "github.com/bnema/vev/internal/ports" "github.com/bnema/vev/internal/protocol" mock "github.com/stretchr/testify/mock" ) // NewMockBrokerLogicalConnection creates a new instance of MockBrokerLogicalConnection. 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 NewMockBrokerLogicalConnection(t interface { mock.TestingT Cleanup(func()) }) *MockBrokerLogicalConnection { if helper, ok := t.(interface{ Helper() }); ok { helper.Helper() } mock := &MockBrokerLogicalConnection{} mock.Mock.Test(t) t.Cleanup(func() { if helper, ok := t.(interface{ Helper() }); ok { helper.Helper() } mock.AssertExpectations(t) }) return mock } // MockBrokerLogicalConnection is an autogenerated mock type for the BrokerLogicalConnection type type MockBrokerLogicalConnection struct { mock.Mock } type MockBrokerLogicalConnection_Expecter struct { mock *mock.Mock } func (_m *MockBrokerLogicalConnection) EXPECT() *MockBrokerLogicalConnection_Expecter { return &MockBrokerLogicalConnection_Expecter{mock: &_m.Mock} } // Capabilities provides a mock function for the type MockBrokerLogicalConnection func (_mock *MockBrokerLogicalConnection) Capabilities() protocol.ConnectionCapabilities { ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for Capabilities") } var r0 protocol.ConnectionCapabilities if returnFunc, ok := ret.Get(0).(func() protocol.ConnectionCapabilities); ok { r0 = returnFunc() } else { r0 = ret.Get(0).(protocol.ConnectionCapabilities) } return r0 } // MockBrokerLogicalConnection_Capabilities_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Capabilities' type MockBrokerLogicalConnection_Capabilities_Call struct { *mock.Call } // Capabilities is a helper method to define mock.On call func (_e *MockBrokerLogicalConnection_Expecter) Capabilities() *MockBrokerLogicalConnection_Capabilities_Call { return &MockBrokerLogicalConnection_Capabilities_Call{Call: _e.mock.On("Capabilities")} } func (_c *MockBrokerLogicalConnection_Capabilities_Call) Run(run func()) *MockBrokerLogicalConnection_Capabilities_Call { _c.Call.Run(func(args mock.Arguments) { run() }) return _c } func (_c *MockBrokerLogicalConnection_Capabilities_Call) Return(connectionCapabilities protocol.ConnectionCapabilities) *MockBrokerLogicalConnection_Capabilities_Call { _c.Call.Return(connectionCapabilities) return _c } func (_c *MockBrokerLogicalConnection_Capabilities_Call) RunAndReturn(run func() protocol.ConnectionCapabilities) *MockBrokerLogicalConnection_Capabilities_Call { _c.Call.Return(run) return _c } // Close provides a mock function for the type MockBrokerLogicalConnection func (_mock *MockBrokerLogicalConnection) 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 } // MockBrokerLogicalConnection_Close_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Close' type MockBrokerLogicalConnection_Close_Call struct { *mock.Call } // Close is a helper method to define mock.On call func (_e *MockBrokerLogicalConnection_Expecter) Close() *MockBrokerLogicalConnection_Close_Call { return &MockBrokerLogicalConnection_Close_Call{Call: _e.mock.On("Close")} } func (_c *MockBrokerLogicalConnection_Close_Call) Run(run func()) *MockBrokerLogicalConnection_Close_Call { _c.Call.Run(func(args mock.Arguments) { run() }) return _c } func (_c *MockBrokerLogicalConnection_Close_Call) Return(err error) *MockBrokerLogicalConnection_Close_Call { _c.Call.Return(err) return _c } func (_c *MockBrokerLogicalConnection_Close_Call) RunAndReturn(run func() error) *MockBrokerLogicalConnection_Close_Call { _c.Call.Return(run) return _c } // Done provides a mock function for the type MockBrokerLogicalConnection func (_mock *MockBrokerLogicalConnection) Done() <-chan struct{} { ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for Done") } var r0 <-chan struct{} if returnFunc, ok := ret.Get(0).(func() <-chan struct{}); ok { r0 = returnFunc() } else { if ret.Get(0) != nil { r0 = ret.Get(0).(<-chan struct{}) } } return r0 } // MockBrokerLogicalConnection_Done_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Done' type MockBrokerLogicalConnection_Done_Call struct { *mock.Call } // Done is a helper method to define mock.On call func (_e *MockBrokerLogicalConnection_Expecter) Done() *MockBrokerLogicalConnection_Done_Call { return &MockBrokerLogicalConnection_Done_Call{Call: _e.mock.On("Done")} } func (_c *MockBrokerLogicalConnection_Done_Call) Run(run func()) *MockBrokerLogicalConnection_Done_Call { _c.Call.Run(func(args mock.Arguments) { run() }) return _c } func (_c *MockBrokerLogicalConnection_Done_Call) Return(valCh <-chan struct{}) *MockBrokerLogicalConnection_Done_Call { _c.Call.Return(valCh) return _c } func (_c *MockBrokerLogicalConnection_Done_Call) RunAndReturn(run func() <-chan struct{}) *MockBrokerLogicalConnection_Done_Call { _c.Call.Return(run) return _c } // Err provides a mock function for the type MockBrokerLogicalConnection func (_mock *MockBrokerLogicalConnection) Err() error { ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for Err") } var r0 error if returnFunc, ok := ret.Get(0).(func() error); ok { r0 = returnFunc() } else { r0 = ret.Error(0) } return r0 } // MockBrokerLogicalConnection_Err_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Err' type MockBrokerLogicalConnection_Err_Call struct { *mock.Call } // Err is a helper method to define mock.On call func (_e *MockBrokerLogicalConnection_Expecter) Err() *MockBrokerLogicalConnection_Err_Call { return &MockBrokerLogicalConnection_Err_Call{Call: _e.mock.On("Err")} } func (_c *MockBrokerLogicalConnection_Err_Call) Run(run func()) *MockBrokerLogicalConnection_Err_Call { _c.Call.Run(func(args mock.Arguments) { run() }) return _c } func (_c *MockBrokerLogicalConnection_Err_Call) Return(err error) *MockBrokerLogicalConnection_Err_Call { _c.Call.Return(err) return _c } func (_c *MockBrokerLogicalConnection_Err_Call) RunAndReturn(run func() error) *MockBrokerLogicalConnection_Err_Call { _c.Call.Return(run) return _c } // LinkEvents provides a mock function for the type MockBrokerLogicalConnection func (_mock *MockBrokerLogicalConnection) LinkEvents() <-chan ports.LinkEvent { ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for LinkEvents") } var r0 <-chan ports.LinkEvent if returnFunc, ok := ret.Get(0).(func() <-chan ports.LinkEvent); ok { r0 = returnFunc() } else { if ret.Get(0) != nil { r0 = ret.Get(0).(<-chan ports.LinkEvent) } } return r0 } // MockBrokerLogicalConnection_LinkEvents_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'LinkEvents' type MockBrokerLogicalConnection_LinkEvents_Call struct { *mock.Call } // LinkEvents is a helper method to define mock.On call func (_e *MockBrokerLogicalConnection_Expecter) LinkEvents() *MockBrokerLogicalConnection_LinkEvents_Call { return &MockBrokerLogicalConnection_LinkEvents_Call{Call: _e.mock.On("LinkEvents")} } func (_c *MockBrokerLogicalConnection_LinkEvents_Call) Run(run func()) *MockBrokerLogicalConnection_LinkEvents_Call { _c.Call.Run(func(args mock.Arguments) { run() }) return _c } func (_c *MockBrokerLogicalConnection_LinkEvents_Call) Return(linkEventCh <-chan ports.LinkEvent) *MockBrokerLogicalConnection_LinkEvents_Call { _c.Call.Return(linkEventCh) return _c } func (_c *MockBrokerLogicalConnection_LinkEvents_Call) RunAndReturn(run func() <-chan ports.LinkEvent) *MockBrokerLogicalConnection_LinkEvents_Call { _c.Call.Return(run) return _c } // LinkState provides a mock function for the type MockBrokerLogicalConnection func (_mock *MockBrokerLogicalConnection) LinkState() ports.LinkState { ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for LinkState") } var r0 ports.LinkState if returnFunc, ok := ret.Get(0).(func() ports.LinkState); ok { r0 = returnFunc() } else { r0 = ret.Get(0).(ports.LinkState) } return r0 } // MockBrokerLogicalConnection_LinkState_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'LinkState' type MockBrokerLogicalConnection_LinkState_Call struct { *mock.Call } // LinkState is a helper method to define mock.On call func (_e *MockBrokerLogicalConnection_Expecter) LinkState() *MockBrokerLogicalConnection_LinkState_Call { return &MockBrokerLogicalConnection_LinkState_Call{Call: _e.mock.On("LinkState")} } func (_c *MockBrokerLogicalConnection_LinkState_Call) Run(run func()) *MockBrokerLogicalConnection_LinkState_Call { _c.Call.Run(func(args mock.Arguments) { run() }) return _c } func (_c *MockBrokerLogicalConnection_LinkState_Call) Return(linkState ports.LinkState) *MockBrokerLogicalConnection_LinkState_Call { _c.Call.Return(linkState) return _c } func (_c *MockBrokerLogicalConnection_LinkState_Call) RunAndReturn(run func() ports.LinkState) *MockBrokerLogicalConnection_LinkState_Call { _c.Call.Return(run) return _c } // ReceiveServer provides a mock function for the type MockBrokerLogicalConnection func (_mock *MockBrokerLogicalConnection) ReceiveServer() (protocol.ServerMessage, error) { ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for ReceiveServer") } var r0 protocol.ServerMessage var r1 error if returnFunc, ok := ret.Get(0).(func() (protocol.ServerMessage, error)); ok { return returnFunc() } if returnFunc, ok := ret.Get(0).(func() protocol.ServerMessage); ok { r0 = returnFunc() } else { if ret.Get(0) != nil { r0 = ret.Get(0).(protocol.ServerMessage) } } if returnFunc, ok := ret.Get(1).(func() error); ok { r1 = returnFunc() } else { r1 = ret.Error(1) } return r0, r1 } // MockBrokerLogicalConnection_ReceiveServer_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ReceiveServer' type MockBrokerLogicalConnection_ReceiveServer_Call struct { *mock.Call } // ReceiveServer is a helper method to define mock.On call func (_e *MockBrokerLogicalConnection_Expecter) ReceiveServer() *MockBrokerLogicalConnection_ReceiveServer_Call { return &MockBrokerLogicalConnection_ReceiveServer_Call{Call: _e.mock.On("ReceiveServer")} } func (_c *MockBrokerLogicalConnection_ReceiveServer_Call) Run(run func()) *MockBrokerLogicalConnection_ReceiveServer_Call { _c.Call.Run(func(args mock.Arguments) { run() }) return _c } func (_c *MockBrokerLogicalConnection_ReceiveServer_Call) Return(serverMessage protocol.ServerMessage, err error) *MockBrokerLogicalConnection_ReceiveServer_Call { _c.Call.Return(serverMessage, err) return _c } func (_c *MockBrokerLogicalConnection_ReceiveServer_Call) RunAndReturn(run func() (protocol.ServerMessage, error)) *MockBrokerLogicalConnection_ReceiveServer_Call { _c.Call.Return(run) return _c } // SendClient provides a mock function for the type MockBrokerLogicalConnection func (_mock *MockBrokerLogicalConnection) SendClient(clientMessage protocol.ClientMessage) error { ret := _mock.Called(clientMessage) if len(ret) == 0 { panic("no return value specified for SendClient") } var r0 error if returnFunc, ok := ret.Get(0).(func(protocol.ClientMessage) error); ok { r0 = returnFunc(clientMessage) } else { r0 = ret.Error(0) } return r0 } // MockBrokerLogicalConnection_SendClient_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SendClient' type MockBrokerLogicalConnection_SendClient_Call struct { *mock.Call } // SendClient is a helper method to define mock.On call // - clientMessage protocol.ClientMessage func (_e *MockBrokerLogicalConnection_Expecter) SendClient(clientMessage any) *MockBrokerLogicalConnection_SendClient_Call { return &MockBrokerLogicalConnection_SendClient_Call{Call: _e.mock.On("SendClient", clientMessage)} } func (_c *MockBrokerLogicalConnection_SendClient_Call) Run(run func(clientMessage protocol.ClientMessage)) *MockBrokerLogicalConnection_SendClient_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 protocol.ClientMessage if args[0] != nil { arg0 = args[0].(protocol.ClientMessage) } run( arg0, ) }) return _c } func (_c *MockBrokerLogicalConnection_SendClient_Call) Return(err error) *MockBrokerLogicalConnection_SendClient_Call { _c.Call.Return(err) return _c } func (_c *MockBrokerLogicalConnection_SendClient_Call) RunAndReturn(run func(clientMessage protocol.ClientMessage) error) *MockBrokerLogicalConnection_SendClient_Call { _c.Call.Return(run) return _c }