This repository was archived by the owner on Dec 24, 2022. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +16
-18
lines changed
src/ServiceStack.OrmLite.PostgreSQL.Tests Expand file tree Collapse file tree 1 file changed +16
-18
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,22 @@ public ForeignKeyAttributeTests() : base(Dialect.PostgreSql) { }
11
11
12
12
[ TestFixtureSetUp ]
13
13
public void Setup ( )
14
+ {
15
+ DropTables ( ) ;
16
+
17
+ using ( var dbConn = OpenDbConnection ( ) )
18
+ {
19
+ dbConn . CreateTable < ReferencedType > ( true ) ;
20
+ }
21
+ }
22
+
23
+ [ TestFixtureTearDown ]
24
+ public void TearDown ( )
25
+ {
26
+ DropTables ( ) ;
27
+ }
28
+
29
+ private void DropTables ( )
14
30
{
15
31
using ( var dbConn = OpenDbConnection ( ) )
16
32
{
@@ -22,8 +38,6 @@ public void Setup()
22
38
dbConn . DropTable < TypeWithOnDeleteCascade > ( ) ;
23
39
dbConn . DropTable < TypeWithSimpleForeignKey > ( ) ;
24
40
dbConn . DropTable < ReferencedType > ( ) ;
25
-
26
- dbConn . CreateTable < ReferencedType > ( true ) ;
27
41
}
28
42
}
29
43
@@ -109,22 +123,6 @@ public void CanCreateForeignWithOnDeleteSetNull()
109
123
dbConn . CreateTable < TypeWithOnDeleteSetNull > ( true ) ;
110
124
}
111
125
}
112
-
113
- [ TestFixtureTearDown ]
114
- public void TearDown ( )
115
- {
116
- using ( var dbConn = OpenDbConnection ( ) )
117
- {
118
- dbConn . DropTable < TypeWithOnDeleteAndUpdateCascade > ( ) ;
119
- dbConn . DropTable < TypeWithOnDeleteSetNull > ( ) ;
120
- dbConn . DropTable < TypeWithOnDeleteSetDefault > ( ) ;
121
- dbConn . DropTable < TypeWithOnDeleteRestrict > ( ) ;
122
- dbConn . DropTable < TypeWithOnDeleteNoAction > ( ) ;
123
- dbConn . DropTable < TypeWithOnDeleteCascade > ( ) ;
124
- dbConn . DropTable < TypeWithSimpleForeignKey > ( ) ;
125
- dbConn . DropTable < ReferencedType > ( ) ;
126
- }
127
- }
128
126
}
129
127
130
128
public class ReferencedType
You can’t perform that action at this time.
0 commit comments