mocks

package
v0.0.11 Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockTask

type MockTask struct {
	// ExecuteFunc is an instance of a mock function object controlling the
	// behavior of the method Execute.
	ExecuteFunc *TaskExecuteFunc
	// FinishFunc is an instance of a mock function object controlling the
	// behavior of the method Finish.
	FinishFunc *TaskFinishFunc
	// GetAllowMultiExecutionFunc is an instance of a mock function object
	// controlling the behavior of the method GetAllowMultiExecution.
	GetAllowMultiExecutionFunc *TaskGetAllowMultiExecutionFunc
	// GetClientFunc is an instance of a mock function object controlling
	// the behavior of the method GetClient.
	GetClientFunc *TaskGetClientFunc
	// GetContractsHandlerFunc is an instance of a mock function object
	// controlling the behavior of the method GetContractsHandler.
	GetContractsHandlerFunc *TaskGetContractsHandlerFunc
	// GetEndFunc is an instance of a mock function object controlling the
	// behavior of the method GetEnd.
	GetEndFunc *TaskGetEndFunc
	// GetIdFunc is an instance of a mock function object controlling the
	// behavior of the method GetId.
	GetIdFunc *TaskGetIdFunc
	// GetLoggerFunc is an instance of a mock function object controlling
	// the behavior of the method GetLogger.
	GetLoggerFunc *TaskGetLoggerFunc
	// GetNameFunc is an instance of a mock function object controlling the
	// behavior of the method GetName.
	GetNameFunc *TaskGetNameFunc
	// GetStartFunc is an instance of a mock function object controlling the
	// behavior of the method GetStart.
	GetStartFunc *TaskGetStartFunc
	// GetSubscribeOptionsFunc is an instance of a mock function object
	// controlling the behavior of the method GetSubscribeOptions.
	GetSubscribeOptionsFunc *TaskGetSubscribeOptionsFunc
	// InitializeFunc is an instance of a mock function object controlling
	// the behavior of the method Initialize.
	InitializeFunc *TaskInitializeFunc
	// KillFunc is an instance of a mock function object controlling the
	// behavior of the method Kill.
	KillFunc *TaskKillFunc
	// KillChanFunc is an instance of a mock function object controlling the
	// behavior of the method KillChan.
	KillChanFunc *TaskKillChanFunc
	// LockFunc is an instance of a mock function object controlling the
	// behavior of the method Lock.
	LockFunc *TaskLockFunc
	// PrepareFunc is an instance of a mock function object controlling the
	// behavior of the method Prepare.
	PrepareFunc *TaskPrepareFunc
	// ShouldExecuteFunc is an instance of a mock function object
	// controlling the behavior of the method ShouldExecute.
	ShouldExecuteFunc *TaskShouldExecuteFunc
	// UnlockFunc is an instance of a mock function object controlling the
	// behavior of the method Unlock.
	UnlockFunc *TaskUnlockFunc
	// WasKilledFunc is an instance of a mock function object controlling
	// the behavior of the method WasKilled.
	WasKilledFunc *TaskWasKilledFunc
}

MockTask is a mock implementation of the Task interface (from the package github.com/alicenet/alicenet/layer1/executor/tasks) used for unit testing.

func NewMockTask

func NewMockTask() *MockTask

NewMockTask creates a new mock of the Task interface. All methods return zero values for all results, unless overwritten.

func NewMockTaskFrom

func NewMockTaskFrom(i tasks.Task) *MockTask

NewMockTaskFrom creates a new mock of the MockTask interface. All methods delegate to the given implementation, unless overwritten.

func NewStrictMockTask

func NewStrictMockTask() *MockTask

NewStrictMockTask creates a new mock of the Task interface. All methods panic on invocation, unless overwritten.

func (*MockTask) Execute

func (m *MockTask) Execute(v0 context.Context) (*types.Transaction, *tasks.TaskErr)

Execute delegates to the next hook function in the queue and stores the parameter and result values of this invocation.

func (*MockTask) Finish

func (m *MockTask) Finish(v0 error)

Finish delegates to the next hook function in the queue and stores the parameter and result values of this invocation.

func (*MockTask) GetAllowMultiExecution

func (m *MockTask) GetAllowMultiExecution() bool

GetAllowMultiExecution delegates to the next hook function in the queue and stores the parameter and result values of this invocation.

func (*MockTask) GetClient

func (m *MockTask) GetClient() layer1.Client

GetClient delegates to the next hook function in the queue and stores the parameter and result values of this invocation.

func (*MockTask) GetContractsHandler

func (m *MockTask) GetContractsHandler() layer1.AllSmartContracts

GetContractsHandler delegates to the next hook function in the queue and stores the parameter and result values of this invocation.

func (*MockTask) GetEnd

func (m *MockTask) GetEnd() uint64

GetEnd delegates to the next hook function in the queue and stores the parameter and result values of this invocation.

func (*MockTask) GetId

func (m *MockTask) GetId() string

GetId delegates to the next hook function in the queue and stores the parameter and result values of this invocation.

func (*MockTask) GetLogger

func (m *MockTask) GetLogger() *logrus.Entry

GetLogger delegates to the next hook function in the queue and stores the parameter and result values of this invocation.

func (*MockTask) GetName

func (m *MockTask) GetName() string

GetName delegates to the next hook function in the queue and stores the parameter and result values of this invocation.

func (*MockTask) GetStart

func (m *MockTask) GetStart() uint64

GetStart delegates to the next hook function in the queue and stores the parameter and result values of this invocation.

func (*MockTask) GetSubscribeOptions

func (m *MockTask) GetSubscribeOptions() *transaction.SubscribeOptions

GetSubscribeOptions delegates to the next hook function in the queue and stores the parameter and result values of this invocation.

func (*MockTask) Initialize

Initialize delegates to the next hook function in the queue and stores the parameter and result values of this invocation.

func (*MockTask) Kill added in v0.0.8

func (m *MockTask) Kill()

Kill delegates to the next hook function in the queue and stores the parameter and result values of this invocation.

func (*MockTask) KillChan added in v0.0.8

func (m *MockTask) KillChan() <-chan struct{}

KillChan delegates to the next hook function in the queue and stores the parameter and result values of this invocation.

func (*MockTask) Lock

func (m *MockTask) Lock()

Lock delegates to the next hook function in the queue and stores the parameter and result values of this invocation.

func (*MockTask) Prepare

func (m *MockTask) Prepare(v0 context.Context) *tasks.TaskErr

Prepare delegates to the next hook function in the queue and stores the parameter and result values of this invocation.

func (*MockTask) ShouldExecute

func (m *MockTask) ShouldExecute(v0 context.Context) (bool, *tasks.TaskErr)

ShouldExecute delegates to the next hook function in the queue and stores the parameter and result values of this invocation.

func (*MockTask) Unlock

func (m *MockTask) Unlock()

Unlock delegates to the next hook function in the queue and stores the parameter and result values of this invocation.

func (*MockTask) WasKilled

func (m *MockTask) WasKilled() bool

WasKilled delegates to the next hook function in the queue and stores the parameter and result values of this invocation.

type TaskExecuteFunc

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

TaskExecuteFunc describes the behavior when the Execute method of the parent MockTask instance is invoked.

func (*TaskExecuteFunc) History

func (f *TaskExecuteFunc) History() []TaskExecuteFuncCall

History returns a sequence of TaskExecuteFuncCall objects describing the invocations of this function.

func (*TaskExecuteFunc) PushHook

func (f *TaskExecuteFunc) PushHook(hook func(context.Context) (*types.Transaction, *tasks.TaskErr))

PushHook adds a function to the end of hook queue. Each invocation of the Execute method of the parent MockTask instance invokes the hook at the front of the queue and discards it. After the queue is empty, the default hook function is invoked for any future action.

func (*TaskExecuteFunc) PushReturn

func (f *TaskExecuteFunc) PushReturn(r0 *types.Transaction, r1 *tasks.TaskErr)

PushReturn calls PushHook with a function that returns the given values.

func (*TaskExecuteFunc) SetDefaultHook

func (f *TaskExecuteFunc) SetDefaultHook(hook func(context.Context) (*types.Transaction, *tasks.TaskErr))

SetDefaultHook sets function that is called when the Execute method of the parent MockTask instance is invoked and the hook queue is empty.

func (*TaskExecuteFunc) SetDefaultReturn

func (f *TaskExecuteFunc) SetDefaultReturn(r0 *types.Transaction, r1 *tasks.TaskErr)

SetDefaultReturn calls SetDefaultHook with a function that returns the given values.

type TaskExecuteFuncCall

type TaskExecuteFuncCall struct {
	// Arg0 is the value of the 1st argument passed to this method
	// invocation.
	Arg0 context.Context
	// Result0 is the value of the 1st result returned from this method
	// invocation.
	Result0 *types.Transaction
	// Result1 is the value of the 2nd result returned from this method
	// invocation.
	Result1 *tasks.TaskErr
}

TaskExecuteFuncCall is an object that describes an invocation of method Execute on an instance of MockTask.

func (TaskExecuteFuncCall) Args

func (c TaskExecuteFuncCall) Args() []interface{}

Args returns an interface slice containing the arguments of this invocation.

func (TaskExecuteFuncCall) Results

func (c TaskExecuteFuncCall) Results() []interface{}

Results returns an interface slice containing the results of this invocation.

type TaskFinishFunc

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

TaskFinishFunc describes the behavior when the Finish method of the parent MockTask instance is invoked.

func (*TaskFinishFunc) History

func (f *TaskFinishFunc) History() []TaskFinishFuncCall

History returns a sequence of TaskFinishFuncCall objects describing the invocations of this function.

func (*TaskFinishFunc) PushHook

func (f *TaskFinishFunc) PushHook(hook func(error))

PushHook adds a function to the end of hook queue. Each invocation of the Finish method of the parent MockTask instance invokes the hook at the front of the queue and discards it. After the queue is empty, the default hook function is invoked for any future action.

func (*TaskFinishFunc) PushReturn

func (f *TaskFinishFunc) PushReturn()

PushReturn calls PushHook with a function that returns the given values.

func (*TaskFinishFunc) SetDefaultHook

func (f *TaskFinishFunc) SetDefaultHook(hook func(error))

SetDefaultHook sets function that is called when the Finish method of the parent MockTask instance is invoked and the hook queue is empty.

func (*TaskFinishFunc) SetDefaultReturn

func (f *TaskFinishFunc) SetDefaultReturn()

SetDefaultReturn calls SetDefaultHook with a function that returns the given values.

type TaskFinishFuncCall

type TaskFinishFuncCall struct {
	// Arg0 is the value of the 1st argument passed to this method
	// invocation.
	Arg0 error
}

TaskFinishFuncCall is an object that describes an invocation of method Finish on an instance of MockTask.

func (TaskFinishFuncCall) Args

func (c TaskFinishFuncCall) Args() []interface{}

Args returns an interface slice containing the arguments of this invocation.

func (TaskFinishFuncCall) Results

func (c TaskFinishFuncCall) Results() []interface{}

Results returns an interface slice containing the results of this invocation.

type TaskGetAllowMultiExecutionFunc

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

TaskGetAllowMultiExecutionFunc describes the behavior when the GetAllowMultiExecution method of the parent MockTask instance is invoked.

func (*TaskGetAllowMultiExecutionFunc) History

History returns a sequence of TaskGetAllowMultiExecutionFuncCall objects describing the invocations of this function.

func (*TaskGetAllowMultiExecutionFunc) PushHook

func (f *TaskGetAllowMultiExecutionFunc) PushHook(hook func() bool)

PushHook adds a function to the end of hook queue. Each invocation of the GetAllowMultiExecution method of the parent MockTask instance invokes the hook at the front of the queue and discards it. After the queue is empty, the default hook function is invoked for any future action.

func (*TaskGetAllowMultiExecutionFunc) PushReturn

func (f *TaskGetAllowMultiExecutionFunc) PushReturn(r0 bool)

PushReturn calls PushHook with a function that returns the given values.

func (*TaskGetAllowMultiExecutionFunc) SetDefaultHook

func (f *TaskGetAllowMultiExecutionFunc) SetDefaultHook(hook func() bool)

SetDefaultHook sets function that is called when the GetAllowMultiExecution method of the parent MockTask instance is invoked and the hook queue is empty.

func (*TaskGetAllowMultiExecutionFunc) SetDefaultReturn

func (f *TaskGetAllowMultiExecutionFunc) SetDefaultReturn(r0 bool)

SetDefaultReturn calls SetDefaultHook with a function that returns the given values.

type TaskGetAllowMultiExecutionFuncCall

type TaskGetAllowMultiExecutionFuncCall struct {
	// Result0 is the value of the 1st result returned from this method
	// invocation.
	Result0 bool
}

TaskGetAllowMultiExecutionFuncCall is an object that describes an invocation of method GetAllowMultiExecution on an instance of MockTask.

func (TaskGetAllowMultiExecutionFuncCall) Args

func (c TaskGetAllowMultiExecutionFuncCall) Args() []interface{}

Args returns an interface slice containing the arguments of this invocation.

func (TaskGetAllowMultiExecutionFuncCall) Results

func (c TaskGetAllowMultiExecutionFuncCall) Results() []interface{}

Results returns an interface slice containing the results of this invocation.

type TaskGetClientFunc

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

TaskGetClientFunc describes the behavior when the GetClient method of the parent MockTask instance is invoked.

func (*TaskGetClientFunc) History

History returns a sequence of TaskGetClientFuncCall objects describing the invocations of this function.

func (*TaskGetClientFunc) PushHook

func (f *TaskGetClientFunc) PushHook(hook func() layer1.Client)

PushHook adds a function to the end of hook queue. Each invocation of the GetClient method of the parent MockTask instance invokes the hook at the front of the queue and discards it. After the queue is empty, the default hook function is invoked for any future action.

func (*TaskGetClientFunc) PushReturn

func (f *TaskGetClientFunc) PushReturn(r0 layer1.Client)

PushReturn calls PushHook with a function that returns the given values.

func (*TaskGetClientFunc) SetDefaultHook

func (f *TaskGetClientFunc) SetDefaultHook(hook func() layer1.Client)

SetDefaultHook sets function that is called when the GetClient method of the parent MockTask instance is invoked and the hook queue is empty.

func (*TaskGetClientFunc) SetDefaultReturn

func (f *TaskGetClientFunc) SetDefaultReturn(r0 layer1.Client)

SetDefaultReturn calls SetDefaultHook with a function that returns the given values.

type TaskGetClientFuncCall

type TaskGetClientFuncCall struct {
	// Result0 is the value of the 1st result returned from this method
	// invocation.
	Result0 layer1.Client
}

TaskGetClientFuncCall is an object that describes an invocation of method GetClient on an instance of MockTask.

func (TaskGetClientFuncCall) Args

func (c TaskGetClientFuncCall) Args() []interface{}

Args returns an interface slice containing the arguments of this invocation.

func (TaskGetClientFuncCall) Results

func (c TaskGetClientFuncCall) Results() []interface{}

Results returns an interface slice containing the results of this invocation.

type TaskGetContractsHandlerFunc

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

TaskGetContractsHandlerFunc describes the behavior when the GetContractsHandler method of the parent MockTask instance is invoked.

func (*TaskGetContractsHandlerFunc) History

History returns a sequence of TaskGetContractsHandlerFuncCall objects describing the invocations of this function.

func (*TaskGetContractsHandlerFunc) PushHook

func (f *TaskGetContractsHandlerFunc) PushHook(hook func() layer1.AllSmartContracts)

PushHook adds a function to the end of hook queue. Each invocation of the GetContractsHandler method of the parent MockTask instance invokes the hook at the front of the queue and discards it. After the queue is empty, the default hook function is invoked for any future action.

func (*TaskGetContractsHandlerFunc) PushReturn

PushReturn calls PushHook with a function that returns the given values.

func (*TaskGetContractsHandlerFunc) SetDefaultHook

func (f *TaskGetContractsHandlerFunc) SetDefaultHook(hook func() layer1.AllSmartContracts)

SetDefaultHook sets function that is called when the GetContractsHandler method of the parent MockTask instance is invoked and the hook queue is empty.

func (*TaskGetContractsHandlerFunc) SetDefaultReturn

func (f *TaskGetContractsHandlerFunc) SetDefaultReturn(r0 layer1.AllSmartContracts)

SetDefaultReturn calls SetDefaultHook with a function that returns the given values.

type TaskGetContractsHandlerFuncCall

type TaskGetContractsHandlerFuncCall struct {
	// Result0 is the value of the 1st result returned from this method
	// invocation.
	Result0 layer1.AllSmartContracts
}

TaskGetContractsHandlerFuncCall is an object that describes an invocation of method GetContractsHandler on an instance of MockTask.

func (TaskGetContractsHandlerFuncCall) Args

func (c TaskGetContractsHandlerFuncCall) Args() []interface{}

Args returns an interface slice containing the arguments of this invocation.

func (TaskGetContractsHandlerFuncCall) Results

func (c TaskGetContractsHandlerFuncCall) Results() []interface{}

Results returns an interface slice containing the results of this invocation.

type TaskGetEndFunc

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

TaskGetEndFunc describes the behavior when the GetEnd method of the parent MockTask instance is invoked.

func (*TaskGetEndFunc) History

func (f *TaskGetEndFunc) History() []TaskGetEndFuncCall

History returns a sequence of TaskGetEndFuncCall objects describing the invocations of this function.

func (*TaskGetEndFunc) PushHook

func (f *TaskGetEndFunc) PushHook(hook func() uint64)

PushHook adds a function to the end of hook queue. Each invocation of the GetEnd method of the parent MockTask instance invokes the hook at the front of the queue and discards it. After the queue is empty, the default hook function is invoked for any future action.

func (*TaskGetEndFunc) PushReturn

func (f *TaskGetEndFunc) PushReturn(r0 uint64)

PushReturn calls PushHook with a function that returns the given values.

func (*TaskGetEndFunc) SetDefaultHook

func (f *TaskGetEndFunc) SetDefaultHook(hook func() uint64)

SetDefaultHook sets function that is called when the GetEnd method of the parent MockTask instance is invoked and the hook queue is empty.

func (*TaskGetEndFunc) SetDefaultReturn

func (f *TaskGetEndFunc) SetDefaultReturn(r0 uint64)

SetDefaultReturn calls SetDefaultHook with a function that returns the given values.

type TaskGetEndFuncCall

type TaskGetEndFuncCall struct {
	// Result0 is the value of the 1st result returned from this method
	// invocation.
	Result0 uint64
}

TaskGetEndFuncCall is an object that describes an invocation of method GetEnd on an instance of MockTask.

func (TaskGetEndFuncCall) Args

func (c TaskGetEndFuncCall) Args() []interface{}

Args returns an interface slice containing the arguments of this invocation.

func (TaskGetEndFuncCall) Results

func (c TaskGetEndFuncCall) Results() []interface{}

Results returns an interface slice containing the results of this invocation.

type TaskGetIdFunc

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

TaskGetIdFunc describes the behavior when the GetId method of the parent MockTask instance is invoked.

func (*TaskGetIdFunc) History

func (f *TaskGetIdFunc) History() []TaskGetIdFuncCall

History returns a sequence of TaskGetIdFuncCall objects describing the invocations of this function.

func (*TaskGetIdFunc) PushHook

func (f *TaskGetIdFunc) PushHook(hook func() string)

PushHook adds a function to the end of hook queue. Each invocation of the GetId method of the parent MockTask instance invokes the hook at the front of the queue and discards it. After the queue is empty, the default hook function is invoked for any future action.

func (*TaskGetIdFunc) PushReturn

func (f *TaskGetIdFunc) PushReturn(r0 string)

PushReturn calls PushHook with a function that returns the given values.

func (*TaskGetIdFunc) SetDefaultHook

func (f *TaskGetIdFunc) SetDefaultHook(hook func() string)

SetDefaultHook sets function that is called when the GetId method of the parent MockTask instance is invoked and the hook queue is empty.

func (*TaskGetIdFunc) SetDefaultReturn

func (f *TaskGetIdFunc) SetDefaultReturn(r0 string)

SetDefaultReturn calls SetDefaultHook with a function that returns the given values.

type TaskGetIdFuncCall

type TaskGetIdFuncCall struct {
	// Result0 is the value of the 1st result returned from this method
	// invocation.
	Result0 string
}

TaskGetIdFuncCall is an object that describes an invocation of method GetId on an instance of MockTask.

func (TaskGetIdFuncCall) Args

func (c TaskGetIdFuncCall) Args() []interface{}

Args returns an interface slice containing the arguments of this invocation.

func (TaskGetIdFuncCall) Results

func (c TaskGetIdFuncCall) Results() []interface{}

Results returns an interface slice containing the results of this invocation.

type TaskGetLoggerFunc

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

TaskGetLoggerFunc describes the behavior when the GetLogger method of the parent MockTask instance is invoked.

func (*TaskGetLoggerFunc) History

History returns a sequence of TaskGetLoggerFuncCall objects describing the invocations of this function.

func (*TaskGetLoggerFunc) PushHook

func (f *TaskGetLoggerFunc) PushHook(hook func() *logrus.Entry)

PushHook adds a function to the end of hook queue. Each invocation of the GetLogger method of the parent MockTask instance invokes the hook at the front of the queue and discards it. After the queue is empty, the default hook function is invoked for any future action.

func (*TaskGetLoggerFunc) PushReturn

func (f *TaskGetLoggerFunc) PushReturn(r0 *logrus.Entry)

PushReturn calls PushHook with a function that returns the given values.

func (*TaskGetLoggerFunc) SetDefaultHook

func (f *TaskGetLoggerFunc) SetDefaultHook(hook func() *logrus.Entry)

SetDefaultHook sets function that is called when the GetLogger method of the parent MockTask instance is invoked and the hook queue is empty.

func (*TaskGetLoggerFunc) SetDefaultReturn

func (f *TaskGetLoggerFunc) SetDefaultReturn(r0 *logrus.Entry)

SetDefaultReturn calls SetDefaultHook with a function that returns the given values.

type TaskGetLoggerFuncCall

type TaskGetLoggerFuncCall struct {
	// Result0 is the value of the 1st result returned from this method
	// invocation.
	Result0 *logrus.Entry
}

TaskGetLoggerFuncCall is an object that describes an invocation of method GetLogger on an instance of MockTask.

func (TaskGetLoggerFuncCall) Args

func (c TaskGetLoggerFuncCall) Args() []interface{}

Args returns an interface slice containing the arguments of this invocation.

func (TaskGetLoggerFuncCall) Results

func (c TaskGetLoggerFuncCall) Results() []interface{}

Results returns an interface slice containing the results of this invocation.

type TaskGetNameFunc

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

TaskGetNameFunc describes the behavior when the GetName method of the parent MockTask instance is invoked.

func (*TaskGetNameFunc) History

func (f *TaskGetNameFunc) History() []TaskGetNameFuncCall

History returns a sequence of TaskGetNameFuncCall objects describing the invocations of this function.

func (*TaskGetNameFunc) PushHook

func (f *TaskGetNameFunc) PushHook(hook func() string)

PushHook adds a function to the end of hook queue. Each invocation of the GetName method of the parent MockTask instance invokes the hook at the front of the queue and discards it. After the queue is empty, the default hook function is invoked for any future action.

func (*TaskGetNameFunc) PushReturn

func (f *TaskGetNameFunc) PushReturn(r0 string)

PushReturn calls PushHook with a function that returns the given values.

func (*TaskGetNameFunc) SetDefaultHook

func (f *TaskGetNameFunc) SetDefaultHook(hook func() string)

SetDefaultHook sets function that is called when the GetName method of the parent MockTask instance is invoked and the hook queue is empty.

func (*TaskGetNameFunc) SetDefaultReturn

func (f *TaskGetNameFunc) SetDefaultReturn(r0 string)

SetDefaultReturn calls SetDefaultHook with a function that returns the given values.

type TaskGetNameFuncCall

type TaskGetNameFuncCall struct {
	// Result0 is the value of the 1st result returned from this method
	// invocation.
	Result0 string
}

TaskGetNameFuncCall is an object that describes an invocation of method GetName on an instance of MockTask.

func (TaskGetNameFuncCall) Args

func (c TaskGetNameFuncCall) Args() []interface{}

Args returns an interface slice containing the arguments of this invocation.

func (TaskGetNameFuncCall) Results

func (c TaskGetNameFuncCall) Results() []interface{}

Results returns an interface slice containing the results of this invocation.

type TaskGetStartFunc

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

TaskGetStartFunc describes the behavior when the GetStart method of the parent MockTask instance is invoked.

func (*TaskGetStartFunc) History

func (f *TaskGetStartFunc) History() []TaskGetStartFuncCall

History returns a sequence of TaskGetStartFuncCall objects describing the invocations of this function.

func (*TaskGetStartFunc) PushHook

func (f *TaskGetStartFunc) PushHook(hook func() uint64)

PushHook adds a function to the end of hook queue. Each invocation of the GetStart method of the parent MockTask instance invokes the hook at the front of the queue and discards it. After the queue is empty, the default hook function is invoked for any future action.

func (*TaskGetStartFunc) PushReturn

func (f *TaskGetStartFunc) PushReturn(r0 uint64)

PushReturn calls PushHook with a function that returns the given values.

func (*TaskGetStartFunc) SetDefaultHook

func (f *TaskGetStartFunc) SetDefaultHook(hook func() uint64)

SetDefaultHook sets function that is called when the GetStart method of the parent MockTask instance is invoked and the hook queue is empty.

func (*TaskGetStartFunc) SetDefaultReturn

func (f *TaskGetStartFunc) SetDefaultReturn(r0 uint64)

SetDefaultReturn calls SetDefaultHook with a function that returns the given values.

type TaskGetStartFuncCall

type TaskGetStartFuncCall struct {
	// Result0 is the value of the 1st result returned from this method
	// invocation.
	Result0 uint64
}

TaskGetStartFuncCall is an object that describes an invocation of method GetStart on an instance of MockTask.

func (TaskGetStartFuncCall) Args

func (c TaskGetStartFuncCall) Args() []interface{}

Args returns an interface slice containing the arguments of this invocation.

func (TaskGetStartFuncCall) Results

func (c TaskGetStartFuncCall) Results() []interface{}

Results returns an interface slice containing the results of this invocation.

type TaskGetSubscribeOptionsFunc

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

TaskGetSubscribeOptionsFunc describes the behavior when the GetSubscribeOptions method of the parent MockTask instance is invoked.

func (*TaskGetSubscribeOptionsFunc) History

History returns a sequence of TaskGetSubscribeOptionsFuncCall objects describing the invocations of this function.

func (*TaskGetSubscribeOptionsFunc) PushHook

func (f *TaskGetSubscribeOptionsFunc) PushHook(hook func() *transaction.SubscribeOptions)

PushHook adds a function to the end of hook queue. Each invocation of the GetSubscribeOptions method of the parent MockTask instance invokes the hook at the front of the queue and discards it. After the queue is empty, the default hook function is invoked for any future action.

func (*TaskGetSubscribeOptionsFunc) PushReturn

PushReturn calls PushHook with a function that returns the given values.

func (*TaskGetSubscribeOptionsFunc) SetDefaultHook

func (f *TaskGetSubscribeOptionsFunc) SetDefaultHook(hook func() *transaction.SubscribeOptions)

SetDefaultHook sets function that is called when the GetSubscribeOptions method of the parent MockTask instance is invoked and the hook queue is empty.

func (*TaskGetSubscribeOptionsFunc) SetDefaultReturn

func (f *TaskGetSubscribeOptionsFunc) SetDefaultReturn(r0 *transaction.SubscribeOptions)

SetDefaultReturn calls SetDefaultHook with a function that returns the given values.

type TaskGetSubscribeOptionsFuncCall

type TaskGetSubscribeOptionsFuncCall struct {
	// Result0 is the value of the 1st result returned from this method
	// invocation.
	Result0 *transaction.SubscribeOptions
}

TaskGetSubscribeOptionsFuncCall is an object that describes an invocation of method GetSubscribeOptions on an instance of MockTask.

func (TaskGetSubscribeOptionsFuncCall) Args

func (c TaskGetSubscribeOptionsFuncCall) Args() []interface{}

Args returns an interface slice containing the arguments of this invocation.

func (TaskGetSubscribeOptionsFuncCall) Results

func (c TaskGetSubscribeOptionsFuncCall) Results() []interface{}

Results returns an interface slice containing the results of this invocation.

type TaskInitializeFunc

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

TaskInitializeFunc describes the behavior when the Initialize method of the parent MockTask instance is invoked.

func (*TaskInitializeFunc) History

History returns a sequence of TaskInitializeFuncCall objects describing the invocations of this function.

func (*TaskInitializeFunc) PushHook

PushHook adds a function to the end of hook queue. Each invocation of the Initialize method of the parent MockTask instance invokes the hook at the front of the queue and discards it. After the queue is empty, the default hook function is invoked for any future action.

func (*TaskInitializeFunc) PushReturn

func (f *TaskInitializeFunc) PushReturn(r0 error)

PushReturn calls PushHook with a function that returns the given values.

func (*TaskInitializeFunc) SetDefaultHook

SetDefaultHook sets function that is called when the Initialize method of the parent MockTask instance is invoked and the hook queue is empty.

func (*TaskInitializeFunc) SetDefaultReturn

func (f *TaskInitializeFunc) SetDefaultReturn(r0 error)

SetDefaultReturn calls SetDefaultHook with a function that returns the given values.

type TaskInitializeFuncCall

type TaskInitializeFuncCall struct {
	// Arg0 is the value of the 1st argument passed to this method
	// invocation.
	Arg0 *db.Database
	// Arg1 is the value of the 2nd argument passed to this method
	// invocation.
	Arg1 *logrus.Entry
	// Arg2 is the value of the 3rd argument passed to this method
	// invocation.
	Arg2 layer1.Client
	// Arg3 is the value of the 4th argument passed to this method
	// invocation.
	Arg3 layer1.AllSmartContracts
	// Arg4 is the value of the 5th argument passed to this method
	// invocation.
	Arg4 string
	// Arg5 is the value of the 6th argument passed to this method
	// invocation.
	Arg5 string
	// Arg6 is the value of the 7th argument passed to this method
	// invocation.
	Arg6 uint64
	// Arg7 is the value of the 8th argument passed to this method
	// invocation.
	Arg7 uint64
	// Arg8 is the value of the 9th argument passed to this method
	// invocation.
	Arg8 bool
	// Arg9 is the value of the 10th argument passed to this method
	// invocation.
	Arg9 *transaction.SubscribeOptions
	// Arg10 is the value of the 11th argument passed to this method
	// invocation.
	Arg10 tasks.InternalTaskResponseChan
	// Result0 is the value of the 1st result returned from this method
	// invocation.
	Result0 error
}

TaskInitializeFuncCall is an object that describes an invocation of method Initialize on an instance of MockTask.

func (TaskInitializeFuncCall) Args

func (c TaskInitializeFuncCall) Args() []interface{}

Args returns an interface slice containing the arguments of this invocation.

func (TaskInitializeFuncCall) Results

func (c TaskInitializeFuncCall) Results() []interface{}

Results returns an interface slice containing the results of this invocation.

type TaskKillChanFunc added in v0.0.8

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

TaskKillChanFunc describes the behavior when the KillChan method of the parent MockTask instance is invoked.

func (*TaskKillChanFunc) History added in v0.0.8

func (f *TaskKillChanFunc) History() []TaskKillChanFuncCall

History returns a sequence of TaskKillChanFuncCall objects describing the invocations of this function.

func (*TaskKillChanFunc) PushHook added in v0.0.8

func (f *TaskKillChanFunc) PushHook(hook func() <-chan struct{})

PushHook adds a function to the end of hook queue. Each invocation of the KillChan method of the parent MockTask instance invokes the hook at the front of the queue and discards it. After the queue is empty, the default hook function is invoked for any future action.

func (*TaskKillChanFunc) PushReturn added in v0.0.8

func (f *TaskKillChanFunc) PushReturn(r0 <-chan struct{})

PushReturn calls PushHook with a function that returns the given values.

func (*TaskKillChanFunc) SetDefaultHook added in v0.0.8

func (f *TaskKillChanFunc) SetDefaultHook(hook func() <-chan struct{})

SetDefaultHook sets function that is called when the KillChan method of the parent MockTask instance is invoked and the hook queue is empty.

func (*TaskKillChanFunc) SetDefaultReturn added in v0.0.8

func (f *TaskKillChanFunc) SetDefaultReturn(r0 <-chan struct{})

SetDefaultReturn calls SetDefaultHook with a function that returns the given values.

type TaskKillChanFuncCall added in v0.0.8

type TaskKillChanFuncCall struct {
	// Result0 is the value of the 1st result returned from this method
	// invocation.
	Result0 <-chan struct{}
}

TaskKillChanFuncCall is an object that describes an invocation of method KillChan on an instance of MockTask.

func (TaskKillChanFuncCall) Args added in v0.0.8

func (c TaskKillChanFuncCall) Args() []interface{}

Args returns an interface slice containing the arguments of this invocation.

func (TaskKillChanFuncCall) Results added in v0.0.8

func (c TaskKillChanFuncCall) Results() []interface{}

Results returns an interface slice containing the results of this invocation.

type TaskKillFunc added in v0.0.8

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

TaskKillFunc describes the behavior when the Kill method of the parent MockTask instance is invoked.

func (*TaskKillFunc) History added in v0.0.8

func (f *TaskKillFunc) History() []TaskKillFuncCall

History returns a sequence of TaskKillFuncCall objects describing the invocations of this function.

func (*TaskKillFunc) PushHook added in v0.0.8

func (f *TaskKillFunc) PushHook(hook func())

PushHook adds a function to the end of hook queue. Each invocation of the Kill method of the parent MockTask instance invokes the hook at the front of the queue and discards it. After the queue is empty, the default hook function is invoked for any future action.

func (*TaskKillFunc) PushReturn added in v0.0.8

func (f *TaskKillFunc) PushReturn()

PushReturn calls PushHook with a function that returns the given values.

func (*TaskKillFunc) SetDefaultHook added in v0.0.8

func (f *TaskKillFunc) SetDefaultHook(hook func())

SetDefaultHook sets function that is called when the Kill method of the parent MockTask instance is invoked and the hook queue is empty.

func (*TaskKillFunc) SetDefaultReturn added in v0.0.8

func (f *TaskKillFunc) SetDefaultReturn()

SetDefaultReturn calls SetDefaultHook with a function that returns the given values.

type TaskKillFuncCall added in v0.0.8

type TaskKillFuncCall struct{}

TaskKillFuncCall is an object that describes an invocation of method Kill on an instance of MockTask.

func (TaskKillFuncCall) Args added in v0.0.8

func (c TaskKillFuncCall) Args() []interface{}

Args returns an interface slice containing the arguments of this invocation.

func (TaskKillFuncCall) Results added in v0.0.8

func (c TaskKillFuncCall) Results() []interface{}

Results returns an interface slice containing the results of this invocation.

type TaskLockFunc

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

TaskLockFunc describes the behavior when the Lock method of the parent MockTask instance is invoked.

func (*TaskLockFunc) History

func (f *TaskLockFunc) History() []TaskLockFuncCall

History returns a sequence of TaskLockFuncCall objects describing the invocations of this function.

func (*TaskLockFunc) PushHook

func (f *TaskLockFunc) PushHook(hook func())

PushHook adds a function to the end of hook queue. Each invocation of the Lock method of the parent MockTask instance invokes the hook at the front of the queue and discards it. After the queue is empty, the default hook function is invoked for any future action.

func (*TaskLockFunc) PushReturn

func (f *TaskLockFunc) PushReturn()

PushReturn calls PushHook with a function that returns the given values.

func (*TaskLockFunc) SetDefaultHook

func (f *TaskLockFunc) SetDefaultHook(hook func())

SetDefaultHook sets function that is called when the Lock method of the parent MockTask instance is invoked and the hook queue is empty.

func (*TaskLockFunc) SetDefaultReturn

func (f *TaskLockFunc) SetDefaultReturn()

SetDefaultReturn calls SetDefaultHook with a function that returns the given values.

type TaskLockFuncCall

type TaskLockFuncCall struct{}

TaskLockFuncCall is an object that describes an invocation of method Lock on an instance of MockTask.

func (TaskLockFuncCall) Args

func (c TaskLockFuncCall) Args() []interface{}

Args returns an interface slice containing the arguments of this invocation.

func (TaskLockFuncCall) Results

func (c TaskLockFuncCall) Results() []interface{}

Results returns an interface slice containing the results of this invocation.

type TaskPrepareFunc

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

TaskPrepareFunc describes the behavior when the Prepare method of the parent MockTask instance is invoked.

func (*TaskPrepareFunc) History

func (f *TaskPrepareFunc) History() []TaskPrepareFuncCall

History returns a sequence of TaskPrepareFuncCall objects describing the invocations of this function.

func (*TaskPrepareFunc) PushHook

func (f *TaskPrepareFunc) PushHook(hook func(context.Context) *tasks.TaskErr)

PushHook adds a function to the end of hook queue. Each invocation of the Prepare method of the parent MockTask instance invokes the hook at the front of the queue and discards it. After the queue is empty, the default hook function is invoked for any future action.

func (*TaskPrepareFunc) PushReturn

func (f *TaskPrepareFunc) PushReturn(r0 *tasks.TaskErr)

PushReturn calls PushHook with a function that returns the given values.

func (*TaskPrepareFunc) SetDefaultHook

func (f *TaskPrepareFunc) SetDefaultHook(hook func(context.Context) *tasks.TaskErr)

SetDefaultHook sets function that is called when the Prepare method of the parent MockTask instance is invoked and the hook queue is empty.

func (*TaskPrepareFunc) SetDefaultReturn

func (f *TaskPrepareFunc) SetDefaultReturn(r0 *tasks.TaskErr)

SetDefaultReturn calls SetDefaultHook with a function that returns the given values.

type TaskPrepareFuncCall

type TaskPrepareFuncCall struct {
	// Arg0 is the value of the 1st argument passed to this method
	// invocation.
	Arg0 context.Context
	// Result0 is the value of the 1st result returned from this method
	// invocation.
	Result0 *tasks.TaskErr
}

TaskPrepareFuncCall is an object that describes an invocation of method Prepare on an instance of MockTask.

func (TaskPrepareFuncCall) Args

func (c TaskPrepareFuncCall) Args() []interface{}

Args returns an interface slice containing the arguments of this invocation.

func (TaskPrepareFuncCall) Results

func (c TaskPrepareFuncCall) Results() []interface{}

Results returns an interface slice containing the results of this invocation.

type TaskShouldExecuteFunc

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

TaskShouldExecuteFunc describes the behavior when the ShouldExecute method of the parent MockTask instance is invoked.

func (*TaskShouldExecuteFunc) History

History returns a sequence of TaskShouldExecuteFuncCall objects describing the invocations of this function.

func (*TaskShouldExecuteFunc) PushHook

func (f *TaskShouldExecuteFunc) PushHook(hook func(context.Context) (bool, *tasks.TaskErr))

PushHook adds a function to the end of hook queue. Each invocation of the ShouldExecute method of the parent MockTask instance invokes the hook at the front of the queue and discards it. After the queue is empty, the default hook function is invoked for any future action.

func (*TaskShouldExecuteFunc) PushReturn

func (f *TaskShouldExecuteFunc) PushReturn(r0 bool, r1 *tasks.TaskErr)

PushReturn calls PushHook with a function that returns the given values.

func (*TaskShouldExecuteFunc) SetDefaultHook

func (f *TaskShouldExecuteFunc) SetDefaultHook(hook func(context.Context) (bool, *tasks.TaskErr))

SetDefaultHook sets function that is called when the ShouldExecute method of the parent MockTask instance is invoked and the hook queue is empty.

func (*TaskShouldExecuteFunc) SetDefaultReturn

func (f *TaskShouldExecuteFunc) SetDefaultReturn(r0 bool, r1 *tasks.TaskErr)

SetDefaultReturn calls SetDefaultHook with a function that returns the given values.

type TaskShouldExecuteFuncCall

type TaskShouldExecuteFuncCall struct {
	// Arg0 is the value of the 1st argument passed to this method
	// invocation.
	Arg0 context.Context
	// Result0 is the value of the 1st result returned from this method
	// invocation.
	Result0 bool
	// Result1 is the value of the 2nd result returned from this method
	// invocation.
	Result1 *tasks.TaskErr
}

TaskShouldExecuteFuncCall is an object that describes an invocation of method ShouldExecute on an instance of MockTask.

func (TaskShouldExecuteFuncCall) Args

func (c TaskShouldExecuteFuncCall) Args() []interface{}

Args returns an interface slice containing the arguments of this invocation.

func (TaskShouldExecuteFuncCall) Results

func (c TaskShouldExecuteFuncCall) Results() []interface{}

Results returns an interface slice containing the results of this invocation.

type TaskUnlockFunc

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

TaskUnlockFunc describes the behavior when the Unlock method of the parent MockTask instance is invoked.

func (*TaskUnlockFunc) History

func (f *TaskUnlockFunc) History() []TaskUnlockFuncCall

History returns a sequence of TaskUnlockFuncCall objects describing the invocations of this function.

func (*TaskUnlockFunc) PushHook

func (f *TaskUnlockFunc) PushHook(hook func())

PushHook adds a function to the end of hook queue. Each invocation of the Unlock method of the parent MockTask instance invokes the hook at the front of the queue and discards it. After the queue is empty, the default hook function is invoked for any future action.

func (*TaskUnlockFunc) PushReturn

func (f *TaskUnlockFunc) PushReturn()

PushReturn calls PushHook with a function that returns the given values.

func (*TaskUnlockFunc) SetDefaultHook

func (f *TaskUnlockFunc) SetDefaultHook(hook func())

SetDefaultHook sets function that is called when the Unlock method of the parent MockTask instance is invoked and the hook queue is empty.

func (*TaskUnlockFunc) SetDefaultReturn

func (f *TaskUnlockFunc) SetDefaultReturn()

SetDefaultReturn calls SetDefaultHook with a function that returns the given values.

type TaskUnlockFuncCall

type TaskUnlockFuncCall struct{}

TaskUnlockFuncCall is an object that describes an invocation of method Unlock on an instance of MockTask.

func (TaskUnlockFuncCall) Args

func (c TaskUnlockFuncCall) Args() []interface{}

Args returns an interface slice containing the arguments of this invocation.

func (TaskUnlockFuncCall) Results

func (c TaskUnlockFuncCall) Results() []interface{}

Results returns an interface slice containing the results of this invocation.

type TaskWasKilledFunc

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

TaskWasKilledFunc describes the behavior when the WasKilled method of the parent MockTask instance is invoked.

func (*TaskWasKilledFunc) History

History returns a sequence of TaskWasKilledFuncCall objects describing the invocations of this function.

func (*TaskWasKilledFunc) PushHook

func (f *TaskWasKilledFunc) PushHook(hook func() bool)

PushHook adds a function to the end of hook queue. Each invocation of the WasKilled method of the parent MockTask instance invokes the hook at the front of the queue and discards it. After the queue is empty, the default hook function is invoked for any future action.

func (*TaskWasKilledFunc) PushReturn

func (f *TaskWasKilledFunc) PushReturn(r0 bool)

PushReturn calls PushHook with a function that returns the given values.

func (*TaskWasKilledFunc) SetDefaultHook

func (f *TaskWasKilledFunc) SetDefaultHook(hook func() bool)

SetDefaultHook sets function that is called when the WasKilled method of the parent MockTask instance is invoked and the hook queue is empty.

func (*TaskWasKilledFunc) SetDefaultReturn

func (f *TaskWasKilledFunc) SetDefaultReturn(r0 bool)

SetDefaultReturn calls SetDefaultHook with a function that returns the given values.

type TaskWasKilledFuncCall

type TaskWasKilledFuncCall struct {
	// Result0 is the value of the 1st result returned from this method
	// invocation.
	Result0 bool
}

TaskWasKilledFuncCall is an object that describes an invocation of method WasKilled on an instance of MockTask.

func (TaskWasKilledFuncCall) Args

func (c TaskWasKilledFuncCall) Args() []interface{}

Args returns an interface slice containing the arguments of this invocation.

func (TaskWasKilledFuncCall) Results

func (c TaskWasKilledFuncCall) Results() []interface{}

Results returns an interface slice containing the results of this invocation.

Jump to

Keyboard shortcuts

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