public void ShouldThrowExceptionWhenNoDatabase() { var creator = new SchemaInstaller(); var connectionString = SelectDialect( () => new SqlConnectionStringBuilder(ConnectionString) { InitialCatalog = "Does_Not_Exist" }.ToString(), () => new NpgsqlConnectionStringBuilder(ConnectionString) { Database = "Does_Not_Exist" }.ToString()); var exception = Assert.Catch(() => creator.TryConnect(connectionString)); exception.Message.Should().Contain("Does_Not_Exist"); }
public void ShouldConnect() { var creator = new SchemaInstaller(); creator.TryConnect(ConnectionString); }