tests

package
v3.0.2 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2019 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package tests contains tests for minimock tool and demonstrates minimock features

Index

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

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

Jump to

Keyboard shortcuts

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