public void TestCaseEvaluation() { var @operator = new LogicalNotOperator(TypeConverter); AssertEvaluation <bool>(@operator, true, false); AssertEvaluation <bool>(@operator, false, true); }
public void TestCaseConstruction3() { var @operator = new LogicalNotOperator("operator", TypeConverter); Assert.AreEqual("operator", @operator.Symbol); Assert.AreEqual(1, @operator.Precedence); }
public virtual void Visit(LogicalNotOperator unaryOperator) { Visit(unaryOperator.Operand); }
// Unary operators public override void Visit(LogicalNotOperator unaryOperator) { Write("!"); Visit(unaryOperator.Operand); }
public void TestCaseEvaluationExceptions() { var @operator = new LogicalNotOperator(TypeConverter); ExpectArgumentNullException("context", () => @operator.Evaluate(null, 1)); }
public void TestCaseConstruction2() { var @operator = new LogicalNotOperator(TypeConverter); Assert.AreEqual("!", @operator.Symbol); }