Beispiel #1
0
        public void IsValid_ShouldBeFalse_WhenRedeemPointCommandIsNotValid()
        {
            var command = new RedeemPointCommand
            {
                MemberAccountId = 0,
                Point           = -1
            };
            var validator = new RedeemPointCommandValidator();
            var result    = validator.Validate(command);

            result.IsValid.ShouldBe(false);
        }
Beispiel #2
0
        public async Task <IActionResult> RedeemPointToAccount([FromBody] RedeemPointCommand command)
        {
            var result = await Mediator.Send(command);

            return(Ok(result));
        }