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()
1414 return GetDefaultConfigurationFilePath ( ) ;
1515 }
1616 }
17+
1718 [ Test ]
1819 public void WhenSerchInMultiplePathsThenNotThrows ( )
1920 {
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+
2024 string binPath = Path . Combine ( AppDomain . CurrentDomain . BaseDirectory , "bin" ) ;
2125 var expected = Path . Combine ( binPath , Configuration . DefaultHibernateCfgFileName ) ;
2226
2327 try
2428 {
29+ AppDomain . CurrentDomain . ClearPrivatePath ( ) ;
2530 AppDomain . CurrentDomain . AppendPrivatePath ( "bin" ) ;
2631 AppDomain . CurrentDomain . AppendPrivatePath ( "DbScripts" ) ;
2732 var configuration = new MyNhConfiguration ( ) ;
@@ -30,7 +35,8 @@ public void WhenSerchInMultiplePathsThenNotThrows()
3035 finally
3136 {
3237 AppDomain . CurrentDomain . ClearPrivatePath ( ) ;
38+ if ( privatePath != null ) AppDomain . CurrentDomain . AppendPrivatePath ( privatePath ) ;
3339 }
3440 }
3541 }
36- }
42+ }
You can’t perform that action at this time.
0 commit comments