Ejemplo n.º 1
0
        public void Folder_Does_Not_Exists_For_Deletion()
        {
            var path           = @"C:\SourceFiles\file.txt";
            var mockFileSystem = new MockFileSystem();
            var sut            = new FolderManager(mockFileSystem);

            Assert.That(() => sut.DeleteFolder(path), Throws.TypeOf <ArgumentException>());
        }
Ejemplo n.º 2
0
        public void Successfully_Folder_Deletion()
        {
            var path           = @"C:\SourceFiles\file.txt";
            var mockFileSystem = new MockFileSystem();

            mockFileSystem.AddDirectory(path);
            var sut = new FolderManager(mockFileSystem);

            sut.DeleteFolder(path);

            Assert.That(mockFileSystem.Directory.Exists(path), Is.False);
        }