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); }
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(); }
public ITempFile NewTempFile() { return(directory.NewTempFile()); }