示例#1
0
 /// <summary>
 /// Test that two objects are not equal and raise an exception if the result is false
 /// </summary>
 /// <param name="notexpected">expected object. Can be a string, number, array...</param>
 /// <param name="input">current object. Can be a string, number, array...</param>
 /// <param name="failmessage"></param>
 public static void NotEquals(Object notexpected, Object input, string failmessage = null)
 {
     if (ObjExt.AreEqual(notexpected, input))
     {
         throw new AssertFailure(failmessage, "expected!={0}\nwas={1}", notexpected, input);
     }
 }
示例#2
0
 /// <summary>
 /// Tests that two objects are not equal.
 /// </summary>
 /// <param name="expected">expected object. Can be a string, number, array...</param>
 /// <param name="input">current object. Can be a string, number, array...</param>
 /// <param name="failmessage">Message to return if the verification fails...</param>
 public static string NotEquals(object expected, object input, string failmessage = null)
 {
     return(!ObjExt.AreEqual(expected, input) ? MSG_OK
         : format(failmessage, "expected!={0} was={1}", expected, input));
 }