public void CreateTest() { var creator = new SimpleJoinClauseCreator(); var attr = new SimpleJoinAttribute("CurrentTableField", JoinType.Left, "JoinedTable") { CurrentTable = "CurrentTable", JoinedTableField = "JoinedField" }; var res = creator.Create(attr); Assert.AreEqual(JoinType.Left, res.JoinType); Assert.AreEqual(1, res.JoinSqls.Count()); Assert.AreEqual(1, res.SelectsSql.Count()); Assert.AreEqual("JoinedTable.*", res.SelectsSql.First()); Assert.AreEqual("SplitOnJoinedTableJoinedField", res.Splitter); Assert.AreEqual("JoinedTable on JoinedTable.JoinedField = CurrentTable.CurrentTableField", res.JoinSqls.First()); Assert.IsTrue(res.HasJoin); }
public void CreateTestException() { var creator = new SimpleJoinClauseCreator(); creator.Create(new TestJoinAttr(JoinType.Inner)); }