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>(); } }
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); } }
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>(); } }