예제 #1
0
            public void Initializes_ToString_To_Passed_In_Value()
            {
                const string myName = "23";
                var myColumn = new Column(myName);

                Assert.AreEqual<string>(myName, myColumn.ToString());
            }
        public void A_Not_Clause()
        {
            var columnEquals12 = new Column("column").IsEqualTo(12);
            var myClause = new Not(columnEquals12);

            Assert.AreEqual<string>("NOT (column = '12')", myClause.ToString());
        }
            public void Returns_Col_Like_With_Wildcards()
            {
                var columnName = "asd;huf";
                var targetText = "as;jfa8;ouf";

                string whereClause = new Column(columnName).Contains(targetText).ToString();

                Assert.AreEqual<string>(string.Format("{0} LIKE '%{1}%'", columnName, targetText), whereClause);
            }