Esempio n. 1
0
        public void Getting_a_new_temp_file_should_create_a_new_file_in_the_root_directory()
        {
            var expected = Substitute.For <ITempFile>();

            rootDirectoryMock.NewTempFile().Returns(expected);

            var actual = subject.NewTempFile();

            actual.Should().BeSameAs(expected);
        }
Esempio n. 2
0
        private static void CreateTemporaryDirectory(ITempStorage tempStorage)
        {
            using ITempDirectory tempDir = tempStorage.NewTempDirectory();

            using ITempFile tempFile = tempDir.NewTempFile();
            tempFile.WriteAllText("some file content");

            using ITempDirectory subDir = tempDir.NewTempDirectory();
        }
Esempio n. 3
0
 public ITempFile NewTempFile()
 {
     return(directory.NewTempFile());
 }