mocks

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockExecutor

type MockExecutor struct {
	mock.Mock
}

MockExecutor is an autogenerated mock type for the Executor type

func NewMockExecutor

func NewMockExecutor(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockExecutor

NewMockExecutor creates a new instance of MockExecutor. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*MockExecutor) EXPECT

func (_m *MockExecutor) EXPECT() *MockExecutor_Expecter

func (*MockExecutor) ExecuteTxs

func (_m *MockExecutor) ExecuteTxs(ctx context.Context, txs []types.Tx, blockHeight uint64, timestamp time.Time, prevStateRoot header.Hash) (header.Hash, uint64, error)

ExecuteTxs provides a mock function with given fields: ctx, txs, blockHeight, timestamp, prevStateRoot

func (*MockExecutor) GetTxs

func (_m *MockExecutor) GetTxs(ctx context.Context) ([]types.Tx, error)

GetTxs provides a mock function with given fields: ctx

func (*MockExecutor) InitChain

func (_m *MockExecutor) InitChain(ctx context.Context, genesisTime time.Time, initialHeight uint64, chainID string) (header.Hash, uint64, error)

InitChain provides a mock function with given fields: ctx, genesisTime, initialHeight, chainID

func (*MockExecutor) SetFinal

func (_m *MockExecutor) SetFinal(ctx context.Context, blockHeight uint64) error

SetFinal provides a mock function with given fields: ctx, blockHeight

type MockExecutor_ExecuteTxs_Call

type MockExecutor_ExecuteTxs_Call struct {
	*mock.Call
}

MockExecutor_ExecuteTxs_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ExecuteTxs'

func (*MockExecutor_ExecuteTxs_Call) Return

func (_c *MockExecutor_ExecuteTxs_Call) Return(updatedStateRoot header.Hash, maxBytes uint64, err error) *MockExecutor_ExecuteTxs_Call

func (*MockExecutor_ExecuteTxs_Call) Run

func (_c *MockExecutor_ExecuteTxs_Call) Run(run func(ctx context.Context, txs []types.Tx, blockHeight uint64, timestamp time.Time, prevStateRoot header.Hash)) *MockExecutor_ExecuteTxs_Call

func (*MockExecutor_ExecuteTxs_Call) RunAndReturn

type MockExecutor_Expecter

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

func (*MockExecutor_Expecter) ExecuteTxs

func (_e *MockExecutor_Expecter) ExecuteTxs(ctx interface{}, txs interface{}, blockHeight interface{}, timestamp interface{}, prevStateRoot interface{}) *MockExecutor_ExecuteTxs_Call

ExecuteTxs is a helper method to define mock.On call

  • ctx context.Context
  • txs []types.Tx
  • blockHeight uint64
  • timestamp time.Time
  • prevStateRoot header.Hash

func (*MockExecutor_Expecter) GetTxs

func (_e *MockExecutor_Expecter) GetTxs(ctx interface{}) *MockExecutor_GetTxs_Call

GetTxs is a helper method to define mock.On call

  • ctx context.Context

func (*MockExecutor_Expecter) InitChain

func (_e *MockExecutor_Expecter) InitChain(ctx interface{}, genesisTime interface{}, initialHeight interface{}, chainID interface{}) *MockExecutor_InitChain_Call

InitChain is a helper method to define mock.On call

  • ctx context.Context
  • genesisTime time.Time
  • initialHeight uint64
  • chainID string

func (*MockExecutor_Expecter) SetFinal

func (_e *MockExecutor_Expecter) SetFinal(ctx interface{}, blockHeight interface{}) *MockExecutor_SetFinal_Call

SetFinal is a helper method to define mock.On call

  • ctx context.Context
  • blockHeight uint64

type MockExecutor_GetTxs_Call

type MockExecutor_GetTxs_Call struct {
	*mock.Call
}

MockExecutor_GetTxs_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetTxs'

func (*MockExecutor_GetTxs_Call) Return

func (*MockExecutor_GetTxs_Call) Run

func (*MockExecutor_GetTxs_Call) RunAndReturn

type MockExecutor_InitChain_Call

type MockExecutor_InitChain_Call struct {
	*mock.Call
}

MockExecutor_InitChain_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'InitChain'

func (*MockExecutor_InitChain_Call) Return

func (_c *MockExecutor_InitChain_Call) Return(stateRoot header.Hash, maxBytes uint64, err error) *MockExecutor_InitChain_Call

func (*MockExecutor_InitChain_Call) Run

func (_c *MockExecutor_InitChain_Call) Run(run func(ctx context.Context, genesisTime time.Time, initialHeight uint64, chainID string)) *MockExecutor_InitChain_Call

func (*MockExecutor_InitChain_Call) RunAndReturn

type MockExecutor_SetFinal_Call

type MockExecutor_SetFinal_Call struct {
	*mock.Call
}

MockExecutor_SetFinal_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetFinal'

func (*MockExecutor_SetFinal_Call) Return

func (*MockExecutor_SetFinal_Call) Run

func (_c *MockExecutor_SetFinal_Call) Run(run func(ctx context.Context, blockHeight uint64)) *MockExecutor_SetFinal_Call

func (*MockExecutor_SetFinal_Call) RunAndReturn

Jump to

Keyboard shortcuts

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