コード例 #1
0
 public void GetResultAsyncShouldReturnPassIfValueIsNull(DecimalInRange sut, [RuleContext] RuleContext context)
 {
     Assert.That(() => sut.GetResultAsync(null, context), Is.PassingValidationResult);
 }
コード例 #2
0
 public void GetResultAsyncShouldReturnPassIfNumberIsHigherThanMax(DecimalInRange sut, [RuleContext] RuleContext context)
 {
     sut.Min = 5;
     sut.Max = 10;
     Assert.That(() => sut.GetResultAsync(20, context), Is.FailingValidationResult);
 }