Esempio n. 1
0
 public void Application_Current_Directory_Does_Not_Change_When_Changing_FileSystem_Current_Directory()
 {
     var applicationDirectory = System.IO.Directory.GetCurrentDirectory();
     var fileSystem = new FileSystem();
     var newWorkingDir = fileSystem.DirectoryDescribingTemporaryDirectory();
     newWorkingDir.SetAsCurrent();
     Assert.AreEqual(applicationDirectory, System.IO.Directory.GetCurrentDirectory());
 }
Esempio n. 2
0
 public void Different_Instances_Can_Have_Different_Current_Directories()
 {
     var fs1 = new FileSystem();
     var fs2 = new FileSystem();
     var fs2CurrentDirectory = fs2.DirectoryDescribingTemporaryDirectory();
     fs2CurrentDirectory.SetAsCurrent();
     Assert.AreNotEqual(fs1.DirectoryDescribingCurrentDirectory().PathAsString, fs2.DirectoryDescribingCurrentDirectory().PathAsString);
     Assert.AreEqual(System.IO.Directory.GetCurrentDirectory(), fs1.DirectoryDescribingCurrentDirectory().PathAsString);
 }