public StopJamCommandHandlerTests() { var bout = _boutData.Load(Guid.Empty); _boutRunner.StartBout(bout); _state = _boutRunner.GetBoutState(Guid.Empty); _state.Phase = BoutPhase.Jam; _handler = new StopJamCommandHandler(_boutRunner, _boutData); }
public ButtHitSeatCommandHandlerTests() { _handler = new ButtHitSeatCommandHandler(_boutRunner); var bout = _boutData.Load(Guid.Empty); _boutRunner.StartBout(bout); _state = _boutRunner.GetBoutState(Guid.Empty); _builder = new BoutStateBuilder(_state); _builder.SetPhase(BoutPhase.Jam); }
public UpdateJammerStatusCommandHandlerTests() { var bout = _boutData.Load(Guid.Empty); _boutRunner.StartBout(bout); _state = _boutRunner.GetBoutState(Guid.Empty); _state.Phase = BoutPhase.Jam; _handler = new UpdateJammerStatusCommandHandler(_boutRunner); }
public CreatePenaltyCommandHandlerTests() { var bout = _boutData.Load(Guid.Empty); _boutRunner.StartBout(bout); _state = _boutRunner.GetBoutState(Guid.Empty); _state.Phase = BoutPhase.Lineup; _handler = new CreatePenaltyCommandHandler(_boutRunner, _boutData); }
public ReleaseSkaterCommandHandlerTests() { _handler = new ReleaseSkaterCommandHandler(_boutRunner); var bout = _boutData.Load(Guid.Empty); _boutRunner.StartBout(bout); _state = _boutRunner.GetBoutState(Guid.Empty); _builder = new BoutStateBuilder(_state); _toUpdate = _builder.AddSkaterToBox(team: "left", number: 8); _command = new ReleaseSkaterCommand(Guid.Empty, "o", _toUpdate.Id); }
public CancelSitCommandHandlerTests() { _command = new CancelSitCommand(Guid.Empty, "o", _toUpdate.Id); _handler = new CancelSitCommandHandler(_boutRunner); var bout = _boutData.Load(Guid.Empty); _boutRunner.StartBout(bout); _state = _boutRunner.GetBoutState(Guid.Empty); _state.PenaltyBox.Add(_toUpdate); _state.Phase = BoutPhase.Jam; }
public UpdatePenaltyCommandHandlerTests() { var bout = _boutData.Load(Guid.Empty); _boutRunner.StartBout(bout); _state = _boutRunner.GetBoutState(Guid.Empty); _builder = new BoutStateBuilder(_state); _penalty1 = _builder.AddPenalty(); _handler = new UpdatePenaltyCommandHandler(_boutRunner); _penalty2.Id = _penalty1.Id; _penalty2.Number = 8; _command = new UpdatePenaltyCommand(Guid.Empty, "originator", _penalty2); }
public UpdatePassCommandHandlerTests() { var bout = _boutData.Load(Guid.Empty); _boutRunner.StartBout(bout); _state = _boutRunner.GetBoutState(Guid.Empty); _state.Phase = BoutPhase.Jam; var team = _state.Jams[0].Team("left"); team.Passes.Add(new Pass { Number = 1 }); _handler = new UpdatePassCommandHandler(_boutRunner); }
public UpdateChairCommandHandlerTests() { _handler = new UpdateChairCommandHandler(_boutRunner, _boutData); var bout = _boutData.Load(Guid.Empty); _boutRunner.StartBout(bout); _state = _boutRunner.GetBoutState(Guid.Empty); _builder = new BoutStateBuilder(_state); var inBox = _builder.AddSkaterToBox(number: -1); _command = new UpdateChairCommand(Guid.Empty, "originator", new Chair { Id = inBox.Id, Team = "left", IsJammer = false, Number = 8 }); }
public InitializeBoutEvent(BoutData boutData, BoutState boutState) : base(boutState.BoutId) { BoutData = boutData; BoutState = boutState; }
public BoutStateUpdatedEvent(BoutState boutState) : base(boutState.BoutId) { BoutState = boutState; }
public BoutStateBuilder(BoutState state) { _state = state; }
public UpdateBoutStateResponse(BoutState state) { AddEvent(new BoutStateUpdatedEvent(state), Audiences.Bout(state.BoutId)); }