@@ -47,7 +47,11 @@ public static void SetUp(FbServerType serverType, bool compression)
4747 var item = Tuple . Create ( serverType , compression ) ;
4848 if ( ! _initalized . Contains ( item ) )
4949 {
50- Prepare ( serverType , compression ) ;
50+ var cs = TestsBase . BuildConnectionString ( serverType , compression ) ;
51+ FbConnection . CreateDatabase ( cs , PageSize , ForcedWrite , true ) ;
52+ CreateTables ( cs ) ;
53+ CreateProcedures ( cs ) ;
54+ CreateTriggers ( cs ) ;
5155 _initalized . Add ( item ) ;
5256 }
5357 }
@@ -63,36 +67,12 @@ public void TearDown()
6367 FbConnection . ClearAllPools ( ) ;
6468 foreach ( var item in _initalized )
6569 {
66- Drop ( item . Item1 , item . Item2 ) ;
70+ var cs = TestsBase . BuildConnectionString ( item . Item1 , item . Item2 ) ;
71+ FbConnection . DropDatabase ( cs ) ;
6772 }
6873 _initalized . Clear ( ) ;
6974 }
7075
71- private static void Drop ( FbServerType serverType , bool compression )
72- {
73- string cs = TestsBase . BuildConnectionString ( serverType , compression ) ;
74- DropDatabase ( cs ) ;
75- }
76-
77- private static void Prepare ( FbServerType serverType , bool compression )
78- {
79- string cs = TestsBase . BuildConnectionString ( serverType , compression ) ;
80- CreateDatabase ( cs ) ;
81- CreateTables ( cs ) ;
82- CreateProcedures ( cs ) ;
83- CreateTriggers ( cs ) ;
84- }
85-
86- private static void CreateDatabase ( string connectionString )
87- {
88- FbConnection . CreateDatabase ( connectionString , PageSize , ForcedWrite , true ) ;
89- }
90-
91- private static void DropDatabase ( string connectionString )
92- {
93- FbConnection . DropDatabase ( connectionString ) ;
94- }
95-
9676 private static void CreateTables ( string connectionString )
9777 {
9878 using ( FbConnection connection = new FbConnection ( connectionString ) )
0 commit comments