public void ThrowsArgumentExceptionForWrongEnumValue() { ExceptionTester.CallMethodAndExpectException <ArgumentException>(() => Enum <Enum2> .ConvertFromOtherEnumValue(Enum1.MySecondValue)); }
public void ThrowsArgumentNullExceptionifValidatorIsNull() { ExceptionTester.CallMethodAndExpectException <ArgumentException>(() => Argument.IsValid("myParam", "value", (IValueValidator <string>)null)); }
public void ThrowsArgumentExceptionForEmptyStringParamValue() { ExceptionTester.CallMethodAndExpectException <ArgumentException>(() => Argument.IsNotNullOrEmpty("param", string.Empty)); }
public void ThrowsArgumentExceptionForValueThatMatchWithThePattern() { ExceptionTester.CallMethodAndExpectException <ArgumentException>(() => Argument.IsMatch("myParam", "\n", ".+")); }
public void ThrowsArgumentExceptionForNotValidFunc() { ExceptionTester.CallMethodAndExpectException <ArgumentException>(() => Argument.IsValid("myParam", "value", () => false)); ExceptionTester.CallMethodAndExpectException <ArgumentException>(() => Argument.IsValid("myParam", "value", s => s.Length > 10)); }
public void ThrowsNotSupportedExceptionForNotSupported() { ExceptionTester.CallMethodAndExpectException <NotSupportedException>(() => Argument.IsSupported(false, "Just not supported")); }
public void ThrowsArgumentExceptionForNullValue() { ExceptionTester.CallMethodAndExpectException <ArgumentException>(() => Argument.IsMatch("myParam", null, ".+")); }
public void ThrowsArgumentExceptionForNullInstance() { ExceptionTester.CallMethodAndExpectException <ArgumentNullException>(() => Argument.ImplementsInterface(null, null as object, typeof(IList))); }
public void ThrowsArgumentNullExceptionForNullInterfaceType() { ExceptionTester.CallMethodAndExpectException <ArgumentNullException>(() => Argument.ImplementsInterface("myParam", typeof(List <int>), null)); }
public void ThrowsArgumentOutOfRangeExceptionForTooSmallDoubleParamValue() { ExceptionTester.CallMethodAndExpectException <ArgumentOutOfRangeException>(() => Argument.IsMinimal("param", 2d, 3d)); }
public void ThrowsArgumentOutOfRangeExceptionForTooLargeDoubleParamValue() { ExceptionTester.CallMethodAndExpectException <ArgumentOutOfRangeException>(() => Argument.IsMaximum("param", 3d, 2d)); }
public void ThrowsArgumentOutOfRangeExceptionForTooLargeIntegerParamValue() { ExceptionTester.CallMethodAndExpectException <ArgumentOutOfRangeException>(() => Argument.IsNotOutOfRange("param", 3, 1, 2)); }
public void ThrowsArgumentExceptionForEmptyByteArrayParamValue() { ExceptionTester.CallMethodAndExpectException <ArgumentException>(() => Argument.IsNotNullOrEmptyArray("param", new byte[] { })); }
public void ThrowsArgumentExceptionForStringWithOnlySpacesParamValue() { ExceptionTester.CallMethodAndExpectException <ArgumentException>(() => Argument.IsNotNullOrWhitespace("param", " ")); }
public void ThrowsArgumentExceptionForTypeImplementingNotRequiredType() { ExceptionTester.CallMethodAndExpectException <ArgumentException>(() => Argument.IsNotOfType("myParam", typeof(PersonViewModel), typeof(ViewModelBase))); }
public void ThrowsArgumentNullExceptionForNullParamValue() { ExceptionTester.CallMethodAndExpectException <ArgumentNullException>(() => Argument.IsNotNull("param", null)); }
public void ThrowsArgumentExceptionForNullMessage() { ExceptionTester.CallMethodAndExpectException <ArgumentException>(() => Argument.IsSupported(true, null)); ExceptionTester.CallMethodAndExpectException <ArgumentException>(() => Argument.IsSupported(true, string.Empty)); }
public void ThrowsArgumentExceptionForTypeNotImplementingInterface() { ExceptionTester.CallMethodAndExpectException <ArgumentException>(() => Argument.ImplementsInterface("myParam", typeof(List <int>), typeof(INotifyPropertyChanged))); }
public void ThrowsArgumentExceptionForValueThatMatchWithThePattern() { ExceptionTester.CallMethodAndExpectException <ArgumentException>(() => Argument.IsNotMatch("myParam", "Match any single character that is not a line break character, between one and unlimited times", ".+")); }
public void ThrowsArgumentNullExceptionForNullInstance() { ExceptionTester.CallMethodAndExpectException <ArgumentNullException>(() => Argument.InheritsFrom("myParam", null as object, typeof(Exception))); }
public void ThrowsArgumentExceptionForNullPattern() { ExceptionTester.CallMethodAndExpectException <ArgumentException>(() => Argument.IsMatch("myParam", string.Empty, null)); }
public void ThrowsArgumentNullExceptionForNullBaseType() { ExceptionTester.CallMethodAndExpectException <ArgumentNullException>(() => Argument.InheritsFrom("myParam", typeof(Exception), null)); }
public void ThrowsArgumentExceptionForNotValid() { ExceptionTester.CallMethodAndExpectException <ArgumentException>(() => Argument.IsValid("myParam", "value", false)); }
public void ThrowsArgumentExceptionForNullInstance() { ExceptionTester.CallMethodAndExpectException <ArgumentException>(() => Argument.IsNotOfType(null, null as object, typeof(ViewModelLocator))); }
public void ThrowsArgumentNullExceptionIfFuncIsNull() { ExceptionTester.CallMethodAndExpectException <ArgumentException>(() => Argument.IsValid("myParam", "value", (Func <string, bool>)null)); }
public void ThrowsArgumentNullExceptionForNullType() { ExceptionTester.CallMethodAndExpectException <ArgumentNullException>(() => Argument.IsNotOfType("myParam", null, typeof(ViewModelLocator))); }
public void ThrowsArgumentExceptionForNullGuidParamValue() { ExceptionTester.CallMethodAndExpectException <ArgumentException>(() => Argument.IsNotNullOrEmpty("param", (Guid?)null)); }
public void ThrowsArgumentNullExceptionForNullNotRequiredType() { ExceptionTester.CallMethodAndExpectException <ArgumentNullException>(() => Argument.IsNotOfType("myParam", typeof(ViewLocator), null)); }
public void ThrowsArgumentExceptionForEmptyGuidParamValue() { ExceptionTester.CallMethodAndExpectException <ArgumentException>(() => Argument.IsNotEmpty("param", Guid.Empty)); }
public void ThrowsArgumentExceptionForNonEnumValue() { ExceptionTester.CallMethodAndExpectException <ArgumentException>(() => Enum <Enum2> .ConvertFromOtherEnumValue(new object())); }