Example #1
0
        public void Calls_RecursivelyDeleteTtFilesInPath_method_of_IRecursivelyDeleteTtFilesInPathService_after_processing_queue()
        {
            var textTemplateZipProcessor =
                new StatefulT4Processor.BatchProcessor.TextTemplateZipProcessor(
                    mocker.GetMock <IExtractZipToDirectoryService>().Object,
                    mocker.GetMock <IRecursivelyRenameFilesAndFoldersByConvention>().Object,
                    mocker.GetMock <ICreateQueueFromPathService>().Object
                    , new DummyQueueProcessorService(), mocker.GetMock <IRecursivelyDeleteTtFilesInPathService>().Object);

            try
            {
                textTemplateZipProcessor.ProcessZip("pathToZip", "outputPath");
            }
            catch (Exception) { }

            mocker.GetMock <IRecursivelyDeleteTtFilesInPathService>().Verify(a => a.RecursivelyDeleteTtFilesInPath("outputPath"), Times.Never());
        }
        public void Calls_RecursivelyDeleteTtFilesInPath_method_of_IRecursivelyDeleteTtFilesInPathService_after_processing_queue()
        {
            var textTemplateZipProcessor =
                new StatefulT4Processor.BatchProcessor.TextTemplateZipProcessor(
                    mocker.GetMock<IExtractZipToDirectoryService>().Object,
                    mocker.GetMock<IRecursivelyRenameFilesAndFoldersByConvention>().Object,
                    mocker.GetMock<ICreateQueueFromPathService>().Object
                    , new DummyQueueProcessorService(), mocker.GetMock<IRecursivelyDeleteTtFilesInPathService>().Object);
            try
            {
                textTemplateZipProcessor.ProcessZip("pathToZip", "outputPath");
            }
            catch (Exception) { }

            mocker.GetMock<IRecursivelyDeleteTtFilesInPathService>().Verify(a => a.RecursivelyDeleteTtFilesInPath("outputPath"), Times.Never());
        }