コード例 #1
0
        public async Task MakeBet_When_Bet_Invalid()
        {
            var exception = await Assert.ThrowsAsync <BadRequestException>(() => _service.MakeBet(new MakeBet
            {
                Bet        = "abc",
                RowVersion = 1
            }, ""));

            Assert.Equal(Constants.InvalidBetExceptionTest, exception.Message);
        }
コード例 #2
0
 public async Task <ActionResult <MakeBetResponseDto> > MakeBet([FromBody] MakeBet cmd)
 => Ok(await _service.MakeBet(cmd, Request.HttpContext.Connection.RemoteIpAddress.ToString()));