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);
        }
Esempio n. 4
0
        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);
        }
Esempio n. 6
0
        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);
        }
Esempio n. 8
0
        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);
        }
Esempio n. 9
0
        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
            });
        }
Esempio n. 10
0
 public InitializeBoutEvent(BoutData boutData, BoutState boutState) : base(boutState.BoutId)
 {
     BoutData = boutData;
     BoutState = boutState;
 }
Esempio n. 11
0
 public BoutStateUpdatedEvent(BoutState boutState) : base(boutState.BoutId)
 {
     BoutState = boutState;
 }
Esempio n. 12
0
 public BoutStateBuilder(BoutState state)
 {
     _state = state;
 }
Esempio n. 13
0
 public UpdateBoutStateResponse(BoutState state)
 {
     AddEvent(new BoutStateUpdatedEvent(state), Audiences.Bout(state.BoutId));
 }