Пример #1
0
        public void Then_Spreadsheet_First_Tab_Has_Providers_With_Search_Filters()
        {
            // Arrange
            var dtoWithSearchFilters = new ProviderProximityReportDtoBuilder()
                                       .AddProvider()
                                       .AddSkillAreas()
                                       .Build();

            var reportWriterWithSearchFilters = new ProviderProximityReportWriter();

            // Act
            var resultWithSearchFilters = reportWriterWithSearchFilters.WriteReport(dtoWithSearchFilters);

            // Assert
            using var stream      = new MemoryStream(resultWithSearchFilters);
            using var spreadSheet = SpreadsheetDocument.Open(stream, false);
            var sheetData = spreadSheet.GetSheetData(0);

            sheetData.Should().NotBeNull();

            var rows = sheetData.Descendants <Row>().ToList();

            rows.Count.Should().Be(3);
            AssertRowSearchFilter(rows, 0);
            AssertRowHeader(rows, 1);
            AssertRowData(rows, 2);
        }
        public When_ProviderProximityReport_Writer_Is_Called_To_Create_Spreadsheet()
        {
            var dto = new ProviderProximityReportDtoBuilder()
                      .AddProvider()
                      .Build();

            var reportWriter = new ProviderProximityReportWriter();

            _result = reportWriter.WriteReport(dto);
        }