Esempio n. 1
0
 public void OpenNonExistantStream(string appendix)
 {
     using (var cleaner = new TestFileCleaner(useDotNet: false))
     {
         string filePath = cleaner.GetTestPath() + appendix;
         Action action   = () => cleaner.FileService.CreateFileStream(filePath, FileMode.Open);
         action.ShouldThrow <FileNotFoundException>();
     }
 }
Esempio n. 2
0
 public void FileInfoHasCanonicalPaths()
 {
     using (var cleaner = new TestFileCleaner(useDotNet: false))
     {
         string filePath = cleaner.GetTestPath() + "UPPER";
         cleaner.FileService.WriteAllText(filePath, "FileInfoHasCanonicalPaths");
         var info = cleaner.FileService.GetPathInfo(filePath.ToLowerInvariant());
         info.Path.Should().Be(filePath);
     }
 }
Esempio n. 3
0
 public void FileInfoHasCanonicalPaths()
 {
     using (var cleaner = new TestFileCleaner(useDotNet: false))
     {
         string filePath = cleaner.GetTestPath() + "UPPER";
         cleaner.FileService.WriteAllText(filePath, "FileInfoHasCanonicalPaths");
         var info = cleaner.FileService.GetPathInfo(filePath.ToLowerInvariant());
         info.Path.Should().Be(filePath);
     }
 }
Esempio n. 4
0
 public void OpenNonExistantStream(string appendix)
 {
     using (var cleaner = new TestFileCleaner(useDotNet: false))
     {
         string filePath = cleaner.GetTestPath() + appendix;
         Action action = () => cleaner.FileService.CreateFileStream(filePath, FileMode.Open);
         action.ShouldThrow<FileNotFoundException>();
     }
 }