rangenum

package
v0.0.0-...-31af695 Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2025 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DoMagic

func DoMagic()

Types

type Magician

type Magician interface {
	DoMagic()
}

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) DoMagic

func (mock *MagicianMock) DoMagic()

DoMagic calls DoMagicFunc.

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())

Jump to

Keyboard shortcuts

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