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); }
public async Task <IActionResult> RedeemPointToAccount([FromBody] RedeemPointCommand command) { var result = await Mediator.Send(command); return(Ok(result)); }