Documentation ¶
Overview ¶
Package tests contains tests for minimock tool and demonstrates minimock features
Index ¶
- type Formatter
- type FormatterMock
- func (mmFormat *FormatterMock) Format(s1 string, p1 ...interface{}) (s2 string)
- func (mmFormat *FormatterMock) FormatAfterCounter() uint64
- func (mmFormat *FormatterMock) FormatBeforeCounter() uint64
- func (m *FormatterMock) MinimockFinish()
- func (m *FormatterMock) MinimockFormatDone() bool
- func (m *FormatterMock) MinimockFormatInspect()
- func (m *FormatterMock) MinimockWait(timeout mm_time.Duration)
- type FormatterMockFormatExpectation
- type FormatterMockFormatParams
- type FormatterMockFormatResults
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Formatter ¶
type Formatter interface {
// contains filtered or unexported methods
}
Formatter interface is used to test code generated by minimock
type FormatterMock ¶
type FormatterMock struct { FormatMock mFormatterMockFormat // contains filtered or unexported fields }
FormatterMock implements Formatter
func NewFormatterMock ¶
func NewFormatterMock(t minimock.Tester) *FormatterMock
NewFormatterMock returns a mock for Formatter
func (*FormatterMock) Format ¶
func (mmFormat *FormatterMock) Format(s1 string, p1 ...interface{}) (s2 string)
Format implements Formatter
func (*FormatterMock) FormatAfterCounter ¶
func (mmFormat *FormatterMock) FormatAfterCounter() uint64
FormatAfterCounter returns a count of finished FormatterMock.Format invocations
func (*FormatterMock) FormatBeforeCounter ¶
func (mmFormat *FormatterMock) FormatBeforeCounter() uint64
FormatBeforeCounter returns a count of FormatterMock.Format invocations
func (*FormatterMock) MinimockFinish ¶
func (m *FormatterMock) MinimockFinish()
MinimockFinish checks that all mocked methods have been called the expected number of times
func (*FormatterMock) MinimockFormatDone ¶
func (m *FormatterMock) MinimockFormatDone() bool
MinimockFormatDone returns true if the count of the Format invocations corresponds the number of defined expectations
func (*FormatterMock) MinimockFormatInspect ¶
func (m *FormatterMock) MinimockFormatInspect()
MinimockFormatInspect logs each unmet expectation
func (*FormatterMock) MinimockWait ¶
func (m *FormatterMock) MinimockWait(timeout mm_time.Duration)
MinimockWait waits for all mocked methods to be called the expected number of times
type FormatterMockFormatExpectation ¶
type FormatterMockFormatExpectation struct { Counter uint64 // contains filtered or unexported fields }
FormatterMockFormatExpectation specifies expectation struct of the Formatter.Format
func (*FormatterMockFormatExpectation) Then ¶
func (e *FormatterMockFormatExpectation) Then(s2 string) *FormatterMock
Then sets up Formatter.Format return parameters for the expectation previously defined by the When method
type FormatterMockFormatParams ¶
type FormatterMockFormatParams struct {
// contains filtered or unexported fields
}
FormatterMockFormatParams contains parameters of the Formatter.Format
type FormatterMockFormatResults ¶
type FormatterMockFormatResults struct {
// contains filtered or unexported fields
}
FormatterMockFormatResults contains results of the Formatter.Format