コード例 #1
0
ファイル: Program.cs プロジェクト: TomMonks/EasyDatabase
 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());
 }
コード例 #2
0
ファイル: UnitTest1.cs プロジェクト: TomMonks/EasyDatabase
        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());
        }
コード例 #3
0
ファイル: UnitTest1.cs プロジェクト: TomMonks/EasyDatabase
        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());
        }