Пример #1
0
 public static void IsTrue(bool val, string msg, params object[] args)
 {
     if (!val)
     {
         throw new AssertException(msg.TryFormat(args) + Assertion.CallPosition());
     }
 }
Пример #2
0
 public static void IsNull(object val, string msg, params object[] args)
 {
     if (val != null)
     {
         throw new AssertException(msg.TryFormat(args) + Assertion.CallPosition());
     }
 }
Пример #3
0
 public static void AreEqual(object expected, object result, string msg, params object[] args)
 {
     if (!expected.Equals(result))
     {
         throw new AssertException(msg.TryFormat(args) + Assertion.CallPosition());
     }
 }
Пример #4
0
 public static void Fail(string msg, params object[] args)
 {
     throw new AssertException(msg.TryFormat(args) + Assertion.CallPosition());
 }