File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
src/NHibernate.Test/NHSpecificTest/NH2188 Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -14,14 +14,19 @@ public string DefaultConfigurationFilePath()
14
14
return GetDefaultConfigurationFilePath ( ) ;
15
15
}
16
16
}
17
+
17
18
[ Test ]
18
19
public void WhenSerchInMultiplePathsThenNotThrows ( )
19
20
{
21
+ // NUnit 3 sets PrivateBinPath when using an NUnit project, so we need to reset back to the correct setting when done.
22
+ var privatePath = AppDomain . CurrentDomain . SetupInformation . PrivateBinPath ;
23
+
20
24
string binPath = Path . Combine ( AppDomain . CurrentDomain . BaseDirectory , "bin" ) ;
21
25
var expected = Path . Combine ( binPath , Configuration . DefaultHibernateCfgFileName ) ;
22
26
23
27
try
24
28
{
29
+ AppDomain . CurrentDomain . ClearPrivatePath ( ) ;
25
30
AppDomain . CurrentDomain . AppendPrivatePath ( "bin" ) ;
26
31
AppDomain . CurrentDomain . AppendPrivatePath ( "DbScripts" ) ;
27
32
var configuration = new MyNhConfiguration ( ) ;
@@ -30,7 +35,8 @@ public void WhenSerchInMultiplePathsThenNotThrows()
30
35
finally
31
36
{
32
37
AppDomain . CurrentDomain . ClearPrivatePath ( ) ;
38
+ if ( privatePath != null ) AppDomain . CurrentDomain . AppendPrivatePath ( privatePath ) ;
33
39
}
34
40
}
35
41
}
36
- }
42
+ }
You can’t perform that action at this time.
0 commit comments