Ejemplo n.º 1
0
        public void ShouldRegisterGameCompanyWhenCommandIsValid()
        {
            var command = new CreateGameCompanyCommand()
            {
                UserId = Guid.NewGuid(),
                Name   = "EA SPORT"
            };

            var result = _handler.Handle(command);

            Assert.NotEqual(null, result);
            Assert.True(_handler.Valid);
        }
Ejemplo n.º 2
0
        public async Task <ICommandResult> Post([FromBody] CreateGameCompanyCommand command)
        {
            var result = _handler.Handle(command);

            return(await Response(result));
        }