test

package
v0.2.54 Latest Latest
Warning

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

Go to latest
Published: May 20, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockFactory

type MockFactory struct {
	ResultField       string
	SecureResultField string
}

MockFactory represents a mock implementation of the CommandFactory interface.

func (MockFactory) InitCommand

func (mock MockFactory) InitCommand(commandType command.CommandType) (command.CommandExecutor, error)

InitCommand initializes the command based on the provided command type.

type MockFailedCommand

type MockFailedCommand struct {
	Parameter string `json:"parameter"`
}

MockFailedCommand represents a mock implementation of a failed command.

func (MockFailedCommand) FetchResult

func (command MockFailedCommand) FetchResult(_ context.Context) (*task.Result, error)

FetchResult returns an error to simulate a failed command execution for MockFailedCommand.

type MockSuccessCommand

type MockSuccessCommand struct {
	FieldLabel string
	Parameter  string `json:"parameter"`
}

MockSuccessCommand represents a mock implementation of a successful command.

func (MockSuccessCommand) FetchResult

func (command MockSuccessCommand) FetchResult(_ context.Context) (*task.Result, error)

FetchResult returns the mock result for the MockSuccessCommand.

type MockSuccessSecureCommand

type MockSuccessSecureCommand struct {
	FieldLabel string
	Parameter  string `json:"parameter"`
}

MockSuccessSecureCommand represents a mock implementation of a successful secure command.

func (MockSuccessSecureCommand) FetchResult

func (command MockSuccessSecureCommand) FetchResult(_ context.Context) (*task.Result, error)

FetchResult returns the mock result for the MockSuccessSecureCommand.

Jump to

Keyboard shortcuts

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