Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type StatusMock ¶
type StatusMock struct {
// GetFunc mocks the Get method.
GetFunc func() (*status.Info, error)
// contains filtered or unexported fields
}
StatusMock is a mock implementation of Status.
func TestSomethingThatUsesStatus(t *testing.T) {
// make and configure a mocked Status
mockedStatus := &StatusMock{
GetFunc: func() (*status.Info, error) {
panic("mock out the Get method")
},
}
// use mockedStatus in code that requires Status
// and then make assertions.
}
func (*StatusMock) GetCalls ¶
func (mock *StatusMock) GetCalls() []struct { }
GetCalls gets all the calls that were made to Get. Check the length with:
len(mockedStatus.GetCalls())
Click to show internal directories.
Click to hide internal directories.