searchtest

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: May 19, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Package searchtest provides tools to test search options, queries, etc

Package searchtest provides test helpers for search options

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AnyOpts

func AnyOpts() []search.Option

func OptMatcher

func OptMatcher(opt search.Option) gomock.Matcher

func OptMatcherFunc

func OptMatcherFunc(want search.Option) func(search.Option) bool

func OptsDiff

func OptsDiff(t *testing.T, expected, got []search.Option)

func OptsEqual

func OptsEqual(t *testing.T, expected, got []search.Option)

func OptsMatcherFunc

func OptsMatcherFunc(want ...search.Option) func([]search.Option) bool

Types

type Search struct {
	mock.Mock
}

Search is an autogenerated mock type for the Search type

func NewSearch

func NewSearch(t interface {
	mock.TestingT
	Cleanup(func())
}) *Search

NewSearch creates a new instance of Search. 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 (*Search) EXPECT

func (_m *Search) EXPECT() *Search_Expecter

func (*Search) Equal

func (_mock *Search) Equal(another search.Search) bool

Equal provides a mock function for the type Search

func (*Search) Query

func (_mock *Search) Query() query.Query

Query provides a mock function for the type Search

type Search_Equal_Call

type Search_Equal_Call struct {
	*mock.Call
}

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

func (*Search_Equal_Call) Return

func (_c *Search_Equal_Call) Return(b bool) *Search_Equal_Call

func (*Search_Equal_Call) Run

func (_c *Search_Equal_Call) Run(run func(another search.Search)) *Search_Equal_Call

func (*Search_Equal_Call) RunAndReturn

func (_c *Search_Equal_Call) RunAndReturn(run func(another search.Search) bool) *Search_Equal_Call

type Search_Expecter

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

func (*Search_Expecter) Equal

func (_e *Search_Expecter) Equal(another interface{}) *Search_Equal_Call

Equal is a helper method to define mock.On call

  • another search.Search

func (*Search_Expecter) Query

func (_e *Search_Expecter) Query() *Search_Query_Call

Query is a helper method to define mock.On call

type Search_Query_Call

type Search_Query_Call struct {
	*mock.Call
}

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

func (*Search_Query_Call) Return

func (_c *Search_Query_Call) Return(query1 query.Query) *Search_Query_Call

func (*Search_Query_Call) Run

func (_c *Search_Query_Call) Run(run func()) *Search_Query_Call

func (*Search_Query_Call) RunAndReturn

func (_c *Search_Query_Call) RunAndReturn(run func() query.Query) *Search_Query_Call

Jump to

Keyboard shortcuts

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