public static ScriptsAreEqual ( string actual, string expected ) : void | ||
actual | string | |
expected | string | |
리턴 | void |
public void NotEndedStatementsShouldNotBeAddedToScript1() { var q = new SharpQuery(); q.Select(1); TSqlAssert.ScriptsAreEqual(string.Empty, q.ToString()); }
public void EndedStatementsShouldBeAddedToScript() { var q = new SharpQuery(); q.Select(1).EndStatement(); var script = q.ToString(); TSqlAssert.ScriptsAreEqual(script, "SELECT @p0"); }
public void QueryAlwaysGeneratesTheSameScript() { var q = new SharpQuery(); var u = new UserTable(); var p = new PostTable(); q.Select(u.FirstName, u.Email, p.Title).From(u).LeftOuterJoin(p, p.UserId.IsEqualTo(u.Id)).EndStatement(); var script1 = q.ToString(); var script2 = q.ToString(); TSqlAssert.ScriptsAreEqual(script1, script2); }
public void EmptyQueryReturnsEmptyScript() { var q = new SharpQuery(); TSqlAssert.ScriptsAreEqual(string.Empty, q.ToString()); }