Exemple #1
0
        public void Build_WithCustomPropertyForComplexHeaderUsingAddHeaderProperty_CorrectProperties()
        {
            VerticalReportSchemaBuilder <string> reportBuilder = new VerticalReportSchemaBuilder <string>();

            reportBuilder.AddColumn("Value", s => s);
            reportBuilder.AddComplexHeader(0, "Complex", "Value");
            reportBuilder.AddComplexHeaderProperties("Complex", new CustomHeaderProperty());

            IReportTable <ReportCell> table = reportBuilder.BuildSchema().BuildReportTable(new string[] { });

            ReportCell[][] cells = this.GetCellsAsArray(table.HeaderRows);
            cells.Should().HaveCount(2);
            cells[0][0].Properties.Should()
            .HaveCount(1).And
            .ContainItemsAssignableTo <CustomHeaderProperty>();
        }