public void ValidateメソッドはSetupメソッドの暗黙呼び出しを行わないこと() { // setup Loggi.DebugEnabled = true; using (Database database = new Database()) { database.ExecuteNonQuery("delete from TypesTable"); database.Commit(); } FixtureBook fixtureBook = new FixtureBook(); // when Dictionary <string, string> obj = new Dictionary <string, string>(); obj["Id"] = "1"; fixtureBook.Validate(obj); // then using (Database database = new Database()) { Assert.AreEqual(0, database.ExecuteQuery("select * from TypesTable").Rows.Count); } // when fixtureBook.Setup(); // then using (Database database = new Database()) { Assert.AreEqual(1, database.ExecuteQuery("select * from TypesTable").Rows.Count); } }
public void 指定されたデータをデータベーステーブルに投入できる_SQLServer() { // setup Loggi.DebugEnabled = true; // when fixtureBook.Setup(); // then DataTable table = Database.ExecuteQuery(null, "select * from TypesTable order by Id"); fixtureBook.Validate(table, "TypesTable"); }
public void 検索列指定をしてデータベーステーブルの状態が予想結果と同じであることをチェックできる_SQLServer() { // setup Loggi.DebugEnabled = true; fixtureBook.Setup(); // expect fixtureBook.ValidateStorage(); }
public void ValidateメソッドはSetupメソッドの暗黙呼び出しを行わないこと() { // setup Loggi.DebugEnabled = true; using (Database database = new Database()) { database.ExecuteNonQuery("delete from TypesTable"); database.Commit(); } FixtureBook fixtureBook = new FixtureBook(); // when Dictionary<string, string> obj = new Dictionary<string, string>(); obj["Id"] = "1"; fixtureBook.Validate(obj); // then using (Database database = new Database()) { Assert.AreEqual(0, database.ExecuteQuery("select * from TypesTable").Rows.Count); } // when fixtureBook.Setup(); // then using (Database database = new Database()) { Assert.AreEqual(1, database.ExecuteQuery("select * from TypesTable").Rows.Count); } }