public void WorkManagerInvokedWithDeleteNothingShouldDeleteNoFiles()
        {
            int deleted = 0;
            var dummyLoggerScrapHeap = new DummyLoggerScrapHeap();

            WorkManager workManager = new WorkManager(new MockFileSystemIterator(), dummyLoggerScrapHeap);
            workManager.Delete("source", new List<AbstractCommand>() { new DeleteNothing() });
            dummyLoggerScrapHeap.LoggingStream.Subscribe(x => deleted++);

            Assert.AreEqual(0, deleted);
        }
        public void WorkManagerInvokedWithFileExtensionTxtShouldDeleteOnlySpecificEntities()
        {
            int deleted = 0;
            var dummyLoggerScrapHeap = new DummyLoggerScrapHeap();

            WorkManager workManager = new WorkManager(new MockFileSystemIterator(), dummyLoggerScrapHeap);
            workManager.Delete("source", new List<AbstractCommand>()
            {
                new FileExtension("txt")
            });
            dummyLoggerScrapHeap.LoggingStream.Subscribe(x => deleted++);

            Assert.AreEqual(1, deleted);
        }
        public void WorkManagerInvokedWithHasDateAndDirectoriesOnlyShouldDeleteOnlySpecificEntities()
        {
            int deleted = 0;
            var dummyLoggerScrapHeap = new DummyLoggerScrapHeap();

            WorkManager workManager = new WorkManager(new MockFileSystemIterator(), dummyLoggerScrapHeap);
            workManager.Delete("source", new List<AbstractCommand>()
            {
                new HasDate(x => x.Year == 2011 && x.Month == 3 && x.Day == 13),
                new DirectoriesOnly()
            });
            dummyLoggerScrapHeap.LoggingStream.Subscribe(x => deleted++);

            Assert.AreEqual(1, deleted);
        }
        public void WorkManagerInvokedWithNoFilterShouldDeleteAllFiles()
        {
            int deleted = 0;
            var dummyLoggerScrapHeap = new DummyLoggerScrapHeap();

            WorkManager workManager = new WorkManager(new MockFileSystemIterator(), dummyLoggerScrapHeap);
            workManager.Delete("source");
            dummyLoggerScrapHeap.LoggingStream.Subscribe(x => deleted++);

            Assert.AreEqual(3, deleted);
        }