Exemplo n.º 1
0
 public void GetResultAsyncShouldReturnPassForANonEmptyQueryable(NotNullOrEmpty <int> sut, [RuleContext] RuleContext context)
 {
     Assert.That(() => sut.GetResultAsync(new [] { 1, 2 }.AsQueryable(), context), Is.PassingValidationResult);
 }
Exemplo n.º 2
0
 public void GetResultAsyncShouldReturnPassForANonEmptyReadOnlyCollection(NotNullOrEmpty <int> sut, [RuleContext] RuleContext context)
 {
     Assert.That(() => sut.GetResultAsync((IReadOnlyCollection <int>) new List <int> {
         1, 2
     }, context), Is.PassingValidationResult);
 }
Exemplo n.º 3
0
 public void GetResultAsyncShouldReturnPassForANonEmptyArray(NotNullOrEmpty sut, [RuleContext] RuleContext context)
 {
     Assert.That(() => sut.GetResultAsync(new [] { 1, 2 }, context), Is.PassingValidationResult);
 }
Exemplo n.º 4
0
 public void GetResultAsyncShouldReturnPassForANonEmptyString(NotNullOrEmpty sut, [RuleContext] RuleContext context)
 {
     Assert.That(() => sut.GetResultAsync("Foo bar", context), Is.PassingValidationResult);
 }
Exemplo n.º 5
0
 public void GetResultAsyncShouldReturnPassForANonEmptyEnumerable(NotNullOrEmpty sut, [RuleContext] RuleContext context)
 {
     Assert.That(() => sut.GetResultAsync((IEnumerable <int>) new List <int> {
         1, 2
     }, context), Is.PassingValidationResult);
 }