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