예제 #1
0
        public void CreateCustomerOverviewZipFile_Should_Export_Non_Deleted_Customers()
        {
            // ACT
            var result = _exportService.CreateCustomerOverviewZipFile();

            // ASSERT
            Assert.IsInstanceOf <IZipFile>(result);
            _mockFileExporter.Verify(exporter => exporter.WriteFile(_customerOverViewExportFileLocation, NonDeletedCustomers()));
            var mockZipfile = result as MockZipFile;

            Assert.AreEqual(1, mockZipfile.ZipEntries.Count);
            Assert.AreEqual($"{_customerOverviewExportName}.csv", mockZipfile.ZipEntries[0].FileName);
            Assert.AreEqual(_customerOverViewExportFileLocation, mockZipfile.ZipEntries[0].Location);
        }