genparamname

package
v0.0.0-...-0bf2e8a Latest Latest
Warning

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

Go to latest
Published: Feb 11, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Go

type Go func()

type Interface

type Interface interface {
	Method(
		*myType,
		[3]json.Number,
		[]byte,
		map[sql.NullString]io.Reader,
		func(conn net.Conn),
		Go,
		chan *httputil.BufferPool,
		struct{ URL *url.URL },
		interface {
			fmt.Stringer
			CookieJar() http.CookieJar
		},
	)
}

type InterfaceMock

type InterfaceMock struct {
	// MethodFunc mocks the Method method.
	MethodFunc func(myTypeMoqParam *myType, numbers [3]json.Number, bytes []byte, nullStringToReader map[sql.NullString]io.Reader, fn func(conn net.Conn), goMoqParam Go, bufferPoolCh chan *httputil.BufferPool, val struct{ URL *url.URL }, ifaceVal interface {
		CookieJar() http.CookieJar
		fmt.Stringer
	})
	// contains filtered or unexported fields
}

InterfaceMock is a mock implementation of Interface.

func TestSomethingThatUsesInterface(t *testing.T) {

	// make and configure a mocked Interface
	mockedInterface := &InterfaceMock{
		MethodFunc: func(myTypeMoqParam *myType, numbers [3]json.Number, bytes []byte, nullStringToReader map[sql.NullString]io.Reader, fn func(conn net.Conn), goMoqParam Go, bufferPoolCh chan *httputil.BufferPool, val struct{URL *url.URL}, ifaceVal interface{CookieJar() http.CookieJar; fmt.Stringer})  {
			panic("mock out the Method method")
		},
	}

	// use mockedInterface in code that requires Interface
	// and then make assertions.

}

func (*InterfaceMock) Method

func (mock *InterfaceMock) Method(myTypeMoqParam *myType, numbers [3]json.Number, bytes []byte, nullStringToReader map[sql.NullString]io.Reader, fn func(conn net.Conn), goMoqParam Go, bufferPoolCh chan *httputil.BufferPool, val struct{ URL *url.URL }, ifaceVal interface {
	CookieJar() http.CookieJar
	fmt.Stringer
})

Method calls MethodFunc.

func (*InterfaceMock) MethodCalls

func (mock *InterfaceMock) MethodCalls() []struct {
	MyTypeMoqParam     *myType
	Numbers            [3]json.Number
	Bytes              []byte
	NullStringToReader map[sql.NullString]io.Reader
	Fn                 func(conn net.Conn)
	GoMoqParam         Go
	BufferPoolCh       chan *httputil.BufferPool
	Val                struct{ URL *url.URL }
	IfaceVal           interface {
		CookieJar() http.CookieJar
		fmt.Stringer
	}
}

MethodCalls gets all the calls that were made to Method. Check the length with:

len(mockedInterface.MethodCalls())

Jump to

Keyboard shortcuts

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