testutil

package
v0.0.0-...-85f73e1 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockFirestoreClient

type MockFirestoreClient[T interface{}] struct {
	mock.Mock
}

MockFirestoreClient is an autogenerated mock type for the Client type

func NewMockFirestoreClient

func NewMockFirestoreClient[T interface{}](t interface {
	mock.TestingT
	Cleanup(func())
}) *MockFirestoreClient[T]

NewMockFirestoreClient creates a new instance of MockFirestoreClient. 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 (*MockFirestoreClient[T]) EXPECT

func (*MockFirestoreClient[T]) GetDocument

func (_m *MockFirestoreClient[T]) GetDocument(ctx context.Context, path string) (*T, error)

GetDocument provides a mock function with given fields: ctx, path

func (*MockFirestoreClient[T]) SetDocument

func (_m *MockFirestoreClient[T]) SetDocument(ctx context.Context, path string, data *T) error

SetDocument provides a mock function with given fields: ctx, path, data

type MockFirestoreClient_Expecter

type MockFirestoreClient_Expecter[T interface{}] struct {
	// contains filtered or unexported fields
}

func (*MockFirestoreClient_Expecter[T]) GetDocument

func (_e *MockFirestoreClient_Expecter[T]) GetDocument(ctx interface{}, path interface{}) *MockFirestoreClient_GetDocument_Call[T]

GetDocument is a helper method to define mock.On call

  • ctx context.Context
  • path string

func (*MockFirestoreClient_Expecter[T]) SetDocument

func (_e *MockFirestoreClient_Expecter[T]) SetDocument(ctx interface{}, path interface{}, data interface{}) *MockFirestoreClient_SetDocument_Call[T]

SetDocument is a helper method to define mock.On call

  • ctx context.Context
  • path string
  • data *T

type MockFirestoreClient_GetDocument_Call

type MockFirestoreClient_GetDocument_Call[T interface{}] struct {
	*mock.Call
}

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

func (*MockFirestoreClient_GetDocument_Call[T]) Return

func (*MockFirestoreClient_GetDocument_Call[T]) Run

func (*MockFirestoreClient_GetDocument_Call[T]) RunAndReturn

type MockFirestoreClient_SetDocument_Call

type MockFirestoreClient_SetDocument_Call[T interface{}] struct {
	*mock.Call
}

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

func (*MockFirestoreClient_SetDocument_Call[T]) Return

func (*MockFirestoreClient_SetDocument_Call[T]) Run

func (*MockFirestoreClient_SetDocument_Call[T]) RunAndReturn

Jump to

Keyboard shortcuts

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