Documentation
¶
Index ¶
- type MockBasicResponseWriter
- type MockCloseNotifierResponseWriter
- type MockFileSystem
- func (fileSystem *MockFileSystem) CreatePath(path string) error
- func (fileSystem *MockFileSystem) GetPactLocation() string
- func (fileSystem *MockFileSystem) GetWriter() io.WriteCloser
- func (fileSystem *MockFileSystem) GivenCreatePathFailsWith(err error)
- func (fileSystem *MockFileSystem) GivenCreatePathSucceeds()
- func (fileSystem *MockFileSystem) GivenOpenWriteStreamFailsWith(err error)
- func (fileSystem *MockFileSystem) GivenOpenWriteStreamSucceedsWith(writeCloser io.WriteCloser)
- func (fileSystem *MockFileSystem) GivenPathDoesNotExist()
- func (fileSystem *MockFileSystem) GivenPathExists(path string)
- func (fileSystem *MockFileSystem) GivenPathExistsFailsWith(err error)
- func (fileSystem *MockFileSystem) OpenWriteStream(filePath string) (io.WriteCloser, error)
- func (fileSystem *MockFileSystem) PathExists(path string) (bool, error)
- type MockFlusherResponseWriter
- type MockHijackerResponseWriter
- type MockIDGenerator
- type MockListener
- type MockResponseWriter
- type MockWriteCloser
- func (writer *MockWriteCloser) Close() error
- func (writer *MockWriteCloser) GetWrittenContent() string
- func (writer *MockWriteCloser) GetWrittenPact() pact.Pact
- func (writer *MockWriteCloser) GivenCloseFailsWith(err error)
- func (writer *MockWriteCloser) GivenWriteFailsWith(err error)
- func (writer *MockWriteCloser) WasClosed() bool
- func (writer *MockWriteCloser) Write(bytes []byte) (int, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MockBasicResponseWriter ¶
type MockBasicResponseWriter struct {
Code int
}
func (*MockBasicResponseWriter) Header ¶
func (basicWriter *MockBasicResponseWriter) Header() http.Header
func (*MockBasicResponseWriter) Write ¶
func (basicWriter *MockBasicResponseWriter) Write(bytes []byte) (int, error)
func (*MockBasicResponseWriter) WriteHeader ¶
func (basicWriter *MockBasicResponseWriter) WriteHeader(code int)
type MockCloseNotifierResponseWriter ¶
type MockCloseNotifierResponseWriter struct { http.ResponseWriter CalledCloseNotify bool }
func (*MockCloseNotifierResponseWriter) CloseNotify ¶
func (r *MockCloseNotifierResponseWriter) CloseNotify() <-chan bool
type MockFileSystem ¶
func NewMockFileSystem ¶
func NewMockFileSystem() *MockFileSystem
func (*MockFileSystem) CreatePath ¶
func (fileSystem *MockFileSystem) CreatePath(path string) error
func (*MockFileSystem) GetPactLocation ¶
func (fileSystem *MockFileSystem) GetPactLocation() string
func (*MockFileSystem) GetWriter ¶
func (fileSystem *MockFileSystem) GetWriter() io.WriteCloser
func (*MockFileSystem) GivenCreatePathFailsWith ¶
func (fileSystem *MockFileSystem) GivenCreatePathFailsWith(err error)
func (*MockFileSystem) GivenCreatePathSucceeds ¶
func (fileSystem *MockFileSystem) GivenCreatePathSucceeds()
func (*MockFileSystem) GivenOpenWriteStreamFailsWith ¶
func (fileSystem *MockFileSystem) GivenOpenWriteStreamFailsWith(err error)
func (*MockFileSystem) GivenOpenWriteStreamSucceedsWith ¶
func (fileSystem *MockFileSystem) GivenOpenWriteStreamSucceedsWith(writeCloser io.WriteCloser)
func (*MockFileSystem) GivenPathDoesNotExist ¶
func (fileSystem *MockFileSystem) GivenPathDoesNotExist()
func (*MockFileSystem) GivenPathExists ¶
func (fileSystem *MockFileSystem) GivenPathExists(path string)
func (*MockFileSystem) GivenPathExistsFailsWith ¶
func (fileSystem *MockFileSystem) GivenPathExistsFailsWith(err error)
func (*MockFileSystem) OpenWriteStream ¶
func (fileSystem *MockFileSystem) OpenWriteStream(filePath string) (io.WriteCloser, error)
func (*MockFileSystem) PathExists ¶
func (fileSystem *MockFileSystem) PathExists(path string) (bool, error)
type MockFlusherResponseWriter ¶
type MockFlusherResponseWriter struct { http.ResponseWriter CalledFlush bool }
func (*MockFlusherResponseWriter) Flush ¶
func (r *MockFlusherResponseWriter) Flush()
type MockHijackerResponseWriter ¶
type MockHijackerResponseWriter struct { http.ResponseWriter CalledHijack bool }
func (*MockHijackerResponseWriter) Hijack ¶
func (r *MockHijackerResponseWriter) Hijack() (net.Conn, *bufio.ReadWriter, error)
type MockIDGenerator ¶
func NewMockIDGenerator ¶
func NewMockIDGenerator() *MockIDGenerator
func (*MockIDGenerator) Generate ¶
func (generator *MockIDGenerator) Generate() string
func (*MockIDGenerator) GivenGeneratorReturnsID ¶
func (generator *MockIDGenerator) GivenGeneratorReturnsID(id string)
func (*MockIDGenerator) Reset ¶
func (generator *MockIDGenerator) Reset()
type MockListener ¶
type MockListener struct {
// contains filtered or unexported fields
}
func NewMockListener ¶
func NewMockListener() *MockListener
func (*MockListener) CalledTimes ¶
func (listener *MockListener) CalledTimes() int
func (*MockListener) GetRequest ¶
func (listener *MockListener) GetRequest() recorder.Request
func (*MockListener) GetResponse ¶
func (listener *MockListener) GetResponse() recorder.Response
func (*MockListener) RequestReceived ¶
func (listener *MockListener) RequestReceived(request recorder.Request, response recorder.Response)
type MockResponseWriter ¶
type MockResponseWriter struct { MockBasicResponseWriter MockHijackerResponseWriter MockFlusherResponseWriter MockCloseNotifierResponseWriter }
type MockWriteCloser ¶
type MockWriteCloser struct {
// contains filtered or unexported fields
}
func NewMockWriteCloser ¶
func NewMockWriteCloser() *MockWriteCloser
func (*MockWriteCloser) Close ¶
func (writer *MockWriteCloser) Close() error
func (*MockWriteCloser) GetWrittenContent ¶
func (writer *MockWriteCloser) GetWrittenContent() string
func (*MockWriteCloser) GetWrittenPact ¶
func (writer *MockWriteCloser) GetWrittenPact() pact.Pact
func (*MockWriteCloser) GivenCloseFailsWith ¶
func (writer *MockWriteCloser) GivenCloseFailsWith(err error)
func (*MockWriteCloser) GivenWriteFailsWith ¶
func (writer *MockWriteCloser) GivenWriteFailsWith(err error)
func (*MockWriteCloser) WasClosed ¶
func (writer *MockWriteCloser) WasClosed() bool
Click to show internal directories.
Click to hide internal directories.