public void IsValid_ShouldBeFalse_WhenCollectPointCommandIsNotValid() { var command = new CollectPointCommand { MemberAccountId = 0, Point = -1 }; var validator = new CollectPointCommandValidator(); var result = validator.Validate(command); result.IsValid.ShouldBe(false); }
public async Task <IActionResult> CollectPointToAccount([FromBody] CollectPointCommand command) { var result = await Mediator.Send(command); return(Ok(result)); }