Documentation ¶
Index ¶
- type LatestFinalizedBlockCacheMock
- func (mock *LatestFinalizedBlockCacheMock) Get(chain nexus.ChainName) *big.Int
- func (mock *LatestFinalizedBlockCacheMock) GetCalls() []struct{ ... }
- func (mock *LatestFinalizedBlockCacheMock) Set(chain nexus.ChainName, blockNumber *big.Int)
- func (mock *LatestFinalizedBlockCacheMock) SetCalls() []struct{ ... }
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LatestFinalizedBlockCacheMock ¶
type LatestFinalizedBlockCacheMock struct { // GetFunc mocks the Get method. GetFunc func(chain nexus.ChainName) *big.Int // SetFunc mocks the Set method. SetFunc func(chain nexus.ChainName, blockNumber *big.Int) // contains filtered or unexported fields }
LatestFinalizedBlockCacheMock is a mock implementation of evm.LatestFinalizedBlockCache.
func TestSomethingThatUsesLatestFinalizedBlockCache(t *testing.T) { // make and configure a mocked evm.LatestFinalizedBlockCache mockedLatestFinalizedBlockCache := &LatestFinalizedBlockCacheMock{ GetFunc: func(chain nexus.ChainName) *big.Int { panic("mock out the Get method") }, SetFunc: func(chain nexus.ChainName, blockNumber *big.Int) { panic("mock out the Set method") }, } // use mockedLatestFinalizedBlockCache in code that requires evm.LatestFinalizedBlockCache // and then make assertions. }
func (*LatestFinalizedBlockCacheMock) Get ¶
func (mock *LatestFinalizedBlockCacheMock) Get(chain nexus.ChainName) *big.Int
Get calls GetFunc.
func (*LatestFinalizedBlockCacheMock) GetCalls ¶
func (mock *LatestFinalizedBlockCacheMock) GetCalls() []struct { Chain nexus.ChainName }
GetCalls gets all the calls that were made to Get. Check the length with:
len(mockedLatestFinalizedBlockCache.GetCalls())
Click to show internal directories.
Click to hide internal directories.