testmoqs

package
v0.29.0 Latest Latest
Warning

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

Go to latest
Published: Jun 18, 2025 License: BSD-3-Clause Imports: 0 Imported by: 0

Documentation

Overview

Package testmoqs contains multiple test mocks and adaptors for use in unit testing

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DoSomethingWithParam added in v0.27.0

func DoSomethingWithParam(Param)

func StandaloneFunc

func StandaloneFunc(_ string, bParam bool) (string, error)

StandaloneFunc is used to test that standalone functions can be mocked

Types

type Generic added in v0.27.0

type Generic[T any, V any] struct{}

func (Generic[T, V]) DoSomething added in v0.27.0

func (g Generic[T, V]) DoSomething()

func (Generic[X, Y]) DoSomethingElse added in v0.27.0

func (g Generic[X, Y]) DoSomethingElse()

func (*Generic[X, Y]) DoSomethingElsePtr added in v0.27.0

func (g *Generic[X, Y]) DoSomethingElsePtr()

func (*Generic[T, V]) DoSomethingPtr added in v0.27.0

func (g *Generic[T, V]) DoSomethingPtr()

type Param added in v0.27.0

type Param struct{}

type PassByRefSimple

type PassByRefSimple struct{}

func (*PassByRefSimple) Usual

func (*PassByRefSimple) Usual(string, bool) (string, error)

type PassByValueSimple

type PassByValueSimple struct{}

func (PassByValueSimple) Usual

type Reduced

type Reduced interface {
	Usual(sParam string, bParam bool) (sResult string, err error)

	ReallyUnusualParams(struct {
		// contains filtered or unexported fields
	})
	ReallyUnusualResults() struct {
		// contains filtered or unexported fields
	}
	// contains filtered or unexported methods
}

Reduced creates a mock with an embedded reduced interface with only the exported methods mocked when using the ExcludeNonExported flag

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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