mocks

package
v0.0.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 9, 2022 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HandlingMiddlewareMock

type HandlingMiddlewareMock struct {
	WrapMock mHandlingMiddlewareMockWrap
	// contains filtered or unexported fields
}

HandlingMiddlewareMock implements processor.HandlingMiddleware

func NewHandlingMiddlewareMock

func NewHandlingMiddlewareMock(t minimock.Tester) *HandlingMiddlewareMock

NewHandlingMiddlewareMock returns a mock for processor.HandlingMiddleware

func (*HandlingMiddlewareMock) MinimockFinish

func (m *HandlingMiddlewareMock) MinimockFinish()

MinimockFinish checks that all mocked methods have been called the expected number of times

func (*HandlingMiddlewareMock) MinimockWait

func (m *HandlingMiddlewareMock) MinimockWait(timeout mm_time.Duration)

MinimockWait waits for all mocked methods to be called the expected number of times

func (*HandlingMiddlewareMock) MinimockWrapDone

func (m *HandlingMiddlewareMock) MinimockWrapDone() bool

MinimockWrapDone returns true if the count of the Wrap invocations corresponds the number of defined expectations

func (*HandlingMiddlewareMock) MinimockWrapInspect

func (m *HandlingMiddlewareMock) MinimockWrapInspect()

MinimockWrapInspect logs each unmet expectation

func (*HandlingMiddlewareMock) Wrap

Wrap implements processor.HandlingMiddleware

func (*HandlingMiddlewareMock) WrapAfterCounter

func (mmWrap *HandlingMiddlewareMock) WrapAfterCounter() uint64

WrapAfterCounter returns a count of finished HandlingMiddlewareMock.Wrap invocations

func (*HandlingMiddlewareMock) WrapBeforeCounter

func (mmWrap *HandlingMiddlewareMock) WrapBeforeCounter() uint64

WrapBeforeCounter returns a count of HandlingMiddlewareMock.Wrap invocations

type HandlingMiddlewareMockWrapExpectation

type HandlingMiddlewareMockWrapExpectation struct {
	Counter uint64
	// contains filtered or unexported fields
}

HandlingMiddlewareMockWrapExpectation specifies expectation struct of the HandlingMiddleware.Wrap

func (*HandlingMiddlewareMockWrapExpectation) Then

Then sets up HandlingMiddleware.Wrap return parameters for the expectation previously defined by the When method

type HandlingMiddlewareMockWrapParams

type HandlingMiddlewareMockWrapParams struct {
	// contains filtered or unexported fields
}

HandlingMiddlewareMockWrapParams contains parameters of the HandlingMiddleware.Wrap

type HandlingMiddlewareMockWrapResults

type HandlingMiddlewareMockWrapResults struct {
	// contains filtered or unexported fields
}

HandlingMiddlewareMockWrapResults contains results of the HandlingMiddleware.Wrap

type ListenerMock added in v0.0.4

type ListenerMock struct {
	ListenAndServeMock mListenerMockListenAndServe

	ListenAndServeTLSMock mListenerMockListenAndServeTLS

	ShutdownMock mListenerMockShutdown
	// contains filtered or unexported fields
}

ListenerMock implements server.Listener

func NewListenerMock added in v0.0.4

func NewListenerMock(t minimock.Tester) *ListenerMock

NewListenerMock returns a mock for server.Listener

func (*ListenerMock) ListenAndServe added in v0.0.4

func (mmListenAndServe *ListenerMock) ListenAndServe() (err error)

ListenAndServe implements server.Listener

func (*ListenerMock) ListenAndServeAfterCounter added in v0.0.4

func (mmListenAndServe *ListenerMock) ListenAndServeAfterCounter() uint64

ListenAndServeAfterCounter returns a count of finished ListenerMock.ListenAndServe invocations

func (*ListenerMock) ListenAndServeBeforeCounter added in v0.0.4

func (mmListenAndServe *ListenerMock) ListenAndServeBeforeCounter() uint64

ListenAndServeBeforeCounter returns a count of ListenerMock.ListenAndServe invocations

func (*ListenerMock) ListenAndServeTLS added in v0.0.4

func (mmListenAndServeTLS *ListenerMock) ListenAndServeTLS(certFile string, keyFile string) (err error)

ListenAndServeTLS implements server.Listener

func (*ListenerMock) ListenAndServeTLSAfterCounter added in v0.0.4

func (mmListenAndServeTLS *ListenerMock) ListenAndServeTLSAfterCounter() uint64

ListenAndServeTLSAfterCounter returns a count of finished ListenerMock.ListenAndServeTLS invocations

func (*ListenerMock) ListenAndServeTLSBeforeCounter added in v0.0.4

func (mmListenAndServeTLS *ListenerMock) ListenAndServeTLSBeforeCounter() uint64

ListenAndServeTLSBeforeCounter returns a count of ListenerMock.ListenAndServeTLS invocations

func (*ListenerMock) MinimockFinish added in v0.0.4

func (m *ListenerMock) MinimockFinish()

MinimockFinish checks that all mocked methods have been called the expected number of times

func (*ListenerMock) MinimockListenAndServeDone added in v0.0.4

func (m *ListenerMock) MinimockListenAndServeDone() bool

MinimockListenAndServeDone returns true if the count of the ListenAndServe invocations corresponds the number of defined expectations

func (*ListenerMock) MinimockListenAndServeInspect added in v0.0.4

func (m *ListenerMock) MinimockListenAndServeInspect()

MinimockListenAndServeInspect logs each unmet expectation

func (*ListenerMock) MinimockListenAndServeTLSDone added in v0.0.4

func (m *ListenerMock) MinimockListenAndServeTLSDone() bool

MinimockListenAndServeTLSDone returns true if the count of the ListenAndServeTLS invocations corresponds the number of defined expectations

func (*ListenerMock) MinimockListenAndServeTLSInspect added in v0.0.4

func (m *ListenerMock) MinimockListenAndServeTLSInspect()

MinimockListenAndServeTLSInspect logs each unmet expectation

func (*ListenerMock) MinimockShutdownDone added in v0.0.4

func (m *ListenerMock) MinimockShutdownDone() bool

MinimockShutdownDone returns true if the count of the Shutdown invocations corresponds the number of defined expectations

func (*ListenerMock) MinimockShutdownInspect added in v0.0.4

func (m *ListenerMock) MinimockShutdownInspect()

MinimockShutdownInspect logs each unmet expectation

func (*ListenerMock) MinimockWait added in v0.0.4

func (m *ListenerMock) MinimockWait(timeout mm_time.Duration)

MinimockWait waits for all mocked methods to be called the expected number of times

func (*ListenerMock) Shutdown added in v0.0.4

func (mmShutdown *ListenerMock) Shutdown(ctx context.Context) (err error)

Shutdown implements server.Listener

func (*ListenerMock) ShutdownAfterCounter added in v0.0.4

func (mmShutdown *ListenerMock) ShutdownAfterCounter() uint64

ShutdownAfterCounter returns a count of finished ListenerMock.Shutdown invocations

func (*ListenerMock) ShutdownBeforeCounter added in v0.0.4

func (mmShutdown *ListenerMock) ShutdownBeforeCounter() uint64

ShutdownBeforeCounter returns a count of ListenerMock.Shutdown invocations

type ListenerMockListenAndServeExpectation added in v0.0.4

type ListenerMockListenAndServeExpectation struct {
	Counter uint64
	// contains filtered or unexported fields
}

ListenerMockListenAndServeExpectation specifies expectation struct of the Listener.ListenAndServe

type ListenerMockListenAndServeResults added in v0.0.4

type ListenerMockListenAndServeResults struct {
	// contains filtered or unexported fields
}

ListenerMockListenAndServeResults contains results of the Listener.ListenAndServe

type ListenerMockListenAndServeTLSExpectation added in v0.0.4

type ListenerMockListenAndServeTLSExpectation struct {
	Counter uint64
	// contains filtered or unexported fields
}

ListenerMockListenAndServeTLSExpectation specifies expectation struct of the Listener.ListenAndServeTLS

func (*ListenerMockListenAndServeTLSExpectation) Then added in v0.0.4

Then sets up Listener.ListenAndServeTLS return parameters for the expectation previously defined by the When method

type ListenerMockListenAndServeTLSParams added in v0.0.4

type ListenerMockListenAndServeTLSParams struct {
	// contains filtered or unexported fields
}

ListenerMockListenAndServeTLSParams contains parameters of the Listener.ListenAndServeTLS

type ListenerMockListenAndServeTLSResults added in v0.0.4

type ListenerMockListenAndServeTLSResults struct {
	// contains filtered or unexported fields
}

ListenerMockListenAndServeTLSResults contains results of the Listener.ListenAndServeTLS

type ListenerMockShutdownExpectation added in v0.0.4

type ListenerMockShutdownExpectation struct {
	Counter uint64
	// contains filtered or unexported fields
}

ListenerMockShutdownExpectation specifies expectation struct of the Listener.Shutdown

func (*ListenerMockShutdownExpectation) Then added in v0.0.4

Then sets up Listener.Shutdown return parameters for the expectation previously defined by the When method

type ListenerMockShutdownParams added in v0.0.4

type ListenerMockShutdownParams struct {
	// contains filtered or unexported fields
}

ListenerMockShutdownParams contains parameters of the Listener.Shutdown

type ListenerMockShutdownResults added in v0.0.4

type ListenerMockShutdownResults struct {
	// contains filtered or unexported fields
}

ListenerMockShutdownResults contains results of the Listener.Shutdown

type MiddlewaresTracker added in v0.0.4

type MiddlewaresTracker struct {
	CallsOrder []string
	// contains filtered or unexported fields
}

func NewMiddlewaresTracker added in v0.0.4

func NewMiddlewaresTracker(t *testing.T) *MiddlewaresTracker

func (*MiddlewaresTracker) MakeFinalMiddleware added in v0.0.4

func (t *MiddlewaresTracker) MakeFinalMiddleware(name string) *HandlingMiddlewareMock

func (*MiddlewaresTracker) MakeMiddleware added in v0.0.4

func (t *MiddlewaresTracker) MakeMiddleware(name string) *HandlingMiddlewareMock

type URLReplacerFactoryMock

type URLReplacerFactoryMock struct {
	MakeMock mURLReplacerFactoryMockMake
	// contains filtered or unexported fields
}

URLReplacerFactoryMock implements proxy.URLReplacerFactory

func NewURLReplacerFactoryMock

func NewURLReplacerFactoryMock(t minimock.Tester) *URLReplacerFactoryMock

NewURLReplacerFactoryMock returns a mock for proxy.URLReplacerFactory

func (*URLReplacerFactoryMock) Make

func (mmMake *URLReplacerFactoryMock) Make(requestURL *url.URL) (rp1 *urlreplacer.Replacer, rp2 *urlreplacer.Replacer, err error)

Make implements proxy.URLReplacerFactory

func (*URLReplacerFactoryMock) MakeAfterCounter

func (mmMake *URLReplacerFactoryMock) MakeAfterCounter() uint64

MakeAfterCounter returns a count of finished URLReplacerFactoryMock.Make invocations

func (*URLReplacerFactoryMock) MakeBeforeCounter

func (mmMake *URLReplacerFactoryMock) MakeBeforeCounter() uint64

MakeBeforeCounter returns a count of URLReplacerFactoryMock.Make invocations

func (*URLReplacerFactoryMock) MinimockFinish

func (m *URLReplacerFactoryMock) MinimockFinish()

MinimockFinish checks that all mocked methods have been called the expected number of times

func (*URLReplacerFactoryMock) MinimockMakeDone

func (m *URLReplacerFactoryMock) MinimockMakeDone() bool

MinimockMakeDone returns true if the count of the Make invocations corresponds the number of defined expectations

func (*URLReplacerFactoryMock) MinimockMakeInspect

func (m *URLReplacerFactoryMock) MinimockMakeInspect()

MinimockMakeInspect logs each unmet expectation

func (*URLReplacerFactoryMock) MinimockWait

func (m *URLReplacerFactoryMock) MinimockWait(timeout mm_time.Duration)

MinimockWait waits for all mocked methods to be called the expected number of times

type URLReplacerFactoryMockMakeExpectation

type URLReplacerFactoryMockMakeExpectation struct {
	Counter uint64
	// contains filtered or unexported fields
}

URLReplacerFactoryMockMakeExpectation specifies expectation struct of the URLReplacerFactory.Make

func (*URLReplacerFactoryMockMakeExpectation) Then

Then sets up URLReplacerFactory.Make return parameters for the expectation previously defined by the When method

type URLReplacerFactoryMockMakeParams

type URLReplacerFactoryMockMakeParams struct {
	// contains filtered or unexported fields
}

URLReplacerFactoryMockMakeParams contains parameters of the URLReplacerFactory.Make

type URLReplacerFactoryMockMakeResults

type URLReplacerFactoryMockMakeResults struct {
	// contains filtered or unexported fields
}

URLReplacerFactoryMockMakeResults contains results of the URLReplacerFactory.Make

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL