Esempio n. 1
0
        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);
        }
Esempio n. 2
0
        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"));
        }