mocks

package
v0.0.0-...-d389d3b Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EntityCreationValidator

type EntityCreationValidator[T common.EntityConstraint] struct {
	mock.Mock
}

EntityCreationValidator is an autogenerated mock type for the EntityCreationValidator type

func NewEntityCreationValidator

func NewEntityCreationValidator[T common.EntityConstraint](t mockConstructorTestingTNewEntityCreationValidator) *EntityCreationValidator[T]

NewEntityCreationValidator creates a new instance of EntityCreationValidator. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*EntityCreationValidator[T]) EXPECT

func (*EntityCreationValidator[T]) ValidateToCreate

func (_m *EntityCreationValidator[T]) ValidateToCreate(ctx context.Context, entity *T) error

ValidateToCreate provides a mock function with given fields: ctx, entity

type EntityCreationValidator_Expecter

type EntityCreationValidator_Expecter[T common.EntityConstraint] struct {
	// contains filtered or unexported fields
}

func (*EntityCreationValidator_Expecter[T]) ValidateToCreate

func (_e *EntityCreationValidator_Expecter[T]) ValidateToCreate(ctx interface{}, entity interface{}) *EntityCreationValidator_ValidateToCreate_Call[T]

ValidateToCreate is a helper method to define mock.On call

  • ctx context.Context
  • entity *T

type EntityCreationValidator_ValidateToCreate_Call

type EntityCreationValidator_ValidateToCreate_Call[T common.EntityConstraint] struct {
	*mock.Call
}

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

func (*EntityCreationValidator_ValidateToCreate_Call[T]) Return

func (*EntityCreationValidator_ValidateToCreate_Call[T]) Run

type EntityDeleteValidator

type EntityDeleteValidator[T common.EntityConstraint] struct {
	mock.Mock
}

EntityDeleteValidator is an autogenerated mock type for the EntityDeleteValidator type

func NewEntityDeleteValidator

func NewEntityDeleteValidator[T common.EntityConstraint](t mockConstructorTestingTNewEntityDeleteValidator) *EntityDeleteValidator[T]

NewEntityDeleteValidator creates a new instance of EntityDeleteValidator. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*EntityDeleteValidator[T]) EXPECT

func (*EntityDeleteValidator[T]) ValidateToDelete

func (_m *EntityDeleteValidator[T]) ValidateToDelete(ctx context.Context, entity *T) error

ValidateToDelete provides a mock function with given fields: ctx, entity

type EntityDeleteValidator_Expecter

type EntityDeleteValidator_Expecter[T common.EntityConstraint] struct {
	// contains filtered or unexported fields
}

func (*EntityDeleteValidator_Expecter[T]) ValidateToDelete

func (_e *EntityDeleteValidator_Expecter[T]) ValidateToDelete(ctx interface{}, entity interface{}) *EntityDeleteValidator_ValidateToDelete_Call[T]

ValidateToDelete is a helper method to define mock.On call

  • ctx context.Context
  • entity *T

type EntityDeleteValidator_ValidateToDelete_Call

type EntityDeleteValidator_ValidateToDelete_Call[T common.EntityConstraint] struct {
	*mock.Call
}

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

func (*EntityDeleteValidator_ValidateToDelete_Call[T]) Return

func (*EntityDeleteValidator_ValidateToDelete_Call[T]) Run

type EntityUpdateValidator

type EntityUpdateValidator[T common.EntityConstraint] struct {
	mock.Mock
}

EntityUpdateValidator is an autogenerated mock type for the EntityUpdateValidator type

func NewEntityUpdateValidator

func NewEntityUpdateValidator[T common.EntityConstraint](t mockConstructorTestingTNewEntityUpdateValidator) *EntityUpdateValidator[T]

NewEntityUpdateValidator creates a new instance of EntityUpdateValidator. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*EntityUpdateValidator[T]) EXPECT

func (*EntityUpdateValidator[T]) ValidateToUpdate

func (_m *EntityUpdateValidator[T]) ValidateToUpdate(ctx context.Context, origin *T, updated *T) error

ValidateToUpdate provides a mock function with given fields: ctx, origin, updated

type EntityUpdateValidator_Expecter

type EntityUpdateValidator_Expecter[T common.EntityConstraint] struct {
	// contains filtered or unexported fields
}

func (*EntityUpdateValidator_Expecter[T]) ValidateToUpdate

func (_e *EntityUpdateValidator_Expecter[T]) ValidateToUpdate(ctx interface{}, origin interface{}, updated interface{}) *EntityUpdateValidator_ValidateToUpdate_Call[T]

ValidateToUpdate is a helper method to define mock.On call

  • ctx context.Context
  • origin *T
  • updated *T

type EntityUpdateValidator_ValidateToUpdate_Call

type EntityUpdateValidator_ValidateToUpdate_Call[T common.EntityConstraint] struct {
	*mock.Call
}

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

func (*EntityUpdateValidator_ValidateToUpdate_Call[T]) Return

func (*EntityUpdateValidator_ValidateToUpdate_Call[T]) Run

type EntityValidator

type EntityValidator[T common.EntityConstraint] struct {
	mock.Mock
}

EntityValidator is an autogenerated mock type for the EntityValidator type

func NewEntityValidator

func NewEntityValidator[T common.EntityConstraint](t mockConstructorTestingTNewEntityValidator) *EntityValidator[T]

NewEntityValidator creates a new instance of EntityValidator. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*EntityValidator[T]) EXPECT

func (_m *EntityValidator[T]) EXPECT() *EntityValidator_Expecter[T]

func (*EntityValidator[T]) ValidateToCreate

func (_m *EntityValidator[T]) ValidateToCreate(ctx context.Context, entity *T) error

ValidateToCreate provides a mock function with given fields: ctx, entity

func (*EntityValidator[T]) ValidateToDelete

func (_m *EntityValidator[T]) ValidateToDelete(ctx context.Context, entity *T) error

ValidateToDelete provides a mock function with given fields: ctx, entity

func (*EntityValidator[T]) ValidateToUpdate

func (_m *EntityValidator[T]) ValidateToUpdate(ctx context.Context, origin *T, updated *T) error

ValidateToUpdate provides a mock function with given fields: ctx, origin, updated

func (*EntityValidator[T]) WithTx

func (_m *EntityValidator[T]) WithTx(tx *gorm.DB) validation.EntityValidator[T]

WithTx provides a mock function with given fields: tx

type EntityValidator_Expecter

type EntityValidator_Expecter[T common.EntityConstraint] struct {
	// contains filtered or unexported fields
}

func (*EntityValidator_Expecter[T]) ValidateToCreate

func (_e *EntityValidator_Expecter[T]) ValidateToCreate(ctx interface{}, entity interface{}) *EntityValidator_ValidateToCreate_Call[T]

ValidateToCreate is a helper method to define mock.On call

  • ctx context.Context
  • entity *T

func (*EntityValidator_Expecter[T]) ValidateToDelete

func (_e *EntityValidator_Expecter[T]) ValidateToDelete(ctx interface{}, entity interface{}) *EntityValidator_ValidateToDelete_Call[T]

ValidateToDelete is a helper method to define mock.On call

  • ctx context.Context
  • entity *T

func (*EntityValidator_Expecter[T]) ValidateToUpdate

func (_e *EntityValidator_Expecter[T]) ValidateToUpdate(ctx interface{}, origin interface{}, updated interface{}) *EntityValidator_ValidateToUpdate_Call[T]

ValidateToUpdate is a helper method to define mock.On call

  • ctx context.Context
  • origin *T
  • updated *T

func (*EntityValidator_Expecter[T]) WithTx

func (_e *EntityValidator_Expecter[T]) WithTx(tx interface{}) *EntityValidator_WithTx_Call[T]

WithTx is a helper method to define mock.On call

  • tx *gorm.DB

type EntityValidator_ValidateToCreate_Call

type EntityValidator_ValidateToCreate_Call[T common.EntityConstraint] struct {
	*mock.Call
}

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

func (*EntityValidator_ValidateToCreate_Call[T]) Return

func (*EntityValidator_ValidateToCreate_Call[T]) Run

type EntityValidator_ValidateToDelete_Call

type EntityValidator_ValidateToDelete_Call[T common.EntityConstraint] struct {
	*mock.Call
}

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

func (*EntityValidator_ValidateToDelete_Call[T]) Return

func (*EntityValidator_ValidateToDelete_Call[T]) Run

type EntityValidator_ValidateToUpdate_Call

type EntityValidator_ValidateToUpdate_Call[T common.EntityConstraint] struct {
	*mock.Call
}

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

func (*EntityValidator_ValidateToUpdate_Call[T]) Return

func (*EntityValidator_ValidateToUpdate_Call[T]) Run

func (_c *EntityValidator_ValidateToUpdate_Call[T]) Run(run func(ctx context.Context, origin *T, updated *T)) *EntityValidator_ValidateToUpdate_Call[T]

type EntityValidator_WithTx_Call

type EntityValidator_WithTx_Call[T common.EntityConstraint] struct {
	*mock.Call
}

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

func (*EntityValidator_WithTx_Call[T]) Return

func (*EntityValidator_WithTx_Call[T]) Run

func (_c *EntityValidator_WithTx_Call[T]) Run(run func(tx *gorm.DB)) *EntityValidator_WithTx_Call[T]

type ValidationFunc

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

ValidationFunc is an autogenerated mock type for the ValidationFunc type

func NewValidationFunc

func NewValidationFunc[T interface{}](t mockConstructorTestingTNewValidationFunc) *ValidationFunc[T]

NewValidationFunc creates a new instance of ValidationFunc. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*ValidationFunc[T]) EXPECT

func (_m *ValidationFunc[T]) EXPECT() *ValidationFunc_Expecter[T]

func (*ValidationFunc[T]) Execute

func (_m *ValidationFunc[T]) Execute(ctx context.Context, subject *T) error

Execute provides a mock function with given fields: ctx, subject

type ValidationFunc_Execute_Call

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

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

func (*ValidationFunc_Execute_Call[T]) Return

func (*ValidationFunc_Execute_Call[T]) Run

func (_c *ValidationFunc_Execute_Call[T]) Run(run func(ctx context.Context, subject *T)) *ValidationFunc_Execute_Call[T]

type ValidationFunc_Expecter

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

func (*ValidationFunc_Expecter[T]) Execute

func (_e *ValidationFunc_Expecter[T]) Execute(ctx interface{}, subject interface{}) *ValidationFunc_Execute_Call[T]

Execute is a helper method to define mock.On call

  • ctx context.Context
  • subject *T

Jump to

Keyboard shortcuts

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