File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
test/PowerShellEditorServices.Test Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ public class TokenOperationsTests
1919 private FoldingReference [ ] GetRegions ( string text ) {
2020 ScriptFile scriptFile = new ScriptFile (
2121 // Use any absolute path. Even if it doesn't exist.
22- new Uri ( Path . Combine ( typeof ( TokenOperationsTests ) . Assembly . Location , "TestFile.ps1" ) ) ,
22+ new Uri ( Path . Combine ( Path . GetTempPath ( ) , "TestFile.ps1" ) ) ,
2323 text ,
2424 Version . Parse ( "5.0" ) ) ;
2525
Original file line number Diff line number Diff line change @@ -191,7 +191,7 @@ public void FindsDotSourcedFiles()
191191 ScriptFile scriptFile =
192192 new ScriptFile (
193193 // Use any absolute path. Even if it doesn't exist.
194- new Uri ( Path . Combine ( typeof ( ScriptFileChangeTests ) . Assembly . Location , "TestFile.ps1" ) ) ,
194+ new Uri ( Path . Combine ( Path . GetTempPath ( ) , "TestFile.ps1" ) ) ,
195195 stringReader ,
196196 PowerShellVersion ) ;
197197
@@ -248,7 +248,7 @@ internal static ScriptFile CreateScriptFile(string initialString)
248248 ScriptFile fileToChange =
249249 new ScriptFile (
250250 // Use any absolute path. Even if it doesn't exist.
251- new Uri ( Path . Combine ( typeof ( ScriptFileChangeTests ) . Assembly . Location , "TestFile.ps1" ) ) ,
251+ new Uri ( Path . Combine ( Path . GetTempPath ( ) , "TestFile.ps1" ) ) ,
252252 stringReader ,
253253 PowerShellVersion ) ;
254254
@@ -573,7 +573,7 @@ public class ScriptFileConstructorTests
573573 public void PropertiesInitializedCorrectlyForFile ( )
574574 {
575575 // Use any absolute path. Even if it doesn't exist.
576- var path = Path . Combine ( typeof ( ScriptFileChangeTests ) . Assembly . Location , "TestFile.ps1" ) ;
576+ var path = Path . Combine ( Path . GetTempPath ( ) , "TestFile.ps1" ) ;
577577 var scriptFile = ScriptFileChangeTests . CreateScriptFile ( "" ) ;
578578
579579 Assert . Equal ( path , scriptFile . FilePath ) ;
You can’t perform that action at this time.
0 commit comments