コード例 #1
0
 public void GetValidatedTypeShouldReturnTheCorrectGenericTypeForABuilderType(BuilderValidatedTypeProvider sut)
 {
     Assert.That(() => sut.GetValidatedType(typeof(ValidatedObjectValidator)), Is.EqualTo(typeof(ValidatedObject)));
 }
コード例 #2
0
 public void GetValidatedTypeShouldThrowIfBuilderTypeDoesNotImplementBuilderInterface(BuilderValidatedTypeProvider sut)
 {
     Assert.That(() => sut.GetValidatedType(typeof(object)), Throws.ArgumentException);
 }
コード例 #3
0
 public void GetValidatedTypeShouldThrowIfBuilderTypeBuildsAmbiguousValidator(BuilderValidatedTypeProvider sut)
 {
     Assert.That(() => sut.GetValidatedType(typeof(MultiTypeValidator)), Throws.ArgumentException);
 }
コード例 #4
0
 public void GetValidatedTypeShouldThrowIfBuilderTypeIsNull(BuilderValidatedTypeProvider sut)
 {
     Assert.That(() => sut.GetValidatedType(null), Throws.ArgumentNullException);
 }