mocks

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2020 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Battle

func Battle() battles.Battle

Battle returns an instance of battles.Battle that may be used for mocking purposes

func BattleCreationInput

func BattleCreationInput() battles.CreationInput

BattleCreationInput returns an instance of battles.CreationInput that may be used for mocking inputs to create battles

func Commander

func Commander() commanders.Commander

Commander returns an instance of commanders.Commander that may be used for mocking purposes

func Commander2

func Commander2() commanders.Commander

Commander2 returns an instance of commanders.Commander that may be used for mocking purposes

func Commander3

func Commander3() commanders.Commander

Commander3 returns an instance of commanders.Commander that may be used for mocking purposes

func Commander4

func Commander4() commanders.Commander

Commander4 returns an instance of commanders.Commander that may be used for mocking purposes

func Commander5

func Commander5() commanders.Commander

Commander5 returns an instance of commanders.Commander that may be used for mocking purposes

func CommanderCreationInput

func CommanderCreationInput() commanders.CreationInput

CommanderCreationInput returns an instance of commanders.CreationInput that may be used for mocking inputs to create commanders

func CommanderCreationInput2

func CommanderCreationInput2() commanders.CreationInput

CommanderCreationInput2 returns an instance of commanders.CreationInput that may be used for mocking inputs to create commanders

func CommanderCreationInput3

func CommanderCreationInput3() commanders.CreationInput

CommanderCreationInput3 returns an instance of commanders.CreationInput that may be used for mocking inputs to create commanders

func CommanderCreationInput4

func CommanderCreationInput4() commanders.CreationInput

CommanderCreationInput4 returns an instance of commanders.CreationInput that may be used for mocking inputs to create commanders

func CommanderCreationInput5

func CommanderCreationInput5() commanders.CreationInput

CommanderCreationInput5 returns an instance of commanders.CreationInput that may be used for mocking inputs to create commanders

func Faction

func Faction() factions.Faction

Faction returns an instance of factions.Faction that may be used for mocking purposes

func Faction2

func Faction2() factions.Faction

Faction2 returns an instance of factions.Faction that may be used for mocking purposes

func Faction3

func Faction3() factions.Faction

Faction3 returns an instance of factions.Faction that may be used for mocking purposes

func FactionCreationInput

func FactionCreationInput() factions.CreationInput

FactionCreationInput returns an instance of factions.CreationInput that may be used for mocking inputs to create factions

func FactionCreationInput2

func FactionCreationInput2() factions.CreationInput

FactionCreationInput2 returns an instance of factions.CreationInput that may be used for mocking inputs to create factions

func FactionCreationInput3

func FactionCreationInput3() factions.CreationInput

FactionCreationInput3 returns an instance of factions.CreationInput that may be used for mocking inputs to create factions

func WikiBattle

func WikiBattle() wikibattles.Battle

WikiBattle returns an instance of wikibattles.Battle that may be used for testing purposes

func WikiCommander

func WikiCommander() wikiactors.Actor

WikiCommander returns a commander instance of wikiactors.Actor that may be used for testing purposes

func WikiCommander2

func WikiCommander2() wikiactors.Actor

WikiCommander2 returns a commander instance of wikiactors.Actor that may be used for testing purposes

func WikiCommander3

func WikiCommander3() wikiactors.Actor

WikiCommander3 returns a commander instance of wikiactors.Actor that may be used for testing purposes

func WikiCommander4

func WikiCommander4() wikiactors.Actor

WikiCommander4 returns a commander instance of wikiactors.Actor that may be used for testing purposes

func WikiCommander5

func WikiCommander5() wikiactors.Actor

WikiCommander5 returns a commander instance of wikiactors.Actor that may be used for testing purposes

func WikiFaction

func WikiFaction() wikiactors.Actor

WikiFaction returns a faction instance of wikiactors.Actor that may be used for testing purposes

func WikiFaction2

func WikiFaction2() wikiactors.Actor

WikiFaction2 returns a faction instance of wikiactors.Actor that may be used for testing purposes

func WikiFaction3

func WikiFaction3() wikiactors.Actor

WikiFaction3 returns a faction instance of wikiactors.Actor that may be used for testing purposes

Types

type BattlesRepository

type BattlesRepository struct {
	mock.Mock
}

BattlesRepository mocks repositories used to read and write battles

func (*BattlesRepository) CreateOne

func (r *BattlesRepository) CreateOne(data battles.CreationInput) (uuid.UUID, error)

CreateOne mocks creating one battle via BattlesRepository

func (*BattlesRepository) FindMany

func (r *BattlesRepository) FindMany(query battles.FindManyQuery, page int) ([]battles.Battle, int, error)

FindMany mocks finding many battles via BattlesRepository

func (*BattlesRepository) FindOne

FindOne mocks finding one battle via BattlesRepository

type CommandersRepository

type CommandersRepository struct {
	mock.Mock
}

CommandersRepository mocks repositories used to read and write commanders

func (*CommandersRepository) CreateOne

CreateOne mocks creating one commander via CommandersRepository

func (*CommandersRepository) FindMany

FindMany mocks finding many commanders via CommandersRepository

func (*CommandersRepository) FindOne

FindOne mocks finding one commander via CommandersRepository

type FactionsRepository

type FactionsRepository struct {
	mock.Mock
}

FactionsRepository mocks repositories used to read and write factions

func (*FactionsRepository) CreateOne

func (r *FactionsRepository) CreateOne(data factions.CreationInput) (uuid.UUID, error)

CreateOne mocks creating one faction via FactionsRepository

func (*FactionsRepository) FindMany

func (r *FactionsRepository) FindMany(query factions.FindManyQuery, page int) ([]factions.Faction, int, error)

FindMany mocks finding many commanders via FactionsRepository

func (*FactionsRepository) FindOne

FindOne mocks finding one faction via FactionsRepository

type Writer

type Writer struct {
	Writes []string
}

Writer mocks an io.Writer interface, storing each one of the messages written in string form

func (*Writer) Write

func (w *Writer) Write(bytes []byte) (int, error)

Jump to

Keyboard shortcuts

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