mock

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2022 License: BSD-2-Clause Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ActivityMonitorImpl

type ActivityMonitorImpl struct {
	ActionStarted bool
	ErrorOccured  bool
	ActionEnded   bool
	ErrorMessage  string
	ProgramExited bool
	ExitCode      int
	Messages      []string
}

ActivityMonitorImpl is a mock of the ActionMonitor interface. It essentially records which activity has taken place (started, errored, ended).

func (*ActivityMonitorImpl) ActionError

func (m *ActivityMonitorImpl) ActionError(format string, v ...interface{})

ActionError is what what would be called if we encounter an error.

func (*ActivityMonitorImpl) CheckError

func (m *ActivityMonitorImpl) CheckError(err error) bool

CheckError is invoked to inspect for an error.

func (*ActivityMonitorImpl) EndAction

func (m *ActivityMonitorImpl) EndAction(format string, v ...interface{})

EndAction records that an action was ended.

func (*ActivityMonitorImpl) Exit

func (m *ActivityMonitorImpl) Exit(resultStatus int)

Exit records that the program wishes to exit

func (*ActivityMonitorImpl) Message

func (m *ActivityMonitorImpl) Message(format string, v ...interface{})

Message does nothing

func (*ActivityMonitorImpl) StartAction

func (m *ActivityMonitorImpl) StartAction(format string, v ...interface{})

StartAction records that an action was started.

Jump to

Keyboard shortcuts

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