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 +4
-2
lines changed
tests/ServiceStack.OrmLite.Tests/Issues Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ public NoSqlLoggingIssue(DialectContext context) : base(context) {}
13
13
public void Does_log_SQL_Insert_for_Saves ( )
14
14
{
15
15
var sbLogFactory = new StringBuilderLogFactory ( ) ;
16
+ var hold = LogManager . LogFactory ;
16
17
OrmLiteConfig . ResetLogFactory ( sbLogFactory ) ;
17
18
18
19
using ( var db = OpenDbConnection ( ) )
@@ -25,13 +26,14 @@ public void Does_log_SQL_Insert_for_Saves()
25
26
var sql = sbLogFactory . GetLogs ( ) ;
26
27
27
28
Assert . That ( sql , Does . Contain ( "INSERT INTO" ) ) ;
28
- OrmLiteConfig . ResetLogFactory ( null ) ;
29
+ OrmLiteConfig . ResetLogFactory ( hold ) ;
29
30
}
30
31
31
32
[ Test ]
32
33
public void Does_log_SQL_Insert_for_Saves_with_Auto_Ids ( )
33
34
{
34
35
var sbLogFactory = new StringBuilderLogFactory ( ) ;
36
+ var hold = LogManager . LogFactory ;
35
37
OrmLiteConfig . ResetLogFactory ( sbLogFactory ) ;
36
38
37
39
using ( var db = OpenDbConnection ( ) )
@@ -44,7 +46,7 @@ public void Does_log_SQL_Insert_for_Saves_with_Auto_Ids()
44
46
var sql = sbLogFactory . GetLogs ( ) ;
45
47
46
48
Assert . That ( sql , Does . Contain ( "INSERT INTO" ) ) ;
47
- OrmLiteConfig . ResetLogFactory ( null ) ;
49
+ OrmLiteConfig . ResetLogFactory ( hold ) ;
48
50
}
49
51
}
50
52
}
You can’t perform that action at this time.
0 commit comments