Documentation
¶
Index ¶
Constants ¶
View Source
const ( ERR_Not_Expected_Call = "not expected call of %q. Expected %q" ERR_Events_Is_Empty = "not expected call of %q. Events is empty" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MockHistory ¶
type MockHistory[T any] struct { // contains filtered or unexported fields }
MockHistory stores the history of mock calls.
func NewMockHistory ¶
func NewMockHistory[T any]() *MockHistory[T]
NewMockHistory creates a new MockHistory.
func (*MockHistory[T]) AllExpectationsDone ¶
func (m *MockHistory[T]) AllExpectationsDone() error
AllExpectationsDone checks if all expected calls were made.
func (*MockHistory[T]) Get ¶
func (m *MockHistory[T]) Get(name string) (*MockHistoryItem[T], error)
Get retrieves a mock call from the history by name.
func (*MockHistory[T]) IsEmpty ¶
func (m *MockHistory[T]) IsEmpty() bool
IsEmpty checks if the history is empty.
func (*MockHistory[T]) Push ¶
func (m *MockHistory[T]) Push(name string, data T, err error)
Push adds a new mock call to the history.
type MockHistoryItem ¶
Click to show internal directories.
Click to hide internal directories.