Exemple #1
0
        public void TestRightTrimQueryFieldGetStringWithIndex()
        {
            // Prepare
            var functionalQueryField = new RightTrimQueryField("FieldName", Operation.Equal, "Value");

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

            // Assert
            Assert.AreEqual("RTRIM([FieldName]) = @FieldName_1", text);
        }
Exemple #2
0
        public void TestRightTrimQueryFieldConstructor()
        {
            // Prepare
            var functionalQueryField = new RightTrimQueryField("FieldName", Operation.NotEqual, "Value");

            // Assert
            Assert.AreEqual("FieldName", functionalQueryField.Field.Name);
            Assert.AreEqual(Operation.NotEqual, functionalQueryField.Operation);
            Assert.AreEqual("Value", functionalQueryField.Parameter.Value);
            Assert.AreEqual("RTRIM({0})", functionalQueryField.Format);
        }