public void test_WHEN_expression_is_valid_THEN_operation_is_returned()
        {
            var xml = string.Format(
                "<DateRangesOverlap>" +
                "    <FieldRef Name=\"Title\" />" +
                "    <FieldRef Name=\"Title\" />" +
                "    <FieldRef Name=\"Title\" />" +
                "    <Value Type=\"DateTime\"><Now/></Value>" +
                "</DateRangesOverlap>");

            var b = MockRepository.GenerateStub <IReOperandBuilder>();

            b.Stub(c => c.CreateFieldRefOperand(null)).Return(new FieldRefOperand("Title")).IgnoreArguments();
            b.Stub(c => c.CreateValueOperand(null, false)).Return(new DateTimeValueOperand("Now", false)).IgnoreArguments();

            var analyzer  = new ReDateRangesOverlapAnalyzer(XmlHelper.Get(xml), b);
            var operation = analyzer.GetOperation();

            Assert.IsInstanceOf <DateRangesOverlapOperation>(operation);
            var operationT = (DateRangesOverlapOperation)operation;

            Assert.That(operationT.ToExpression().ToString(), Is.EqualTo(
                            "DateRangesOverlap(x.get_Item(\"Title\"), x.get_Item(\"Title\"), x.get_Item(\"Title\"), Convert(Convert(Camlex.Now)))"));
        }
        public void test_WHEN_expression_is_not_valid_THEN_exception_is_thrown()
        {
            var analyzer = new ReDateRangesOverlapAnalyzer(null, null);

            Assert.Throws <CamlAnalysisException>(() => analyzer.GetOperation());
        }
        public void test_WHEN_expression_is_not_valid_THEN_exception_is_thrown()
        {
            var analyzer = new ReDateRangesOverlapAnalyzer(null, null);

            analyzer.GetOperation();
        }