mock

package
v0.0.0-rc7 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2024 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EngineMock

type EngineMock struct {
	mock.Mock
}

EngineMock is an autogenerated mock type for the Engine type

func NewEngineMock

func NewEngineMock(t interface {
	mock.TestingT
	Cleanup(func())
}) *EngineMock

NewEngineMock creates a new instance of EngineMock. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*EngineMock) EXPECT

func (_m *EngineMock) EXPECT() *EngineMock_Expecter

func (*EngineMock) Render

func (_m *EngineMock) Render(tmplName string, args any) (string, error)

Render provides a mock function with given fields: tmplName, args

type EngineMock_Expecter

type EngineMock_Expecter struct {
	// contains filtered or unexported fields
}

func (*EngineMock_Expecter) Render

func (_e *EngineMock_Expecter) Render(tmplName interface{}, args interface{}) *EngineMock_Render_Call

Render is a helper method to define mock.On call

  • tmplName string
  • args any

type EngineMock_Render_Call

type EngineMock_Render_Call struct {
	*mock.Call
}

EngineMock_Render_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Render'

func (*EngineMock_Render_Call) Return

func (*EngineMock_Render_Call) Run

func (_c *EngineMock_Render_Call) Run(run func(tmplName string, args any)) *EngineMock_Render_Call

func (*EngineMock_Render_Call) RunAndReturn

func (_c *EngineMock_Render_Call) RunAndReturn(run func(string, any) (string, error)) *EngineMock_Render_Call

type TemplateEngineMock

type TemplateEngineMock struct {
	mock.Mock
}

func (*TemplateEngineMock) Render

func (m *TemplateEngineMock) Render(templateName string, templateArgs any) (string, error)

Jump to

Keyboard shortcuts

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