Exemplo n.º 1
0
        public void TestFunctionalQueryFieldGetStringWithMultipleFunctions()
        {
            // Prepare
            var functionalQueryField = new FunctionalQueryField("FieldName", Operation.Equal, "Value", "FUNC1({0}) = @Value AND FUNC2({0})");

            // Act
            var text = functionalQueryField.GetString(0, new CustomDbSetting());

            // Assert
            Assert.AreEqual("FUNC1([FieldName]) = @Value AND FUNC2([FieldName]) = @FieldName", text);
        }
Exemplo n.º 2
0
        public void TestFunctionalQueryFieldGetStringWithIndex()
        {
            // Prepare
            var functionalQueryField = new FunctionalQueryField("FieldName", Operation.Equal, "Value", "FUNC({0})");

            // Act
            var text = functionalQueryField.GetString(1, new CustomDbSetting());

            // Assert
            Assert.AreEqual("FUNC([FieldName]) = @FieldName_1", text);
        }