コード例 #1
0
ファイル: PhysicalFileTests.cs プロジェクト: olo42/SFS
        public void Write_Creates_Directory_and_rFile_If_Not_Exist()
        {
            // Arrange
            PhysicalFile file = new PhysicalFile();

            // Act
            file.Write(this.filePath, "Some text");

            // Assert
            Assert.That(File.Exists(this.filePath), Is.True);
        }
コード例 #2
0
ファイル: PhysicalFileTests.cs プロジェクト: olo42/SFS
        public void Write_Writes_Content_To_File()
        {
            // Arrange
            PhysicalFile file = new PhysicalFile();

            // Act
            file.Write(this.filePath, "Some text").Wait();
            var contentResult = File.ReadAllText(this.filePath);

            // Assert
            Assert.That(contentResult, Is.EqualTo("Some text"));
        }