mocks

package
v1.0.9 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2025 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type XcodeArgsMock

type XcodeArgsMock struct {
	// ArgsFunc mocks the Args method.
	ArgsFunc func(additional map[string]string) []string

	// CommandFunc mocks the Command method.
	CommandFunc func() string

	// ShortCommandFunc mocks the ShortCommand method.
	ShortCommandFunc func() string
	// contains filtered or unexported fields
}

XcodeArgsMock is a mock implementation of xcodeargs.XcodeArgs.

func TestSomethingThatUsesXcodeArgs(t *testing.T) {

	// make and configure a mocked xcodeargs.XcodeArgs
	mockedXcodeArgs := &XcodeArgsMock{
		ArgsFunc: func(additional map[string]string) []string {
			panic("mock out the Args method")
		},
		CommandFunc: func() string {
			panic("mock out the Command method")
		},
		ShortCommandFunc: func() string {
			panic("mock out the ShortCommand method")
		},
	}

	// use mockedXcodeArgs in code that requires xcodeargs.XcodeArgs
	// and then make assertions.

}

func (*XcodeArgsMock) Args

func (mock *XcodeArgsMock) Args(additional map[string]string) []string

Args calls ArgsFunc.

func (*XcodeArgsMock) ArgsCalls

func (mock *XcodeArgsMock) ArgsCalls() []struct {
	Additional map[string]string
}

ArgsCalls gets all the calls that were made to Args. Check the length with:

len(mockedXcodeArgs.ArgsCalls())

func (*XcodeArgsMock) Command

func (mock *XcodeArgsMock) Command() string

Command calls CommandFunc.

func (*XcodeArgsMock) CommandCalls

func (mock *XcodeArgsMock) CommandCalls() []struct {
}

CommandCalls gets all the calls that were made to Command. Check the length with:

len(mockedXcodeArgs.CommandCalls())

func (*XcodeArgsMock) ShortCommand

func (mock *XcodeArgsMock) ShortCommand() string

ShortCommand calls ShortCommandFunc.

func (*XcodeArgsMock) ShortCommandCalls

func (mock *XcodeArgsMock) ShortCommandCalls() []struct {
}

ShortCommandCalls gets all the calls that were made to ShortCommand. Check the length with:

len(mockedXcodeArgs.ShortCommandCalls())

Jump to

Keyboard shortcuts

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