Пример #1
0
 public static void AreEqual(RCValue expected, RCValue actual)
 {
     if (expected == null)
     {
         throw new Exception("Expected string was null.");
     }
     else if (actual == null)
     {
         throw new Exception("Actual string was null.");
     }
     else if (!expected.Equals(actual))
     {
         StringBuilder builder = new StringBuilder();
         builder.AppendLine("Values are not equal.");
         builder.AppendFormat("Expected: {0}\n", expected);
         builder.AppendFormat("Actual:   {0}", actual);
         throw new Exception(builder.ToString());
     }
 }