Exemplo n.º 1
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
            });
        }
Exemplo n.º 2
0
        public async Task UpdateChair(string nodeId, Guid boutId, Chair chair)
        {
            var command = new UpdateChairCommand(boutId, Context.ConnectionId, chair);

            await Dispatch(nodeId, NodeRoles.PenaltyBoxTimer, command);
        }