Example #1
0
 public static void IsNull(Object value, string message)
 {
     if (value != null)
     {
         Fail(AssertionMessageUtil.NullFailureMessage(value, true), message);
     }
 }
Example #2
0
 public static void IsNotNull(Object value, string message)
 {
     if (value == null)
     {
         Fail(AssertionMessageUtil.NullFailureMessage(null, false), message);
     }
 }
Example #3
0
 public static void IsNull <T>(T value, string message)
     where T : class
 {
     if (typeof(Object).IsAssignableFrom(typeof(T)))
     {
         IsNull((object)value as Object, message);
     }
     else if (value != null)
     {
         Fail(AssertionMessageUtil.NullFailureMessage(value, true), message);
     }
 }