void ICustomMessageAndExceptionTestDataProvider.PopulateTestDataForCustomExceptionAndCustomMessageTests(CustomMessageAndExceptionTestData testData) { testData.AddExceptionTest(exception => typeof(IContainer).MustNotBeInterface(exception: exception)) .AddMessageTest <TypeException>(message => typeof(IChangeTracking).MustNotBeInterface(message: message)); testData.AddExceptionTest(exception => typeof(IEqualityComparer <>).GetTypeInfo().MustNotBeInterface(exception: exception)) .AddMessageTest <TypeException>(message => typeof(ICommand).GetTypeInfo().MustNotBeInterface(message: message)); }
void ICustomMessageAndExceptionTestDataProvider.PopulateTestDataForCustomExceptionAndCustomMessageTests(CustomMessageAndExceptionTestData testData) { testData.AddExceptionTest(exception => typeof(string).MustBeEnum(exception: exception)) .AddMessageTest <TypeException>(message => typeof(IComparable).MustBeEnum(message: message)); testData.AddExceptionTest(exception => typeof(object).GetTypeInfo().MustBeEnum(exception: exception)) .AddMessageTest <TypeException>(message => typeof(IList).GetTypeInfo().MustBeEnum(message: message)); }
void ICustomMessageAndExceptionTestDataProvider.PopulateTestDataForCustomExceptionAndCustomMessageTests(CustomMessageAndExceptionTestData testData) { testData.AddExceptionTest(exception => typeof(Action).MustNotBeDelegate(exception: exception)) .AddMessageTest <TypeException>(message => typeof(Func <>).MustNotBeDelegate(message: message)); testData.AddExceptionTest(exception => typeof(PropertyChangedEventHandler).GetTypeInfo().MustNotBeDelegate(exception: exception)) .AddMessageTest <TypeException>(message => typeof(AsyncCallback).GetTypeInfo().MustNotBeDelegate(message: message)); }
void ICustomMessageAndExceptionTestDataProvider.PopulateTestDataForCustomExceptionAndCustomMessageTests(CustomMessageAndExceptionTestData testData) { testData.AddExceptionTest(exception => typeof(IFormattable).MustBeStaticClass(exception: exception)) .AddMessageTest <TypeException>(message => typeof(Action).MustBeStaticClass(message: message)); testData.AddExceptionTest(exception => typeof(decimal).GetTypeInfo().MustBeStaticClass(exception: exception)) .AddMessageTest <TypeException>(message => typeof(FieldInfo).GetTypeInfo().MustBeStaticClass(message: message)); }
void ICustomMessageAndExceptionTestDataProvider.PopulateTestDataForCustomExceptionAndCustomMessageTests(CustomMessageAndExceptionTestData testData) { testData.AddExceptionTest(exception => typeof(GC).MustNotBeStaticClass(exception: exception)) .AddMessageTest <TypeException>(message => typeof(Console).MustNotBeStaticClass(message: message)); testData.AddExceptionTest(exception => typeof(Nullable).GetTypeInfo().MustNotBeStaticClass(exception: exception)) .AddMessageTest <TypeException>(message => typeof(Convert).GetTypeInfo().MustNotBeStaticClass(message: message)); }
void ICustomMessageAndExceptionTestDataProvider.PopulateTestDataForCustomExceptionAndCustomMessageTests(CustomMessageAndExceptionTestData testData) { testData.AddExceptionTest(exception => typeof(IComparable).MustBeClass(exception)) .AddMessageTest <TypeException>(message => typeof(Func <object>).MustBeClass(message: message)); testData.AddExceptionTest(exception => typeof(double).GetTypeInfo().MustBeClass(exception)) .AddMessageTest <TypeException>(message => typeof(Action).GetTypeInfo().MustBeClass(message: message)); }
void ICustomMessageAndExceptionTestDataProvider.PopulateTestDataForCustomExceptionAndCustomMessageTests(CustomMessageAndExceptionTestData testData) { testData.AddExceptionTest(exception => typeof(IList).MustBeDelegate(exception: exception)) .AddMessageTest <TypeException>(message => typeof(BindingFlags).MustBeDelegate(message: message)); testData.AddExceptionTest(exception => typeof(string).GetTypeInfo().MustBeDelegate(exception: exception)) .AddMessageTest <TypeException>(message => typeof(IDisposable).GetTypeInfo().MustBeDelegate(message: message)); }
void ICustomMessageAndExceptionTestDataProvider.PopulateTestDataForCustomExceptionAndCustomMessageTests(CustomMessageAndExceptionTestData testData) { testData.AddExceptionTest(exception => typeof(string).MustNotBeClass(exception: exception)) .AddMessageTest <TypeException>(message => typeof(object).MustNotBeClass(message: message)); testData.AddExceptionTest(exception => typeof(Math).GetTypeInfo().MustNotBeClass(exception: exception)) .AddMessageTest <TypeException>(message => typeof(Exception).GetTypeInfo().MustNotBeClass(message: message)); }
void ICustomMessageAndExceptionTestDataProvider.PopulateTestDataForCustomExceptionAndCustomMessageTests(CustomMessageAndExceptionTestData testData) { testData.AddExceptionTest(exception => typeof(object).MustBeValueType(exception: exception)) .AddMessageTest <TypeException>(message => typeof(Action).MustBeValueType(message: message)); testData.AddExceptionTest(exception => typeof(string).GetTypeInfo().MustBeValueType(exception: exception)) .AddMessageTest <TypeException>(message => typeof(IDisposable).GetTypeInfo().MustBeValueType(message: message)); }
void ICustomMessageAndExceptionTestDataProvider.PopulateTestDataForCustomExceptionAndCustomMessageTests(CustomMessageAndExceptionTestData testData) { testData.AddExceptionTest(exception => 0.MustNotBeDefault(exception)) .AddMessageTest <ArgumentDefaultException>(message => default(char).MustNotBeDefault(message: message)); testData.AddExceptionTest(exception => default(object).MustNotBeDefault(exception)) .AddMessageTest <ArgumentNullException>(message => default(string).MustNotBeDefault(message: message)); }
void ICustomMessageAndExceptionTestDataProvider.PopulateTestDataForCustomExceptionAndCustomMessageTests(CustomMessageAndExceptionTestData testData) { testData.AddExceptionTest(exception => typeof(ConsoleColor).MustBeInterface(exception: exception)) .AddMessageTest <TypeException>(message => typeof(Action).MustBeInterface(message: message)); testData.AddExceptionTest(exception => typeof(string).GetTypeInfo().MustBeInterface(exception: exception)) .AddMessageTest <TypeException>(message => typeof(int).GetTypeInfo().MustBeInterface(message: message)); }
void ICustomMessageAndExceptionTestDataProvider.PopulateTestDataForCustomExceptionAndCustomMessageTests(CustomMessageAndExceptionTestData testData) { testData.AddExceptionTest(exception => typeof(ConsoleColor).MustNotBeEnum(exception: exception)) .AddMessageTest <TypeException>(message => typeof(ConsoleColor).MustNotBeEnum(message: message)); testData.AddExceptionTest(exception => typeof(GCCollectionMode).GetTypeInfo().MustNotBeEnum(exception: exception)) .AddMessageTest <TypeException>(message => typeof(AttributeTargets).GetTypeInfo().MustNotBeEnum(message: message)); }
void ICustomMessageAndExceptionTestDataProvider.PopulateTestDataForCustomExceptionAndCustomMessageTests(CustomMessageAndExceptionTestData testData) { testData.AddExceptionTest(exception => typeof(IDisposable).MustBeStruct(exception: exception)) .AddMessageTest <TypeException>(message => typeof(ConsoleKey).MustBeStruct(message: message)); testData.AddExceptionTest(exception => typeof(Action).GetTypeInfo().MustBeStruct(exception: exception)) .AddMessageTest <TypeException>(message => typeof(BindingFlags).GetTypeInfo().MustBeStruct(message: message)); }
void ICustomMessageAndExceptionTestDataProvider.PopulateTestDataForCustomExceptionAndCustomMessageTests(CustomMessageAndExceptionTestData testData) { testData.AddExceptionTest(exception => typeof(int).MustBeReferenceType(exception: exception)) .AddMessageTest <TypeException>(message => typeof(float).MustBeReferenceType(message: message)); testData.AddExceptionTest(exception => typeof(decimal).GetTypeInfo().MustBeReferenceType(exception: exception)) .AddMessageTest <TypeException>(message => typeof(BindingFlags).GetTypeInfo().MustBeReferenceType(message: message)); }
void ICustomMessageAndExceptionTestDataProvider.PopulateTestDataForCustomExceptionAndCustomMessageTests(CustomMessageAndExceptionTestData testData) { testData.AddExceptionTest(exception => typeof(int).MustNotBeStruct(exception: exception)) .AddMessageTest <TypeException>(message => typeof(ConsoleKeyInfo).MustNotBeStruct(message: message)); testData.AddExceptionTest(exception => typeof(double).GetTypeInfo().MustNotBeStruct(exception: exception)) .AddMessageTest <TypeException>(message => typeof(long).GetTypeInfo().MustNotBeStruct(message: message)); }
void ICustomMessageAndExceptionTestDataProvider.PopulateTestDataForCustomExceptionAndCustomMessageTests(CustomMessageAndExceptionTestData testData) { testData.AddExceptionTest(exception => string.Empty.MustNotBeNullOrWhiteSpace(exception: exception)) .AddExceptionTest(exception => " ".MustNotBeNullOrWhiteSpace(exception: exception)) .AddExceptionTest(exception => "\t\r\n".MustNotBeNullOrWhiteSpace(exception: exception)); testData.AddMessageTest <EmptyStringException>(message => string.Empty.MustNotBeNullOrWhiteSpace(message: message)) .AddMessageTest <StringIsOnlyWhiteSpaceException>(message => " ".MustNotBeNullOrWhiteSpace(message: message)) .AddMessageTest <StringIsOnlyWhiteSpaceException>(message => "\t\r\n".MustNotBeNullOrWhiteSpace(message: message)); }
void ICustomMessageAndExceptionTestDataProvider.PopulateTestDataForCustomExceptionAndCustomMessageTests(CustomMessageAndExceptionTestData testData) { testData.AddExceptionTest(exception => true.MustNotBeTrue(exception)) .AddMessageTest <ArgumentException>(message => true.MustNotBeTrue(message: message)); }
void ICustomMessageAndExceptionTestDataProvider.PopulateTestDataForCustomExceptionAndCustomMessageTests(CustomMessageAndExceptionTestData testData) { testData.AddExceptionTest(exception => "Foo".MustNotBeEquivalentTo("foo", exception: exception)) .AddMessageTest <StringException>(message => "Foo".MustNotBeEquivalentTo("Foo", message: message)); }
void ICustomMessageAndExceptionTestDataProvider.PopulateTestDataForCustomExceptionAndCustomMessageTests(CustomMessageAndExceptionTestData testData) { testData.AddExceptionTest(exception => typeof(string).MustNotImplement(typeof(IEnumerable <>), exception: exception)) .AddMessageTest <TypeException>(message => typeof(string).MustNotImplement(typeof(IEnumerable <char>), message: message)); }
void ICustomMessageAndExceptionTestDataProvider.PopulateTestDataForCustomExceptionAndCustomMessageTests(CustomMessageAndExceptionTestData testData) { testData.AddExceptionTest(exception => typeof(int).MustNotDeriveFrom(typeof(ValueType), exception: exception)) .AddMessageTest <TypeException>(message => typeof(ArgumentException).MustNotDeriveFrom(typeof(Exception), message: message)); }
void ICustomMessageAndExceptionTestDataProvider.PopulateTestDataForCustomExceptionAndCustomMessageTests(CustomMessageAndExceptionTestData testData) { testData.AddExceptionTest(exception => typeof(Action).MustImplement(typeof(IProgress <>), exception: exception)) .AddMessageTest <TypeException>(message => typeof(Exception).MustImplement(typeof(IComparable), message: message)); }
void ICustomMessageAndExceptionTestDataProvider.PopulateTestDataForCustomExceptionAndCustomMessageTests(CustomMessageAndExceptionTestData testData) { testData.AddExceptionTest(exception => "Foo".MustHaveMinimumLength(4, exception: exception)) .AddMessageTest <StringException>(message => "Bar".MustHaveMinimumLength(42, message: message)); }
void ICustomMessageAndExceptionTestDataProvider.PopulateTestDataForCustomExceptionAndCustomMessageTests(CustomMessageAndExceptionTestData testData) { testData.AddExceptionTest(exception => string.Empty.MustNotBeNullOrEmpty(exception: exception)) .AddMessageTest <EmptyStringException>(message => string.Empty.MustNotBeNullOrEmpty(message: message)); }
void ICustomMessageAndExceptionTestDataProvider.PopulateTestDataForCustomExceptionAndCustomMessageTests(CustomMessageAndExceptionTestData testData) { testData.AddExceptionTest(exception => "abcde".MustContainOnlyDigits(exception: exception)) .AddMessageTest <StringException>(message => "Foo".MustContainOnlyDigits(message: message)); }
void ICustomMessageAndExceptionTestDataProvider.PopulateTestDataForCustomExceptionAndCustomMessageTests(CustomMessageAndExceptionTestData testData) { testData.AddExceptionTest(exception => "Foo".MustMotHaveLengthIn(Range <int> .FromInclusive(2).ToInclusive(3), exception: exception)) .AddMessageTest <StringException>(message => "Bar".MustMotHaveLengthIn(Range <int> .FromInclusive(2).ToInclusive(3), message: message)); }
void ICustomMessageAndExceptionTestDataProvider.PopulateTestDataForCustomExceptionAndCustomMessageTests(CustomMessageAndExceptionTestData testData) { testData.AddExceptionTest(exception => typeof(double).MustBeAbstraction(exception: exception)) .AddMessageTest <TypeException>(message => typeof(Version).MustBeAbstraction(message: message)); }
void ICustomMessageAndExceptionTestDataProvider.PopulateTestDataForCustomExceptionAndCustomMessageTests(CustomMessageAndExceptionTestData testData) { testData.AddExceptionTest(exception => typeof(string).MustDeriveFromOrImplement(typeof(double), exception: exception)) .AddMessageTest <TypeException>(message => typeof(decimal).MustDeriveFromOrImplement(typeof(ICollection <>), message: message)); }
void ICustomMessageAndExceptionTestDataProvider.PopulateTestDataForCustomExceptionAndCustomMessageTests(CustomMessageAndExceptionTestData testData) { testData.AddExceptionTest(exception => ((double?)null).MustHaveValue(exception)) .AddMessageTest <NullableHasNoValueException>(message => ((int?)null).MustHaveValue(message: message)); }