gouble

package module
v0.0.0-...-9124534 Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2021 License: MIT Imports: 2 Imported by: 0

README

gouble

Mocking framework for golang

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Double

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

func Mock

func Mock() *Double

func (*Double) Allow

func (d *Double) Allow(mock iMock) *Double

func (*Double) AndReturn

func (d *Double) AndReturn(responses ...interface{})

func (*Double) AndReturnWithError

func (d *Double) AndReturnWithError(successResponse interface{}, err error)

TODO: Remove (use one `AndReturn`)

func (*Double) AndReturnWithoutError

func (d *Double) AndReturnWithoutError(successResponse interface{})

TODO: Remove (use one `AndReturn`)

func (*Double) AndThrowError

func (d *Double) AndThrowError(err error)

TODO: Remove (use one `AndReturn`)

func (*Double) MockFor

func (d *Double) MockFor(method string) *MockResponse

func (*Double) ToReceive

func (d *Double) ToReceive(methodName string) *Double

type MockResponse

type MockResponse struct {
	ErrorResponse error // TODO: Remove
	// contains filtered or unexported fields
}

func (*MockResponse) ReturnValues

func (resp *MockResponse) ReturnValues() []interface{}

func (*MockResponse) SuccessValue

func (resp *MockResponse) SuccessValue() interface{}

TODO: Remove

Jump to

Keyboard shortcuts

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