Exemplo n.º 1
0
        public void RemovePrependTextTest()
        {
            // ARRANGE
            var fakeFileSystem = new Fakes().BuildFakeFileSystemWithPrepend();
            var logic          = new PrependLogic(fakeFileSystem);

            // ACT
            logic.RemovePrependedText(@"T:\TestFiles\*.txt", "aaa### - ", ConfirmActionTrue);

            // ASSERT
            Assert.IsTrue(fakeFileSystem.FileExists(@"T:\TestFiles\file-01.txt"));
            Assert.IsTrue(fakeFileSystem.FileExists(@"T:\TestFiles\file-02.doc"));
            Assert.IsTrue(fakeFileSystem.FileExists(@"T:\TestFiles\file-03.txt"));
            Assert.IsTrue(fakeFileSystem.FileExists(@"T:\TestFiles\file-04.junk"));
            Assert.IsTrue(fakeFileSystem.FileExists(@"T:\TestFiles\file-05"));
        }