Exemple #1
0
        public static AndConstraint <StringAssertions> HaveSchema(this StringAssertions assertions,
                                                                  string connectionString)
        {
            var             dbName = assertions.Subject;
            SQLServerDriver driver =
                new SQLServerDriver(new SqlConnection(connectionString));
            var command        = "SELECT TABLE_NAME FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 'People'";
            var isTableCreated = driver.Exists(command);

            Execute.Assertion.ForCondition(isTableCreated)
            .FailWith("schema did not create correctly");
            return(new AndConstraint <StringAssertions>(assertions));
        }
 public void when_request_for_open_conneciton_should_connected_to_database()
 {
     var sqlServerDriver = new SQLServerDriver();
 }