Documentation ¶
Overview ¶
Package testutil is a generated GoMock package.
Package testutil contains operations useful for testing. In particular, it provides fake connections useful for testing client/server interactions.
Index ¶
- Variables
- func NewFakeConn(c *C) (client *FakeConn, server *FakeConn)
- type FakeAddr
- type FakeConn
- func (fc *FakeConn) Close() error
- func (fc *FakeConn) LocalAddr() net.Addr
- func (fc *FakeConn) Read(p []byte) (n int, err error)
- func (fc *FakeConn) RemoteAddr() net.Addr
- func (fc *FakeConn) SetDeadline(t time.Time) error
- func (fc *FakeConn) SetLocalAddr(addr net.Addr)
- func (fc *FakeConn) SetReadDeadline(t time.Time) error
- func (fc *FakeConn) SetRemoteAddr(addr net.Addr)
- func (fc *FakeConn) SetWriteDeadline(t time.Time) error
- func (fc *FakeConn) Write(p []byte) (n int, err error)
- type MockLogger
- func (m *MockLogger) Debug(message string)
- func (m *MockLogger) Debugf(format string, value ...interface{})
- func (m *MockLogger) EXPECT() *MockLoggerMockRecorder
- func (m *MockLogger) Error(message string)
- func (m *MockLogger) Errorf(format string, value ...interface{})
- func (m *MockLogger) Info(message string)
- func (m *MockLogger) Infof(format string, value ...interface{})
- func (m *MockLogger) Warning(message string)
- func (m *MockLogger) Warningf(format string, value ...interface{})
- type MockLoggerMockRecorder
- func (mr *MockLoggerMockRecorder) Debug(message interface{}) *gomock.Call
- func (mr *MockLoggerMockRecorder) Debugf(format interface{}, value ...interface{}) *gomock.Call
- func (mr *MockLoggerMockRecorder) Error(message interface{}) *gomock.Call
- func (mr *MockLoggerMockRecorder) Errorf(format interface{}, value ...interface{}) *gomock.Call
- func (mr *MockLoggerMockRecorder) Info(message interface{}) *gomock.Call
- func (mr *MockLoggerMockRecorder) Infof(format interface{}, value ...interface{}) *gomock.Call
- func (mr *MockLoggerMockRecorder) Warning(message interface{}) *gomock.Call
- func (mr *MockLoggerMockRecorder) Warningf(format interface{}, value ...interface{}) *gomock.Call
Constants ¶
This section is empty.
Variables ¶
var ( ErrClosing = errors.New("use of closed network connection") ErrIOTimeout = errors.New("io timeout") )
Functions ¶
func NewFakeConn ¶
NewFakeConn returns a pair of fake connections suitable for testing.
Types ¶
type FakeConn ¶
type FakeConn struct { C *C // contains filtered or unexported fields }
FakeConn is a fake connection used for testing. It implements the net.Conn interface and is useful for simulating I/O between STOMP clients and a STOMP server.
func (*FakeConn) RemoteAddr ¶
func (*FakeConn) SetLocalAddr ¶
func (*FakeConn) SetRemoteAddr ¶
type MockLogger ¶ added in v3.0.4
type MockLogger struct {
// contains filtered or unexported fields
}
MockLogger is a mock of Logger interface.
func NewMockLogger ¶ added in v3.0.4
func NewMockLogger(ctrl *gomock.Controller) *MockLogger
NewMockLogger creates a new mock instance.
func (*MockLogger) Debug ¶ added in v3.0.4
func (m *MockLogger) Debug(message string)
Debug mocks base method.
func (*MockLogger) Debugf ¶ added in v3.0.4
func (m *MockLogger) Debugf(format string, value ...interface{})
Debugf mocks base method.
func (*MockLogger) EXPECT ¶ added in v3.0.4
func (m *MockLogger) EXPECT() *MockLoggerMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockLogger) Error ¶ added in v3.0.4
func (m *MockLogger) Error(message string)
Error mocks base method.
func (*MockLogger) Errorf ¶ added in v3.0.4
func (m *MockLogger) Errorf(format string, value ...interface{})
Errorf mocks base method.
func (*MockLogger) Info ¶ added in v3.0.4
func (m *MockLogger) Info(message string)
Info mocks base method.
func (*MockLogger) Infof ¶ added in v3.0.4
func (m *MockLogger) Infof(format string, value ...interface{})
Infof mocks base method.
func (*MockLogger) Warning ¶ added in v3.0.4
func (m *MockLogger) Warning(message string)
Warning mocks base method.
func (*MockLogger) Warningf ¶ added in v3.0.4
func (m *MockLogger) Warningf(format string, value ...interface{})
Warningf mocks base method.
type MockLoggerMockRecorder ¶ added in v3.0.4
type MockLoggerMockRecorder struct {
// contains filtered or unexported fields
}
MockLoggerMockRecorder is the mock recorder for MockLogger.
func (*MockLoggerMockRecorder) Debug ¶ added in v3.0.4
func (mr *MockLoggerMockRecorder) Debug(message interface{}) *gomock.Call
Debug indicates an expected call of Debug.
func (*MockLoggerMockRecorder) Debugf ¶ added in v3.0.4
func (mr *MockLoggerMockRecorder) Debugf(format interface{}, value ...interface{}) *gomock.Call
Debugf indicates an expected call of Debugf.
func (*MockLoggerMockRecorder) Error ¶ added in v3.0.4
func (mr *MockLoggerMockRecorder) Error(message interface{}) *gomock.Call
Error indicates an expected call of Error.
func (*MockLoggerMockRecorder) Errorf ¶ added in v3.0.4
func (mr *MockLoggerMockRecorder) Errorf(format interface{}, value ...interface{}) *gomock.Call
Errorf indicates an expected call of Errorf.
func (*MockLoggerMockRecorder) Info ¶ added in v3.0.4
func (mr *MockLoggerMockRecorder) Info(message interface{}) *gomock.Call
Info indicates an expected call of Info.
func (*MockLoggerMockRecorder) Infof ¶ added in v3.0.4
func (mr *MockLoggerMockRecorder) Infof(format interface{}, value ...interface{}) *gomock.Call
Infof indicates an expected call of Infof.
func (*MockLoggerMockRecorder) Warning ¶ added in v3.0.4
func (mr *MockLoggerMockRecorder) Warning(message interface{}) *gomock.Call
Warning indicates an expected call of Warning.
func (*MockLoggerMockRecorder) Warningf ¶ added in v3.0.4
func (mr *MockLoggerMockRecorder) Warningf(format interface{}, value ...interface{}) *gomock.Call
Warningf indicates an expected call of Warningf.