// Code generated by mockery; DO NOT EDIT. // github.com/vektra/mockery // template: testify package portsmocks import ( "context" "time" "github.com/bnema/vev/internal/ports" "github.com/bnema/vev/internal/protocol" mock "github.com/stretchr/testify/mock" ) // NewMockClientConnection creates a new instance of MockClientConnection. 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 NewMockClientConnection(t interface { mock.TestingT Cleanup(func()) }) *MockClientConnection { if helper, ok := t.(interface{ Helper() }); ok { helper.Helper() } mock := &MockClientConnection{} mock.Mock.Test(t) t.Cleanup(func() { if helper, ok := t.(interface{ Helper() }); ok { helper.Helper() } mock.AssertExpectations(t) }) return mock } // MockClientConnection is an autogenerated mock type for the ClientConnection type type MockClientConnection struct { mock.Mock } type MockClientConnection_Expecter struct { mock *mock.Mock } func (_m *MockClientConnection) EXPECT() *MockClientConnection_Expecter { return &MockClientConnection_Expecter{mock: &_m.Mock} } // Capabilities provides a mock function for the type MockClientConnection func (_mock *MockClientConnection) 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 } // MockClientConnection_Capabilities_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Capabilities' type MockClientConnection_Capabilities_Call struct { *mock.Call } // Capabilities is a helper method to define mock.On call func (_e *MockClientConnection_Expecter) Capabilities() *MockClientConnection_Capabilities_Call { return &MockClientConnection_Capabilities_Call{Call: _e.mock.On("Capabilities")} } func (_c *MockClientConnection_Capabilities_Call) Run(run func()) *MockClientConnection_Capabilities_Call { _c.Call.Run(func(args mock.Arguments) { run() }) return _c } func (_c *MockClientConnection_Capabilities_Call) Return(connectionCapabilities protocol.ConnectionCapabilities) *MockClientConnection_Capabilities_Call { _c.Call.Return(connectionCapabilities) return _c } func (_c *MockClientConnection_Capabilities_Call) RunAndReturn(run func() protocol.ConnectionCapabilities) *MockClientConnection_Capabilities_Call { _c.Call.Return(run) return _c } // Close provides a mock function for the type MockClientConnection func (_mock *MockClientConnection) 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 } // MockClientConnection_Close_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Close' type MockClientConnection_Close_Call struct { *mock.Call } // Close is a helper method to define mock.On call func (_e *MockClientConnection_Expecter) Close() *MockClientConnection_Close_Call { return &MockClientConnection_Close_Call{Call: _e.mock.On("Close")} } func (_c *MockClientConnection_Close_Call) Run(run func()) *MockClientConnection_Close_Call { _c.Call.Run(func(args mock.Arguments) { run() }) return _c } func (_c *MockClientConnection_Close_Call) Return(err error) *MockClientConnection_Close_Call { _c.Call.Return(err) return _c } func (_c *MockClientConnection_Close_Call) RunAndReturn(run func() error) *MockClientConnection_Close_Call { _c.Call.Return(run) return _c } // LinkEvents provides a mock function for the type MockClientConnection func (_mock *MockClientConnection) 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 } // MockClientConnection_LinkEvents_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'LinkEvents' type MockClientConnection_LinkEvents_Call struct { *mock.Call } // LinkEvents is a helper method to define mock.On call func (_e *MockClientConnection_Expecter) LinkEvents() *MockClientConnection_LinkEvents_Call { return &MockClientConnection_LinkEvents_Call{Call: _e.mock.On("LinkEvents")} } func (_c *MockClientConnection_LinkEvents_Call) Run(run func()) *MockClientConnection_LinkEvents_Call { _c.Call.Run(func(args mock.Arguments) { run() }) return _c } func (_c *MockClientConnection_LinkEvents_Call) Return(linkEventCh <-chan ports.LinkEvent) *MockClientConnection_LinkEvents_Call { _c.Call.Return(linkEventCh) return _c } func (_c *MockClientConnection_LinkEvents_Call) RunAndReturn(run func() <-chan ports.LinkEvent) *MockClientConnection_LinkEvents_Call { _c.Call.Return(run) return _c } // LinkState provides a mock function for the type MockClientConnection func (_mock *MockClientConnection) 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 } // MockClientConnection_LinkState_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'LinkState' type MockClientConnection_LinkState_Call struct { *mock.Call } // LinkState is a helper method to define mock.On call func (_e *MockClientConnection_Expecter) LinkState() *MockClientConnection_LinkState_Call { return &MockClientConnection_LinkState_Call{Call: _e.mock.On("LinkState")} } func (_c *MockClientConnection_LinkState_Call) Run(run func()) *MockClientConnection_LinkState_Call { _c.Call.Run(func(args mock.Arguments) { run() }) return _c } func (_c *MockClientConnection_LinkState_Call) Return(linkState ports.LinkState) *MockClientConnection_LinkState_Call { _c.Call.Return(linkState) return _c } func (_c *MockClientConnection_LinkState_Call) RunAndReturn(run func() ports.LinkState) *MockClientConnection_LinkState_Call { _c.Call.Return(run) return _c } // ReceiveServer provides a mock function for the type MockClientConnection func (_mock *MockClientConnection) 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 } // MockClientConnection_ReceiveServer_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ReceiveServer' type MockClientConnection_ReceiveServer_Call struct { *mock.Call } // ReceiveServer is a helper method to define mock.On call func (_e *MockClientConnection_Expecter) ReceiveServer() *MockClientConnection_ReceiveServer_Call { return &MockClientConnection_ReceiveServer_Call{Call: _e.mock.On("ReceiveServer")} } func (_c *MockClientConnection_ReceiveServer_Call) Run(run func()) *MockClientConnection_ReceiveServer_Call { _c.Call.Run(func(args mock.Arguments) { run() }) return _c } func (_c *MockClientConnection_ReceiveServer_Call) Return(serverMessage protocol.ServerMessage, err error) *MockClientConnection_ReceiveServer_Call { _c.Call.Return(serverMessage, err) return _c } func (_c *MockClientConnection_ReceiveServer_Call) RunAndReturn(run func() (protocol.ServerMessage, error)) *MockClientConnection_ReceiveServer_Call { _c.Call.Return(run) return _c } // SendClient provides a mock function for the type MockClientConnection func (_mock *MockClientConnection) 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 } // MockClientConnection_SendClient_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SendClient' type MockClientConnection_SendClient_Call struct { *mock.Call } // SendClient is a helper method to define mock.On call // - clientMessage protocol.ClientMessage func (_e *MockClientConnection_Expecter) SendClient(clientMessage any) *MockClientConnection_SendClient_Call { return &MockClientConnection_SendClient_Call{Call: _e.mock.On("SendClient", clientMessage)} } func (_c *MockClientConnection_SendClient_Call) Run(run func(clientMessage protocol.ClientMessage)) *MockClientConnection_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 *MockClientConnection_SendClient_Call) Return(err error) *MockClientConnection_SendClient_Call { _c.Call.Return(err) return _c } func (_c *MockClientConnection_SendClient_Call) RunAndReturn(run func(clientMessage protocol.ClientMessage) error) *MockClientConnection_SendClient_Call { _c.Call.Return(run) return _c } // NewMockClientDialer creates a new instance of MockClientDialer. 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 NewMockClientDialer(t interface { mock.TestingT Cleanup(func()) }) *MockClientDialer { if helper, ok := t.(interface{ Helper() }); ok { helper.Helper() } mock := &MockClientDialer{} mock.Mock.Test(t) t.Cleanup(func() { if helper, ok := t.(interface{ Helper() }); ok { helper.Helper() } mock.AssertExpectations(t) }) return mock } // MockClientDialer is an autogenerated mock type for the ClientDialer type type MockClientDialer struct { mock.Mock } type MockClientDialer_Expecter struct { mock *mock.Mock } func (_m *MockClientDialer) EXPECT() *MockClientDialer_Expecter { return &MockClientDialer_Expecter{mock: &_m.Mock} } // Dial provides a mock function for the type MockClientDialer func (_mock *MockClientDialer) Dial(context1 context.Context) (ports.ClientConnection, error) { ret := _mock.Called(context1) if len(ret) == 0 { panic("no return value specified for Dial") } var r0 ports.ClientConnection var r1 error if returnFunc, ok := ret.Get(0).(func(context.Context) (ports.ClientConnection, error)); ok { return returnFunc(context1) } if returnFunc, ok := ret.Get(0).(func(context.Context) ports.ClientConnection); ok { r0 = returnFunc(context1) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(ports.ClientConnection) } } if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok { r1 = returnFunc(context1) } else { r1 = ret.Error(1) } return r0, r1 } // MockClientDialer_Dial_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Dial' type MockClientDialer_Dial_Call struct { *mock.Call } // Dial is a helper method to define mock.On call // - context1 context.Context func (_e *MockClientDialer_Expecter) Dial(context1 any) *MockClientDialer_Dial_Call { return &MockClientDialer_Dial_Call{Call: _e.mock.On("Dial", context1)} } func (_c *MockClientDialer_Dial_Call) Run(run func(context1 context.Context)) *MockClientDialer_Dial_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 *MockClientDialer_Dial_Call) Return(clientConnection ports.ClientConnection, err error) *MockClientDialer_Dial_Call { _c.Call.Return(clientConnection, err) return _c } func (_c *MockClientDialer_Dial_Call) RunAndReturn(run func(context1 context.Context) (ports.ClientConnection, error)) *MockClientDialer_Dial_Call { _c.Call.Return(run) return _c } // NewMockServerConnection creates a new instance of MockServerConnection. 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 NewMockServerConnection(t interface { mock.TestingT Cleanup(func()) }) *MockServerConnection { if helper, ok := t.(interface{ Helper() }); ok { helper.Helper() } mock := &MockServerConnection{} mock.Mock.Test(t) t.Cleanup(func() { if helper, ok := t.(interface{ Helper() }); ok { helper.Helper() } mock.AssertExpectations(t) }) return mock } // MockServerConnection is an autogenerated mock type for the ServerConnection type type MockServerConnection struct { mock.Mock } type MockServerConnection_Expecter struct { mock *mock.Mock } func (_m *MockServerConnection) EXPECT() *MockServerConnection_Expecter { return &MockServerConnection_Expecter{mock: &_m.Mock} } // Capabilities provides a mock function for the type MockServerConnection func (_mock *MockServerConnection) 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 } // MockServerConnection_Capabilities_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Capabilities' type MockServerConnection_Capabilities_Call struct { *mock.Call } // Capabilities is a helper method to define mock.On call func (_e *MockServerConnection_Expecter) Capabilities() *MockServerConnection_Capabilities_Call { return &MockServerConnection_Capabilities_Call{Call: _e.mock.On("Capabilities")} } func (_c *MockServerConnection_Capabilities_Call) Run(run func()) *MockServerConnection_Capabilities_Call { _c.Call.Run(func(args mock.Arguments) { run() }) return _c } func (_c *MockServerConnection_Capabilities_Call) Return(connectionCapabilities protocol.ConnectionCapabilities) *MockServerConnection_Capabilities_Call { _c.Call.Return(connectionCapabilities) return _c } func (_c *MockServerConnection_Capabilities_Call) RunAndReturn(run func() protocol.ConnectionCapabilities) *MockServerConnection_Capabilities_Call { _c.Call.Return(run) return _c } // Close provides a mock function for the type MockServerConnection func (_mock *MockServerConnection) 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 } // MockServerConnection_Close_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Close' type MockServerConnection_Close_Call struct { *mock.Call } // Close is a helper method to define mock.On call func (_e *MockServerConnection_Expecter) Close() *MockServerConnection_Close_Call { return &MockServerConnection_Close_Call{Call: _e.mock.On("Close")} } func (_c *MockServerConnection_Close_Call) Run(run func()) *MockServerConnection_Close_Call { _c.Call.Run(func(args mock.Arguments) { run() }) return _c } func (_c *MockServerConnection_Close_Call) Return(err error) *MockServerConnection_Close_Call { _c.Call.Return(err) return _c } func (_c *MockServerConnection_Close_Call) RunAndReturn(run func() error) *MockServerConnection_Close_Call { _c.Call.Return(run) return _c } // LinkEvents provides a mock function for the type MockServerConnection func (_mock *MockServerConnection) 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 } // MockServerConnection_LinkEvents_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'LinkEvents' type MockServerConnection_LinkEvents_Call struct { *mock.Call } // LinkEvents is a helper method to define mock.On call func (_e *MockServerConnection_Expecter) LinkEvents() *MockServerConnection_LinkEvents_Call { return &MockServerConnection_LinkEvents_Call{Call: _e.mock.On("LinkEvents")} } func (_c *MockServerConnection_LinkEvents_Call) Run(run func()) *MockServerConnection_LinkEvents_Call { _c.Call.Run(func(args mock.Arguments) { run() }) return _c } func (_c *MockServerConnection_LinkEvents_Call) Return(linkEventCh <-chan ports.LinkEvent) *MockServerConnection_LinkEvents_Call { _c.Call.Return(linkEventCh) return _c } func (_c *MockServerConnection_LinkEvents_Call) RunAndReturn(run func() <-chan ports.LinkEvent) *MockServerConnection_LinkEvents_Call { _c.Call.Return(run) return _c } // LinkState provides a mock function for the type MockServerConnection func (_mock *MockServerConnection) 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 } // MockServerConnection_LinkState_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'LinkState' type MockServerConnection_LinkState_Call struct { *mock.Call } // LinkState is a helper method to define mock.On call func (_e *MockServerConnection_Expecter) LinkState() *MockServerConnection_LinkState_Call { return &MockServerConnection_LinkState_Call{Call: _e.mock.On("LinkState")} } func (_c *MockServerConnection_LinkState_Call) Run(run func()) *MockServerConnection_LinkState_Call { _c.Call.Run(func(args mock.Arguments) { run() }) return _c } func (_c *MockServerConnection_LinkState_Call) Return(linkState ports.LinkState) *MockServerConnection_LinkState_Call { _c.Call.Return(linkState) return _c } func (_c *MockServerConnection_LinkState_Call) RunAndReturn(run func() ports.LinkState) *MockServerConnection_LinkState_Call { _c.Call.Return(run) return _c } // ReceiveClient provides a mock function for the type MockServerConnection func (_mock *MockServerConnection) ReceiveClient() (protocol.ClientMessage, error) { ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for ReceiveClient") } var r0 protocol.ClientMessage var r1 error if returnFunc, ok := ret.Get(0).(func() (protocol.ClientMessage, error)); ok { return returnFunc() } if returnFunc, ok := ret.Get(0).(func() protocol.ClientMessage); ok { r0 = returnFunc() } else { if ret.Get(0) != nil { r0 = ret.Get(0).(protocol.ClientMessage) } } if returnFunc, ok := ret.Get(1).(func() error); ok { r1 = returnFunc() } else { r1 = ret.Error(1) } return r0, r1 } // MockServerConnection_ReceiveClient_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ReceiveClient' type MockServerConnection_ReceiveClient_Call struct { *mock.Call } // ReceiveClient is a helper method to define mock.On call func (_e *MockServerConnection_Expecter) ReceiveClient() *MockServerConnection_ReceiveClient_Call { return &MockServerConnection_ReceiveClient_Call{Call: _e.mock.On("ReceiveClient")} } func (_c *MockServerConnection_ReceiveClient_Call) Run(run func()) *MockServerConnection_ReceiveClient_Call { _c.Call.Run(func(args mock.Arguments) { run() }) return _c } func (_c *MockServerConnection_ReceiveClient_Call) Return(clientMessage protocol.ClientMessage, err error) *MockServerConnection_ReceiveClient_Call { _c.Call.Return(clientMessage, err) return _c } func (_c *MockServerConnection_ReceiveClient_Call) RunAndReturn(run func() (protocol.ClientMessage, error)) *MockServerConnection_ReceiveClient_Call { _c.Call.Return(run) return _c } // SendOutput provides a mock function for the type MockServerConnection func (_mock *MockServerConnection) SendOutput(output protocol.Output) error { ret := _mock.Called(output) if len(ret) == 0 { panic("no return value specified for SendOutput") } var r0 error if returnFunc, ok := ret.Get(0).(func(protocol.Output) error); ok { r0 = returnFunc(output) } else { r0 = ret.Error(0) } return r0 } // MockServerConnection_SendOutput_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SendOutput' type MockServerConnection_SendOutput_Call struct { *mock.Call } // SendOutput is a helper method to define mock.On call // - output protocol.Output func (_e *MockServerConnection_Expecter) SendOutput(output any) *MockServerConnection_SendOutput_Call { return &MockServerConnection_SendOutput_Call{Call: _e.mock.On("SendOutput", output)} } func (_c *MockServerConnection_SendOutput_Call) Run(run func(output protocol.Output)) *MockServerConnection_SendOutput_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 protocol.Output if args[0] != nil { arg0 = args[0].(protocol.Output) } run( arg0, ) }) return _c } func (_c *MockServerConnection_SendOutput_Call) Return(err error) *MockServerConnection_SendOutput_Call { _c.Call.Return(err) return _c } func (_c *MockServerConnection_SendOutput_Call) RunAndReturn(run func(output protocol.Output) error) *MockServerConnection_SendOutput_Call { _c.Call.Return(run) return _c } // SendOutputAsync provides a mock function for the type MockServerConnection func (_mock *MockServerConnection) SendOutputAsync(output protocol.Output) error { ret := _mock.Called(output) if len(ret) == 0 { panic("no return value specified for SendOutputAsync") } var r0 error if returnFunc, ok := ret.Get(0).(func(protocol.Output) error); ok { r0 = returnFunc(output) } else { r0 = ret.Error(0) } return r0 } // MockServerConnection_SendOutputAsync_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SendOutputAsync' type MockServerConnection_SendOutputAsync_Call struct { *mock.Call } // SendOutputAsync is a helper method to define mock.On call // - output protocol.Output func (_e *MockServerConnection_Expecter) SendOutputAsync(output any) *MockServerConnection_SendOutputAsync_Call { return &MockServerConnection_SendOutputAsync_Call{Call: _e.mock.On("SendOutputAsync", output)} } func (_c *MockServerConnection_SendOutputAsync_Call) Run(run func(output protocol.Output)) *MockServerConnection_SendOutputAsync_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 protocol.Output if args[0] != nil { arg0 = args[0].(protocol.Output) } run( arg0, ) }) return _c } func (_c *MockServerConnection_SendOutputAsync_Call) Return(err error) *MockServerConnection_SendOutputAsync_Call { _c.Call.Return(err) return _c } func (_c *MockServerConnection_SendOutputAsync_Call) RunAndReturn(run func(output protocol.Output) error) *MockServerConnection_SendOutputAsync_Call { _c.Call.Return(run) return _c } // SendOutputSynchronous provides a mock function for the type MockServerConnection func (_mock *MockServerConnection) SendOutputSynchronous(output protocol.Output) error { ret := _mock.Called(output) if len(ret) == 0 { panic("no return value specified for SendOutputSynchronous") } var r0 error if returnFunc, ok := ret.Get(0).(func(protocol.Output) error); ok { r0 = returnFunc(output) } else { r0 = ret.Error(0) } return r0 } // MockServerConnection_SendOutputSynchronous_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SendOutputSynchronous' type MockServerConnection_SendOutputSynchronous_Call struct { *mock.Call } // SendOutputSynchronous is a helper method to define mock.On call // - output protocol.Output func (_e *MockServerConnection_Expecter) SendOutputSynchronous(output any) *MockServerConnection_SendOutputSynchronous_Call { return &MockServerConnection_SendOutputSynchronous_Call{Call: _e.mock.On("SendOutputSynchronous", output)} } func (_c *MockServerConnection_SendOutputSynchronous_Call) Run(run func(output protocol.Output)) *MockServerConnection_SendOutputSynchronous_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 protocol.Output if args[0] != nil { arg0 = args[0].(protocol.Output) } run( arg0, ) }) return _c } func (_c *MockServerConnection_SendOutputSynchronous_Call) Return(err error) *MockServerConnection_SendOutputSynchronous_Call { _c.Call.Return(err) return _c } func (_c *MockServerConnection_SendOutputSynchronous_Call) RunAndReturn(run func(output protocol.Output) error) *MockServerConnection_SendOutputSynchronous_Call { _c.Call.Return(run) return _c } // SendServer provides a mock function for the type MockServerConnection func (_mock *MockServerConnection) SendServer(serverMessage protocol.ServerMessage) error { ret := _mock.Called(serverMessage) if len(ret) == 0 { panic("no return value specified for SendServer") } var r0 error if returnFunc, ok := ret.Get(0).(func(protocol.ServerMessage) error); ok { r0 = returnFunc(serverMessage) } else { r0 = ret.Error(0) } return r0 } // MockServerConnection_SendServer_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SendServer' type MockServerConnection_SendServer_Call struct { *mock.Call } // SendServer is a helper method to define mock.On call // - serverMessage protocol.ServerMessage func (_e *MockServerConnection_Expecter) SendServer(serverMessage any) *MockServerConnection_SendServer_Call { return &MockServerConnection_SendServer_Call{Call: _e.mock.On("SendServer", serverMessage)} } func (_c *MockServerConnection_SendServer_Call) Run(run func(serverMessage protocol.ServerMessage)) *MockServerConnection_SendServer_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 protocol.ServerMessage if args[0] != nil { arg0 = args[0].(protocol.ServerMessage) } run( arg0, ) }) return _c } func (_c *MockServerConnection_SendServer_Call) Return(err error) *MockServerConnection_SendServer_Call { _c.Call.Return(err) return _c } func (_c *MockServerConnection_SendServer_Call) RunAndReturn(run func(serverMessage protocol.ServerMessage) error) *MockServerConnection_SendServer_Call { _c.Call.Return(run) return _c } // SendServerAsync provides a mock function for the type MockServerConnection func (_mock *MockServerConnection) SendServerAsync(serverMessage protocol.ServerMessage) error { ret := _mock.Called(serverMessage) if len(ret) == 0 { panic("no return value specified for SendServerAsync") } var r0 error if returnFunc, ok := ret.Get(0).(func(protocol.ServerMessage) error); ok { r0 = returnFunc(serverMessage) } else { r0 = ret.Error(0) } return r0 } // MockServerConnection_SendServerAsync_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SendServerAsync' type MockServerConnection_SendServerAsync_Call struct { *mock.Call } // SendServerAsync is a helper method to define mock.On call // - serverMessage protocol.ServerMessage func (_e *MockServerConnection_Expecter) SendServerAsync(serverMessage any) *MockServerConnection_SendServerAsync_Call { return &MockServerConnection_SendServerAsync_Call{Call: _e.mock.On("SendServerAsync", serverMessage)} } func (_c *MockServerConnection_SendServerAsync_Call) Run(run func(serverMessage protocol.ServerMessage)) *MockServerConnection_SendServerAsync_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 protocol.ServerMessage if args[0] != nil { arg0 = args[0].(protocol.ServerMessage) } run( arg0, ) }) return _c } func (_c *MockServerConnection_SendServerAsync_Call) Return(err error) *MockServerConnection_SendServerAsync_Call { _c.Call.Return(err) return _c } func (_c *MockServerConnection_SendServerAsync_Call) RunAndReturn(run func(serverMessage protocol.ServerMessage) error) *MockServerConnection_SendServerAsync_Call { _c.Call.Return(run) return _c } // SendServerSynchronous provides a mock function for the type MockServerConnection func (_mock *MockServerConnection) SendServerSynchronous(serverMessage protocol.ServerMessage) error { ret := _mock.Called(serverMessage) if len(ret) == 0 { panic("no return value specified for SendServerSynchronous") } var r0 error if returnFunc, ok := ret.Get(0).(func(protocol.ServerMessage) error); ok { r0 = returnFunc(serverMessage) } else { r0 = ret.Error(0) } return r0 } // MockServerConnection_SendServerSynchronous_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SendServerSynchronous' type MockServerConnection_SendServerSynchronous_Call struct { *mock.Call } // SendServerSynchronous is a helper method to define mock.On call // - serverMessage protocol.ServerMessage func (_e *MockServerConnection_Expecter) SendServerSynchronous(serverMessage any) *MockServerConnection_SendServerSynchronous_Call { return &MockServerConnection_SendServerSynchronous_Call{Call: _e.mock.On("SendServerSynchronous", serverMessage)} } func (_c *MockServerConnection_SendServerSynchronous_Call) Run(run func(serverMessage protocol.ServerMessage)) *MockServerConnection_SendServerSynchronous_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 protocol.ServerMessage if args[0] != nil { arg0 = args[0].(protocol.ServerMessage) } run( arg0, ) }) return _c } func (_c *MockServerConnection_SendServerSynchronous_Call) Return(err error) *MockServerConnection_SendServerSynchronous_Call { _c.Call.Return(err) return _c } func (_c *MockServerConnection_SendServerSynchronous_Call) RunAndReturn(run func(serverMessage protocol.ServerMessage) error) *MockServerConnection_SendServerSynchronous_Call { _c.Call.Return(run) return _c } // NewMockHandshakeDeadlineProvider creates a new instance of MockHandshakeDeadlineProvider. 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 NewMockHandshakeDeadlineProvider(t interface { mock.TestingT Cleanup(func()) }) *MockHandshakeDeadlineProvider { if helper, ok := t.(interface{ Helper() }); ok { helper.Helper() } mock := &MockHandshakeDeadlineProvider{} mock.Mock.Test(t) t.Cleanup(func() { if helper, ok := t.(interface{ Helper() }); ok { helper.Helper() } mock.AssertExpectations(t) }) return mock } // MockHandshakeDeadlineProvider is an autogenerated mock type for the HandshakeDeadlineProvider type type MockHandshakeDeadlineProvider struct { mock.Mock } type MockHandshakeDeadlineProvider_Expecter struct { mock *mock.Mock } func (_m *MockHandshakeDeadlineProvider) EXPECT() *MockHandshakeDeadlineProvider_Expecter { return &MockHandshakeDeadlineProvider_Expecter{mock: &_m.Mock} } // HandshakeDeadline provides a mock function for the type MockHandshakeDeadlineProvider func (_mock *MockHandshakeDeadlineProvider) HandshakeDeadline() time.Time { ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for HandshakeDeadline") } var r0 time.Time if returnFunc, ok := ret.Get(0).(func() time.Time); ok { r0 = returnFunc() } else { r0 = ret.Get(0).(time.Time) } return r0 } // MockHandshakeDeadlineProvider_HandshakeDeadline_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'HandshakeDeadline' type MockHandshakeDeadlineProvider_HandshakeDeadline_Call struct { *mock.Call } // HandshakeDeadline is a helper method to define mock.On call func (_e *MockHandshakeDeadlineProvider_Expecter) HandshakeDeadline() *MockHandshakeDeadlineProvider_HandshakeDeadline_Call { return &MockHandshakeDeadlineProvider_HandshakeDeadline_Call{Call: _e.mock.On("HandshakeDeadline")} } func (_c *MockHandshakeDeadlineProvider_HandshakeDeadline_Call) Run(run func()) *MockHandshakeDeadlineProvider_HandshakeDeadline_Call { _c.Call.Run(func(args mock.Arguments) { run() }) return _c } func (_c *MockHandshakeDeadlineProvider_HandshakeDeadline_Call) Return(time1 time.Time) *MockHandshakeDeadlineProvider_HandshakeDeadline_Call { _c.Call.Return(time1) return _c } func (_c *MockHandshakeDeadlineProvider_HandshakeDeadline_Call) RunAndReturn(run func() time.Time) *MockHandshakeDeadlineProvider_HandshakeDeadline_Call { _c.Call.Return(run) return _c } // NewMockServerListener creates a new instance of MockServerListener. 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 NewMockServerListener(t interface { mock.TestingT Cleanup(func()) }) *MockServerListener { if helper, ok := t.(interface{ Helper() }); ok { helper.Helper() } mock := &MockServerListener{} mock.Mock.Test(t) t.Cleanup(func() { if helper, ok := t.(interface{ Helper() }); ok { helper.Helper() } mock.AssertExpectations(t) }) return mock } // MockServerListener is an autogenerated mock type for the ServerListener type type MockServerListener struct { mock.Mock } type MockServerListener_Expecter struct { mock *mock.Mock } func (_m *MockServerListener) EXPECT() *MockServerListener_Expecter { return &MockServerListener_Expecter{mock: &_m.Mock} } // Accept provides a mock function for the type MockServerListener func (_mock *MockServerListener) Accept() (ports.ServerConnection, error) { ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for Accept") } var r0 ports.ServerConnection var r1 error if returnFunc, ok := ret.Get(0).(func() (ports.ServerConnection, error)); ok { return returnFunc() } if returnFunc, ok := ret.Get(0).(func() ports.ServerConnection); ok { r0 = returnFunc() } else { if ret.Get(0) != nil { r0 = ret.Get(0).(ports.ServerConnection) } } if returnFunc, ok := ret.Get(1).(func() error); ok { r1 = returnFunc() } else { r1 = ret.Error(1) } return r0, r1 } // MockServerListener_Accept_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Accept' type MockServerListener_Accept_Call struct { *mock.Call } // Accept is a helper method to define mock.On call func (_e *MockServerListener_Expecter) Accept() *MockServerListener_Accept_Call { return &MockServerListener_Accept_Call{Call: _e.mock.On("Accept")} } func (_c *MockServerListener_Accept_Call) Run(run func()) *MockServerListener_Accept_Call { _c.Call.Run(func(args mock.Arguments) { run() }) return _c } func (_c *MockServerListener_Accept_Call) Return(serverConnection ports.ServerConnection, err error) *MockServerListener_Accept_Call { _c.Call.Return(serverConnection, err) return _c } func (_c *MockServerListener_Accept_Call) RunAndReturn(run func() (ports.ServerConnection, error)) *MockServerListener_Accept_Call { _c.Call.Return(run) return _c } // Addr provides a mock function for the type MockServerListener func (_mock *MockServerListener) Addr() string { ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for Addr") } var r0 string if returnFunc, ok := ret.Get(0).(func() string); ok { r0 = returnFunc() } else { r0 = ret.Get(0).(string) } return r0 } // MockServerListener_Addr_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Addr' type MockServerListener_Addr_Call struct { *mock.Call } // Addr is a helper method to define mock.On call func (_e *MockServerListener_Expecter) Addr() *MockServerListener_Addr_Call { return &MockServerListener_Addr_Call{Call: _e.mock.On("Addr")} } func (_c *MockServerListener_Addr_Call) Run(run func()) *MockServerListener_Addr_Call { _c.Call.Run(func(args mock.Arguments) { run() }) return _c } func (_c *MockServerListener_Addr_Call) Return(s string) *MockServerListener_Addr_Call { _c.Call.Return(s) return _c } func (_c *MockServerListener_Addr_Call) RunAndReturn(run func() string) *MockServerListener_Addr_Call { _c.Call.Return(run) return _c } // Close provides a mock function for the type MockServerListener func (_mock *MockServerListener) 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 } // MockServerListener_Close_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Close' type MockServerListener_Close_Call struct { *mock.Call } // Close is a helper method to define mock.On call func (_e *MockServerListener_Expecter) Close() *MockServerListener_Close_Call { return &MockServerListener_Close_Call{Call: _e.mock.On("Close")} } func (_c *MockServerListener_Close_Call) Run(run func()) *MockServerListener_Close_Call { _c.Call.Run(func(args mock.Arguments) { run() }) return _c } func (_c *MockServerListener_Close_Call) Return(err error) *MockServerListener_Close_Call { _c.Call.Return(err) return _c } func (_c *MockServerListener_Close_Call) RunAndReturn(run func() error) *MockServerListener_Close_Call { _c.Call.Return(run) return _c }