This commit is contained in:
@@ -45,6 +45,13 @@ type dummyExecutor struct {
|
||||
FetchOrderResult *order.UserGamesOrder
|
||||
FetchOrderOK bool
|
||||
FetchOrderErr error
|
||||
|
||||
// FetchBattle controls and observes calls to FetchBattle.
|
||||
FetchBattleTurn uint
|
||||
FetchBattleID uuid.UUID
|
||||
FetchBattleResult *report.BattleReport
|
||||
FetchBattleOK bool
|
||||
FetchBattleErr error
|
||||
}
|
||||
|
||||
func (e *dummyExecutor) ValidateOrder(actor string, cmd ...order.DecodableCommand) (*order.UserGamesOrder, error) {
|
||||
@@ -69,7 +76,9 @@ func (e *dummyExecutor) FetchOrder(actor string, turn uint) (*order.UserGamesOrd
|
||||
}
|
||||
|
||||
func (e *dummyExecutor) FetchBattle(turn uint, ID uuid.UUID) (*report.BattleReport, bool, error) {
|
||||
return nil, false, nil
|
||||
e.FetchBattleTurn = turn
|
||||
e.FetchBattleID = ID
|
||||
return e.FetchBattleResult, e.FetchBattleOK, e.FetchBattleErr
|
||||
}
|
||||
|
||||
func (e *dummyExecutor) Execute(command ...handler.Command) error {
|
||||
|
||||
Reference in New Issue
Block a user