public void Evaluate()
        {
            ParserContext    pc = new ParserContext(ParserContext.DefaultBufferSize);
            FormatterContext fc = new FormatterContext(FormatterContext.DefaultBufferSize);

            ConditionalAndOperator op = new ConditionalAndOperator(
                new MockBooleanExpression(true), new MockBooleanExpression(true));

            Assert.IsTrue(op.EvaluateParse(ref pc));
            Assert.IsTrue(op.EvaluateFormat(new StringField(3, "000000"), ref fc));

            op = new ConditionalAndOperator(
                new MockBooleanExpression(false), new MockBooleanExpression(true));

            Assert.IsFalse(op.EvaluateParse(ref pc));
            Assert.IsFalse(op.EvaluateFormat(new StringField(3, "000000"), ref fc));

            op = new ConditionalAndOperator(
                new MockBooleanExpression(true), new MockBooleanExpression(false));

            Assert.IsFalse(op.EvaluateParse(ref pc));
            Assert.IsFalse(op.EvaluateFormat(new StringField(3, "000000"), ref fc));

            op = new ConditionalAndOperator(
                new MockBooleanExpression(false), new MockBooleanExpression(false));

            Assert.IsFalse(op.EvaluateParse(ref pc));
            Assert.IsFalse(op.EvaluateFormat(new StringField(3, "000000"), ref fc));
        }
        public void InstantiationAndProperties()
        {
            ConditionalAndOperator op = new ConditionalAndOperator();

            Assert.IsNull(op.LeftExpression);
            Assert.IsNull(op.RightExpression);

            MockBooleanExpression left  = new MockBooleanExpression(true);
            MockBooleanExpression right = new MockBooleanExpression(true);

            op = new ConditionalAndOperator(left, right);

            Assert.IsTrue(op.LeftExpression == left);
            Assert.IsTrue(op.RightExpression == right);

            op.LeftExpression  = null;
            op.RightExpression = null;

            Assert.IsNull(op.LeftExpression);
            Assert.IsNull(op.RightExpression);
        }