Ejemplo n.º 1
0
        public void GivenMockExporterMustSaveRAWOutputStreamAsCorruptSpreadsheet()
        {
            var builder = new ExpenseCzarTotalComparisonV2ProcessorBuilder(new MockExcelExportHandlerBuilder(),
                new ReportQueueItemProcessor_AccessorBuilder(),
                TempDirectory, TemplateDirectoryV2, 201101);
            var processor = builder.Build();

            processor();

            Assert.Inconclusive();
        }
Ejemplo n.º 2
0
        public void GivenInMemoryContextGenerateV2TotalComparisonReport()
        {
            var fileName = ExcelFileVerifier.PrepareTestOutputFile("201101-Mock ExpenseCzarTotalComparison-1.xlsx");

            // Arrange
            var builder = new ExpenseCzarTotalComparisonV2ProcessorBuilder(
                new ExpenseCzarTotalComparisonV2ExcelExportHandlerBuilder(TempDirectory,
                    new MemoryDaoBuilder(new MemoryDataContextBuilder())),
                new ReportQueueItemProcessor_AccessorBuilder(),
                TempDirectory, TemplateDirectoryV2, 201101);
            var processor = builder.Build();

            // Act
            processor();

            // Assert

            Assert.IsTrue(File.Exists(fileName));
            Assert.IsTrue(ExcelFileVerifier.VerifySize(fileName,  26583,  28583));
        }