Documentation
¶
Overview ¶
Package querytest provides test helpers for query options
Index ¶
- func OptMatcherFunc(want ...query.Option) func([]query.Option) bool
- type Cursor
- type Cursor_CreatedAt_Call
- type Cursor_Expecter
- type Cursor_Limit_Call
- type Cursor_UUID_Call
- type Query
- func (_m *Query) EXPECT() *Query_Expecter
- func (_mock *Query) Equal(another query.Query) bool
- func (_mock *Query) Filters() query.Filters[any]
- func (_mock *Query) IncludedResourceObjects() []string
- func (_mock *Query) Merge(q query.Query)
- func (_mock *Query) Pagination() *query.PaginationParams
- func (_mock *Query) Sorting() *query.SortingParams
- type Query_Equal_Call
- type Query_Expecter
- func (_e *Query_Expecter) Equal(another interface{}) *Query_Equal_Call
- func (_e *Query_Expecter) Filters() *Query_Filters_Call
- func (_e *Query_Expecter) IncludedResourceObjects() *Query_IncludedResourceObjects_Call
- func (_e *Query_Expecter) Merge(q interface{}) *Query_Merge_Call
- func (_e *Query_Expecter) Pagination() *Query_Pagination_Call
- func (_e *Query_Expecter) Sorting() *Query_Sorting_Call
- type Query_Filters_Call
- type Query_IncludedResourceObjects_Call
- func (_c *Query_IncludedResourceObjects_Call) Return(strings []string) *Query_IncludedResourceObjects_Call
- func (_c *Query_IncludedResourceObjects_Call) Run(run func()) *Query_IncludedResourceObjects_Call
- func (_c *Query_IncludedResourceObjects_Call) RunAndReturn(run func() []string) *Query_IncludedResourceObjects_Call
- type Query_Merge_Call
- type Query_Pagination_Call
- type Query_Sorting_Call
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Cursor ¶
Cursor is an autogenerated mock type for the Cursor type
func NewCursor ¶
NewCursor creates a new instance of Cursor. 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 (*Cursor) EXPECT ¶
func (_m *Cursor) EXPECT() *Cursor_Expecter
type Cursor_CreatedAt_Call ¶
Cursor_CreatedAt_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreatedAt'
func (*Cursor_CreatedAt_Call) Return ¶
func (_c *Cursor_CreatedAt_Call) Return(time1 time.Time) *Cursor_CreatedAt_Call
func (*Cursor_CreatedAt_Call) Run ¶
func (_c *Cursor_CreatedAt_Call) Run(run func()) *Cursor_CreatedAt_Call
func (*Cursor_CreatedAt_Call) RunAndReturn ¶
func (_c *Cursor_CreatedAt_Call) RunAndReturn(run func() time.Time) *Cursor_CreatedAt_Call
type Cursor_Expecter ¶
type Cursor_Expecter struct {
// contains filtered or unexported fields
}
func (*Cursor_Expecter) CreatedAt ¶
func (_e *Cursor_Expecter) CreatedAt() *Cursor_CreatedAt_Call
CreatedAt is a helper method to define mock.On call
func (*Cursor_Expecter) Limit ¶
func (_e *Cursor_Expecter) Limit() *Cursor_Limit_Call
Limit is a helper method to define mock.On call
func (*Cursor_Expecter) UUID ¶
func (_e *Cursor_Expecter) UUID() *Cursor_UUID_Call
UUID is a helper method to define mock.On call
type Cursor_Limit_Call ¶
Cursor_Limit_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Limit'
func (*Cursor_Limit_Call) Return ¶
func (_c *Cursor_Limit_Call) Return(n int) *Cursor_Limit_Call
func (*Cursor_Limit_Call) Run ¶
func (_c *Cursor_Limit_Call) Run(run func()) *Cursor_Limit_Call
func (*Cursor_Limit_Call) RunAndReturn ¶
func (_c *Cursor_Limit_Call) RunAndReturn(run func() int) *Cursor_Limit_Call
type Cursor_UUID_Call ¶
Cursor_UUID_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UUID'
func (*Cursor_UUID_Call) Return ¶
func (_c *Cursor_UUID_Call) Return(s string) *Cursor_UUID_Call
func (*Cursor_UUID_Call) Run ¶
func (_c *Cursor_UUID_Call) Run(run func()) *Cursor_UUID_Call
func (*Cursor_UUID_Call) RunAndReturn ¶
func (_c *Cursor_UUID_Call) RunAndReturn(run func() string) *Cursor_UUID_Call
type Query ¶
Query is an autogenerated mock type for the Query type
func NewQuery ¶
NewQuery creates a new instance of Query. 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 (*Query) EXPECT ¶
func (_m *Query) EXPECT() *Query_Expecter
func (*Query) IncludedResourceObjects ¶
IncludedResourceObjects provides a mock function for the type Query
func (*Query) Pagination ¶
func (_mock *Query) Pagination() *query.PaginationParams
Pagination provides a mock function for the type Query
func (*Query) Sorting ¶
func (_mock *Query) Sorting() *query.SortingParams
Sorting provides a mock function for the type Query
type Query_Equal_Call ¶
Query_Equal_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Equal'
func (*Query_Equal_Call) Return ¶
func (_c *Query_Equal_Call) Return(b bool) *Query_Equal_Call
func (*Query_Equal_Call) Run ¶
func (_c *Query_Equal_Call) Run(run func(another query.Query)) *Query_Equal_Call
func (*Query_Equal_Call) RunAndReturn ¶
func (_c *Query_Equal_Call) RunAndReturn(run func(another query.Query) bool) *Query_Equal_Call
type Query_Expecter ¶
type Query_Expecter struct {
// contains filtered or unexported fields
}
func (*Query_Expecter) Equal ¶
func (_e *Query_Expecter) Equal(another interface{}) *Query_Equal_Call
Equal is a helper method to define mock.On call
- another query.Query
func (*Query_Expecter) Filters ¶
func (_e *Query_Expecter) Filters() *Query_Filters_Call
Filters is a helper method to define mock.On call
func (*Query_Expecter) IncludedResourceObjects ¶
func (_e *Query_Expecter) IncludedResourceObjects() *Query_IncludedResourceObjects_Call
IncludedResourceObjects is a helper method to define mock.On call
func (*Query_Expecter) Merge ¶
func (_e *Query_Expecter) Merge(q interface{}) *Query_Merge_Call
Merge is a helper method to define mock.On call
- q query.Query
func (*Query_Expecter) Pagination ¶
func (_e *Query_Expecter) Pagination() *Query_Pagination_Call
Pagination is a helper method to define mock.On call
func (*Query_Expecter) Sorting ¶
func (_e *Query_Expecter) Sorting() *Query_Sorting_Call
Sorting is a helper method to define mock.On call
type Query_Filters_Call ¶
Query_Filters_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Filters'
func (*Query_Filters_Call) Return ¶
func (_c *Query_Filters_Call) Return(filters query.Filters[any]) *Query_Filters_Call
func (*Query_Filters_Call) Run ¶
func (_c *Query_Filters_Call) Run(run func()) *Query_Filters_Call
func (*Query_Filters_Call) RunAndReturn ¶
func (_c *Query_Filters_Call) RunAndReturn(run func() query.Filters[any]) *Query_Filters_Call
type Query_IncludedResourceObjects_Call ¶
Query_IncludedResourceObjects_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'IncludedResourceObjects'
func (*Query_IncludedResourceObjects_Call) Return ¶
func (_c *Query_IncludedResourceObjects_Call) Return(strings []string) *Query_IncludedResourceObjects_Call
func (*Query_IncludedResourceObjects_Call) Run ¶
func (_c *Query_IncludedResourceObjects_Call) Run(run func()) *Query_IncludedResourceObjects_Call
func (*Query_IncludedResourceObjects_Call) RunAndReturn ¶
func (_c *Query_IncludedResourceObjects_Call) RunAndReturn(run func() []string) *Query_IncludedResourceObjects_Call
type Query_Merge_Call ¶
Query_Merge_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Merge'
func (*Query_Merge_Call) Return ¶
func (_c *Query_Merge_Call) Return() *Query_Merge_Call
func (*Query_Merge_Call) Run ¶
func (_c *Query_Merge_Call) Run(run func(q query.Query)) *Query_Merge_Call
func (*Query_Merge_Call) RunAndReturn ¶
func (_c *Query_Merge_Call) RunAndReturn(run func(q query.Query)) *Query_Merge_Call
type Query_Pagination_Call ¶
Query_Pagination_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Pagination'
func (*Query_Pagination_Call) Return ¶
func (_c *Query_Pagination_Call) Return(paginationParams *query.PaginationParams) *Query_Pagination_Call
func (*Query_Pagination_Call) Run ¶
func (_c *Query_Pagination_Call) Run(run func()) *Query_Pagination_Call
func (*Query_Pagination_Call) RunAndReturn ¶
func (_c *Query_Pagination_Call) RunAndReturn(run func() *query.PaginationParams) *Query_Pagination_Call
type Query_Sorting_Call ¶
Query_Sorting_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Sorting'
func (*Query_Sorting_Call) Return ¶
func (_c *Query_Sorting_Call) Return(sortingParams *query.SortingParams) *Query_Sorting_Call
func (*Query_Sorting_Call) Run ¶
func (_c *Query_Sorting_Call) Run(run func()) *Query_Sorting_Call
func (*Query_Sorting_Call) RunAndReturn ¶
func (_c *Query_Sorting_Call) RunAndReturn(run func() *query.SortingParams) *Query_Sorting_Call