void AssumeException(object o1, SoqlRelationalOperator op, object o2) { try { // Console.WriteLine("Checking that {0} ({1}) {2} {3} ({4}) will throw... ", o1, o1.GetType(), op, o2, o2.GetType()); SoqlBooleanRelationalExpression.Compare(o1, o2, op); // Assert.IsTrue("Failed. Exception was expected!", false); } catch (Exception) { Assert.IsTrue(true); } }
void Assume(object o1, SoqlRelationalOperator op, object o2, bool value) { // Console.WriteLine("Checking that {0} ({1}) {2} {3} ({4}) = {5}...", o1, o1.GetType(), op, o2, o2.GetType(), value); Assert.AreEqual(value, (bool)SoqlBooleanRelationalExpression.Compare(o1, o2, op)); }