NullFailureMessage() public static method

public static NullFailureMessage ( object value, bool expectNull ) : string
value object
expectNull bool
return string
Example #1
0
 public static void IsNotNull(UnityEngine.Object value, string message)
 {
     if (value == null)
     {
         Assert.Fail(AssertionMessageUtil.NullFailureMessage(value, false), message);
     }
 }
Example #2
0
 public static void IsNull <T>(T value, string message) where T : class
 {
     if (value != null)
     {
         Fail(AssertionMessageUtil.NullFailureMessage(value, true), message);
     }
 }
Example #3
0
 public static void IsNull(UnityEngine.Object value, string message)
 {
     if (value != null)
     {
         Fail(AssertionMessageUtil.NullFailureMessage(value, true), message);
     }
 }
Example #4
0
 public static void IsNotNull(Object value, string message)
 {
     if (value == null)
     {
         Fail(AssertionMessageUtil.NullFailureMessage(value, expectNull: false), message);
     }
 }
 public static void IsNotNull <T>(T value, string message) where T : class
 {
     if (value == null)
     {
         Assert.Fail(AssertionMessageUtil.NullFailureMessage(value, false), message);
     }
 }
Example #6
0
 public static void IsNotNull(UnityEngine.Object value, string message)
 {
     if (!(value == (UnityEngine.Object)null))
     {
         return;
     }
     Assert.Fail(AssertionMessageUtil.NullFailureMessage((object)value, false), message);
 }
Example #7
0
        public static void IsNull(UnityEngine.Object value, string message)
        {
            bool flag = value != null;

            if (flag)
            {
                Assert.Fail(AssertionMessageUtil.NullFailureMessage(value, true), message);
            }
        }
Example #8
0
 public static void IsNull <T>(T value, string message) where T : class
 {
     if (typeof(UnityEngine.Object).IsAssignableFrom(typeof(T)))
     {
         IsNull(value as UnityEngine.Object, message);
     }
     else if (value != null)
     {
         Fail(AssertionMessageUtil.NullFailureMessage(value, true), message);
     }
 }
Example #9
0
 public static void IsNotNull <T>(T value, string message) where T : class
 {
     if (typeof(Object).IsAssignableFrom(typeof(T)))
     {
         IsNotNull(value as Object, message);
     }
     else if (value == null)
     {
         Fail(AssertionMessageUtil.NullFailureMessage(value, expectNull: false), message);
     }
 }
Example #10
0
 public static void IsNotNull <T>(T value, string message) where T : class
 {
     if (typeof(UnityEngine.Object).IsAssignableFrom(typeof(T)))
     {
         Assert.IsNotNull((object)value as UnityEngine.Object, message);
     }
     else
     {
         if ((object)value != null)
         {
             return;
         }
         Assert.Fail(AssertionMessageUtil.NullFailureMessage((object)value, false), message);
     }
 }
Example #11
0
        public static void IsNotNull <T>(T value, string message) where T : class
        {
            bool flag = typeof(UnityEngine.Object).IsAssignableFrom(typeof(T));

            if (flag)
            {
                Assert.IsNotNull(value as UnityEngine.Object, message);
            }
            else
            {
                bool flag2 = value == null;
                if (flag2)
                {
                    Assert.Fail(AssertionMessageUtil.NullFailureMessage(value, false), message);
                }
            }
        }