示例#1
0
 public static void Range_DoesNotThrow_ForTrue_1() => Enforce.Range(true, "paramName");
示例#2
0
 public static void Range_DoesNotThrow_ForTrue_2() => Enforce.Range(true, "paramName", "My message");
示例#3
0
 public static void NotWhiteSpace_DoesNotThrow_ForNonWhiteSpaceString()
 => Enforce.NotWhiteSpace("Whatever", "paramName");
示例#4
0
 public static void State_ThrowsInvalidOperationException_ForFalse_1()
 => Assert.Throws <InvalidOperationException>(() => Enforce.State(false));
示例#5
0
 public static void NotWhiteSpace_DoesNotThrow_ForNull()
 => Enforce.NotWhiteSpace(null, "paramName");
示例#6
0
 public static void NotWhiteSpace_DoesNotThrow_ForEmptyString()
 => Enforce.NotWhiteSpace(String.Empty, "paramName");
示例#7
0
 public static void State_DoesNotThrow_ForTrue_2() => Enforce.State(true, "My message");
示例#8
0
 public static void NotWhiteSpace_ThrowsArgumentException_ForWhiteSpaceOnlyString()
 => Assert.Throws <ArgumentException>(() => Enforce.NotWhiteSpace(My.WhiteSpaceOnlyString, "paramName"));
示例#9
0
 public static void Range_ThrowsArgumentOutOfRangeException_ForOutOfRangeValue_DegenerateRange_2()
 => Assert.Throws <ArgumentOutOfRangeException>(
     () => Enforce.Range(s_ValueAbove, s_MinValue, s_MinValue, "paramName"));
示例#10
0
 public static void Range_DoesNotThrow_ForInRangeValue_DegenerateRange()
 => Enforce.Range(s_MinValue, s_MinValue, s_MinValue, "paramName");
示例#11
0
 public static void Range_ThrowsArgumentOutOfRangeException_InvalidRange(My.ComparableStruct value)
 => Assert.Throws <ArgumentOutOfRangeException>(
     () => Enforce.Range(value, s_MaxValue, s_MinValue, "paramName"));
示例#12
0
 public static void State_DoesNotThrow_ForTrue_1() => Enforce.State(true);
示例#13
0
 public static void Range_DoesNotThrow_ForInRangeValue(My.ComparableStruct value)
 => Enforce.Range(value, s_MinValue, s_MaxValue, "paramName");