File tree Expand file tree Collapse file tree 1 file changed +7
-9
lines changed
Test/UnitTests/TestDataLayer Expand file tree Collapse file tree 1 file changed +7
-9
lines changed Original file line number Diff line number Diff line change @@ -63,18 +63,17 @@ public void TestEnsureDeletedEnsureCreatedOk()
6363 using var context = new BookContext ( options ) ;
6464
6565 context . Database . EnsureCreated ( ) ;
66+ context . SeedDatabaseFourBooks ( ) ;
6667
68+ //ATTEMPT
6769 using ( new TimeThings ( _output , "Time to EnsureDeleted and EnsureCreated" ) )
6870 {
6971 context . Database . EnsureDeleted ( ) ;
7072 context . Database . EnsureCreated ( ) ;
7173 }
7274
73- //ATTEMPT
74- context . SeedDatabaseFourBooks ( ) ;
75-
7675 //VERIFY
77- context . Books . Count ( ) . ShouldEqual ( 4 ) ;
76+ context . Books . Count ( ) . ShouldEqual ( 0 ) ;
7877 }
7978
8079 [ Fact ]
@@ -84,18 +83,17 @@ public void TestEnsureCleanExistingDatabaseOk()
8483 var options = this . CreatePostgreSqlUniqueDatabaseOptions < BookContext > ( ) ;
8584 using var context = new BookContext ( options ) ;
8685
87- context . Database . EnsureCreated ( ) ;
86+ context . Database . EnsureCreated ( ) ;
87+ context . SeedDatabaseFourBooks ( ) ;
8888
89+ //ATTEMPT
8990 using ( new TimeThings ( _output , "Time to EnsureClean" ) )
9091 {
9192 context . Database . EnsureClean ( ) ;
9293 }
9394
94- //ATTEMPT
95- context . SeedDatabaseFourBooks ( ) ;
96-
9795 //VERIFY
98- context . Books . Count ( ) . ShouldEqual ( 4 ) ;
96+ context . Books . Count ( ) . ShouldEqual ( 0 ) ;
9997 }
10098
10199 [ Fact ]
You can’t perform that action at this time.
0 commit comments