test

package
v0.0.0-...-da73495 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2019 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 RepoMock

type RepoMock struct {
	SaveHandler   func(participant participant.Participant) (*participant.Participant, participant.Error)
	GetHandler    func(id string) (*participant.Participant, participant.Error)
	GetAllHandler func() ([]*participant.Participant, participant.Error)
	DeleteHandler func(id string) participant.Error
}

RepoMock is used to mock Participant Repository. Inject the desired behaviour.

func (*RepoMock) Delete

func (r *RepoMock) Delete(id string) participant.Error

Delete mocks participant.Repository Delete.

func (*RepoMock) Get

Get mocks participant.Repository Get.

func (*RepoMock) GetAll

func (r *RepoMock) GetAll() ([]*participant.Participant, participant.Error)

GetAll mocks participant.Repository GetAll.

func (*RepoMock) Save

Save mocks participant.Repository Save.

Jump to

Keyboard shortcuts

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