mocking

package
v0.0.0-...-02fd228 Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2017 License: GPL-3.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Greeter

type Greeter interface {
	Greet(name string) (string, error)
	Reset()
}

type MockedGreeter

type MockedGreeter struct {
	// GreetFunc provides a mock implementation of Greet.
	GreetFunc func(name string) (string, error)
	// GreetCalls represents the number of times Greet was called.
	GreetCalls int
	// ResetFunc provides a mock implementation of Reset.
	ResetFunc func()
	// ResetCalls represents the number of times Reset was called.
	ResetCalls int
}

MockedGreeter is a mock implementation of Greeter.

func (*MockedGreeter) Greet

func (m *MockedGreeter) Greet(name string) (string, error)

Greet calls GreetFunc.

func (*MockedGreeter) Reset

func (m *MockedGreeter) Reset()

Reset calls ResetFunc.

type MockedSignoff

type MockedSignoff struct {
	// SignoffFunc provides a mock implementation of Signoff.
	SignoffFunc func(name string) string
	// SignoffCalls represents the number of times Signoff was called.
	SignoffCalls int
}

MockedSignoff is a mock implementation of Signoff.

func (*MockedSignoff) Signoff

func (m *MockedSignoff) Signoff(name string) string

Signoff calls SignoffFunc.

type Signoff

type Signoff interface {
	Signoff(name string) string
}

Jump to

Keyboard shortcuts

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