Beispiel #1
0
 public static void IsNotNull(UnityEngine.Object value, string message)
 {
     if (value == null)
     {
         Assert.Fail(AssertionMessageUtil.NullFailureMessage(value, false), message);
     }
 }
Beispiel #2
0
 public static void IsNull(UnityEngine.Object value, string message)
 {
     if (value != null)
     {
         Fail(AssertionMessageUtil.NullFailureMessage(value, true), message);
     }
 }
Beispiel #3
0
 public static void AreEqual(UnityEngine.Object expected, UnityEngine.Object actual, string message)
 {
     if (actual != expected)
     {
         Fail(AssertionMessageUtil.GetEqualityMessage(actual, expected, true), message);
     }
 }
Beispiel #4
0
 public static void IsNotNull(Object value, string message)
 {
     if (value == null)
     {
         Fail(AssertionMessageUtil.NullFailureMessage(value, expectNull: false), message);
     }
 }
Beispiel #5
0
 public static void IsFalse(bool condition, string message)
 {
     if (condition)
     {
         Fail(AssertionMessageUtil.BooleanFailureMessage(false), message);
     }
 }
Beispiel #6
0
 public static void AreNotEqual(Object expected, Object actual, string message)
 {
     if (actual == expected)
     {
         Fail(AssertionMessageUtil.GetEqualityMessage(actual, expected, expectEqual: false), message);
     }
 }
Beispiel #7
0
 public static void IsNull <T>(T value, string message) where T : class
 {
     if (value != null)
     {
         Fail(AssertionMessageUtil.NullFailureMessage(value, true), message);
     }
 }
Beispiel #8
0
 public static void IsTrue(bool condition, string message)
 {
     if (!condition)
     {
         Fail(AssertionMessageUtil.BooleanFailureMessage(true), message);
     }
 }
 public static void IsNotNull <T>(T value, string message) where T : class
 {
     if (value == null)
     {
         Assert.Fail(AssertionMessageUtil.NullFailureMessage(value, false), message);
     }
 }
Beispiel #10
0
 public static void AreNotEqual(UnityEngine.Object expected, UnityEngine.Object actual, string message)
 {
     if (actual == expected)
     {
         Assert.Fail(AssertionMessageUtil.GetEqualityMessage(actual, expected, false), message);
     }
 }
Beispiel #11
0
 public static void AreNotEqual <T>(T expected, T actual, string message, IEqualityComparer <T> comparer)
 {
     if (comparer.Equals(actual, expected))
     {
         Fail(AssertionMessageUtil.GetEqualityMessage(actual, expected, false), message);
     }
 }
Beispiel #12
0
 public static void IsNotNull(UnityEngine.Object value, string message)
 {
     if (!(value == (UnityEngine.Object)null))
     {
         return;
     }
     Assert.Fail(AssertionMessageUtil.NullFailureMessage((object)value, false), message);
 }
Beispiel #13
0
 public static void AreNotEqual(UnityEngine.Object expected, UnityEngine.Object actual, string message)
 {
     if (!(actual == expected))
     {
         return;
     }
     Assert.Fail(AssertionMessageUtil.GetEqualityMessage((object)actual, (object)expected, false), message);
 }
        public static void IsNull(UnityEngine.Object value, string message)
        {
            bool flag = value != null;

            if (flag)
            {
                Assert.Fail(AssertionMessageUtil.NullFailureMessage(value, true), message);
            }
        }
        public static void IsTrue(bool condition, string message)
        {
            bool flag = !condition;

            if (flag)
            {
                Assert.Fail(AssertionMessageUtil.BooleanFailureMessage(true), message);
            }
        }
Beispiel #16
0
 public static string GetMessage(string failureMessage, string expected)
 {
     return(AssertionMessageUtil.GetMessage(UnityString.Format("{0}{1}{2} {3}", new object[]
     {
         failureMessage,
         Environment.NewLine,
         "Expected:",
         expected
     })));
 }
Beispiel #17
0
 public static string NullFailureMessage(object value, bool expectNull)
 {
     return(AssertionMessageUtil.GetMessage(UnityString.Format("Value was {0}Null", new object[]
     {
         (!expectNull) ? "" : "not "
     }), UnityString.Format("Value was {0}Null", new object[]
     {
         (!expectNull) ? "not " : ""
     })));
 }
Beispiel #18
0
 public static void AreEqual <T>(T expected, T actual, string message, IEqualityComparer <T> comparer)
 {
     if (typeof(Object).IsAssignableFrom(typeof(T)))
     {
         Assert.AreEqual(expected as Object, actual as Object, message);
     }
     else if (!comparer.Equals(actual, expected))
     {
         Assert.Fail(AssertionMessageUtil.GetEqualityMessage(actual, expected, true), message);
     }
 }
Beispiel #19
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);
     }
 }
Beispiel #20
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);
     }
 }
Beispiel #21
0
 public static void AreNotEqual <T>(T expected, T actual, string message, IEqualityComparer <T> comparer)
 {
     if (typeof(UnityEngine.Object).IsAssignableFrom(typeof(T)))
     {
         AreNotEqual(expected as UnityEngine.Object, actual as UnityEngine.Object, message);
     }
     else if (comparer.Equals(actual, expected))
     {
         Fail(AssertionMessageUtil.GetEqualityMessage(actual, expected, false), message);
     }
 }
Beispiel #22
0
 public static string GetEqualityMessage(object actual, object expected, bool expectEqual)
 {
     return(AssertionMessageUtil.GetMessage(UnityString.Format("Values are {0}equal.", new object[]
     {
         (!expectEqual) ? "" : "not "
     }), UnityString.Format("{0} {2} {1}", new object[]
     {
         actual,
         expected,
         (!expectEqual) ? "!=" : "=="
     })));
 }
Beispiel #23
0
 public static void AreEqual <T>(T expected, T actual, string message, IEqualityComparer <T> comparer)
 {
     if (typeof(UnityEngine.Object).IsAssignableFrom(typeof(T)))
     {
         Assert.AreEqual((object)expected as UnityEngine.Object, (object)actual as UnityEngine.Object, message);
     }
     else
     {
         if (comparer.Equals(actual, expected))
         {
             return;
         }
         Assert.Fail(AssertionMessageUtil.GetEqualityMessage((object)actual, (object)expected, true), message);
     }
 }
Beispiel #24
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);
     }
 }
        public static void AreEqual <T>(T expected, T actual, string message, IEqualityComparer <T> comparer)
        {
            bool flag = typeof(UnityEngine.Object).IsAssignableFrom(typeof(T));

            if (flag)
            {
                Assert.AreEqual(expected as UnityEngine.Object, actual as UnityEngine.Object, message);
            }
            else
            {
                bool flag2 = !comparer.Equals(actual, expected);
                if (flag2)
                {
                    Assert.Fail(AssertionMessageUtil.GetEqualityMessage(actual, expected, true), message);
                }
            }
        }
        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);
                }
            }
        }
 public static string GetEqualityMessage(object actual, object expected, bool expectEqual)
 {
     return(AssertionMessageUtil.GetMessage(UnityString.Format("Values are {0}equal.", (object)(!expectEqual ? string.Empty : "not ")), UnityString.Format("{0} {2} {1}", actual, expected, (object)(!expectEqual ? "!=" : "=="))));
 }
 public static string BooleanFailureMessage(bool expected)
 {
     return(AssertionMessageUtil.GetMessage("Value was " + (object)!expected, expected.ToString()));
 }
 public static string NullFailureMessage(object value, bool expectNull)
 {
     return(AssertionMessageUtil.GetMessage(UnityString.Format("Value was {0}Null", (object)(!expectNull ? string.Empty : "not ")), UnityString.Format("Value was {0}Null", (object)(!expectNull ? "not " : string.Empty))));
 }