public void When_building_nested_Then_builds_properly() { var join = new OuterJoin(new TableClause("Lol l"), new TableClause("Wat w"), "l.WatID = w.ID"); var innerJoin = new InnerJoin(join, new TableClause("Derp d"), "l.DerpID = d.ID"); innerJoin.ToSql().Should().BeEquivalentToIgnoringNewLines(@"Lol l OUTER JOIN Wat w ON l.WatID = w.ID INNER JOIN Derp d ON l.DerpID = d.ID"); }
public void When_building_nested_Then_builds_properly() { var join = new OuterJoin(new TableClause("Lol l"), new TableClause("Wat w"), "l.WatID = w.ID"); var innerJoin = new InnerJoin(join, new TableClause("Derp d"), "l.DerpID = d.ID"); Assert.That( innerJoin.ToSql(), SqlCompareConstraint.EqualTo(@"Lol l OUTER JOIN Wat w ON l.WatID = w.ID INNER JOIN Derp d ON l.DerpID = d.ID")); }