예제 #1
0
 public void IsValidModel_When_Argument_Is_Not_Valid_Should_Throw_ValidationException()
 {
     Assert.Throws <ValidationException>(() => Invariant.IsValidModel(new TestModel()));
 }
예제 #2
0
 public void IsValidModel_When_Model_Is_Valid_Should_Not_Throw()
 {
     Assert.DoesNotThrow(() => Invariant.IsValidModel(new TestModel {
         RequiredProperty = 1
     }));
 }
예제 #3
0
 public void IsValidModel_When_Argument_Is_Null_Should_Throw_ArgumentNullException()
 {
     Assert.Throws <ArgumentNullException>(() => Invariant.IsValidModel <object>(null));
 }