Beispiel #1
0
 public void AddsTimeIfSkaterReallyNaughty()
 {
     _builder.AddPenalty(number: 8);
     _builder.AddPenalty(number: 8);
     _handler.Handle(_command);
     Assert.Contains(_state.PenaltyBox, x => x.SecondsOwed == 60 && x.Number == 8);
 }
        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 void PenaltyTimeIsCredited()
 {
     _builder.AddPenalty(number: 8);
     _handler.Handle(_command);
     Assert.Equal(0, _state.Penalties[0].SecondsOwed);
 }