File tree Expand file tree Collapse file tree
test/EntityFramework6.Npgsql.Tests Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1821,5 +1821,26 @@ public void InstanceTest()
18211821 Assert . Fail ( ) ;
18221822 }
18231823 }
1824+
1825+ [ OneTimeSetUp ]
1826+ public new void TestFixtureSetup ( )
1827+ {
1828+ using ( var context = new BloggingContext ( ConnectionString ) )
1829+ {
1830+ if ( ! context . Database . Exists ( ) )
1831+ context . Database . Create ( ) ;
1832+ }
1833+
1834+ using ( var conn = new NpgsqlConnection ( ConnectionString ) )
1835+ {
1836+ conn . Open ( ) ;
1837+ using ( var cmd = new NpgsqlCommand ( "CREATE EXTENSION IF NOT EXISTS postgis" , conn ) )
1838+ cmd . ExecuteNonQuery ( ) ;
1839+
1840+ // Need to also have Npgsql reload the types from the database
1841+ conn . ReloadTypes ( ) ;
1842+ NpgsqlConnection . ClearPool ( conn ) ;
1843+ }
1844+ }
18241845 }
18251846}
Original file line number Diff line number Diff line change @@ -41,9 +41,8 @@ namespace EntityFramework6.Npgsql.Tests
4141 public abstract class EntityFrameworkTestBase : TestBase
4242 {
4343 [ OneTimeSetUp ]
44- public override void TestFixtureSetup ( )
44+ public new void TestFixtureSetup ( )
4545 {
46- base . TestFixtureSetup ( ) ;
4746 using ( var context = new BloggingContext ( ConnectionString ) )
4847 {
4948 if ( context . Database . Exists ( ) )
You can’t perform that action at this time.
0 commit comments