Exemple #1
0
 private static void TestComplexClauseNoJoin()
 {
     ComplexFromClause from = new ComplexFromClause();
     NoJoin join = new NoJoin(new TableAlias("emp", "a"), new TableAlias("dept", "b"));
     from.AddJoin(join);
     Console.WriteLine(from.ToString());
 }
Exemple #2
0
        public void TestComplexFromClauseWithInnerJoin()
        {
            string expected = "FROM emp AS a INNER JOIN dept AS b ON a.dept=b.dept";

            ComplexFromClause from = new ComplexFromClause();
            InnerJoin join = new InnerJoin(new TableAlias("emp", "a"), new TableAlias("dept", "b"), "a.dept", "b.dept");
            from.AddJoin(join);

            Assert.AreEqual(expected.ToLower(), from.ToString().ToLower());
        }
Exemple #3
0
        public void TestComplexFromClauseNoJoin()
        {
            string expected = "FROM emp AS a, dept AS b";

            ComplexFromClause from = new ComplexFromClause();
            NoJoin join = new NoJoin(new TableAlias("emp", "a"), new TableAlias("dept", "b"));
            from.AddJoin(join);

            Assert.AreEqual(expected.ToLower(), from.ToString().ToLower());
        }