private void SetUpRows()
        {
            this.excelRows = new List <IExcelRow <Thing> >();

            var crossviewSheetRowAssembler = new CrossviewSheetRowAssembler();

            crossviewSheetRowAssembler.Assemble(this.iteration, new[] { this.elementDefinition.Iid });
            this.excelRows.AddRange(crossviewSheetRowAssembler.ExcelRows);
        }
        public void VerifyThatAssemblerPopulatesArrays()
        {
            var crossviewSheetRowAssembler = new CrossviewSheetRowAssembler();

            crossviewSheetRowAssembler.Assemble(this.iteration, this.elementDefinitions.Select(x => x.Iid));
            this.excelRows.AddRange(crossviewSheetRowAssembler.ExcelRows);

            var arrayAssembler = new CrossviewArrayAssembler(this.excelRows, this.parameterTypes.Select(x => x.Iid));
            var contentArray   = arrayAssembler.ContentArray;

            // The array contains more rows to make a nice header and spacing
            Assert.AreEqual(this.excelRows.Count, contentArray.GetLength(0) - CrossviewSheetConstants.HeaderDepth);
            Assert.AreEqual("ElementDefinition_1", contentArray[CrossviewSheetConstants.HeaderDepth, 0]);
            Assert.AreEqual("ED_1", contentArray[CrossviewSheetConstants.HeaderDepth, 1]);
        }
Exemple #3
0
        /// <summary>
        /// Collect the information that is to be written to the crossview sheet.
        /// </summary>
        /// <param name="elementDefinitions">
        /// Selected <see cref="ElementDefinition"/>s list.
        /// </param>
        /// <param name="parameterTypes">
        /// Selected <see cref="ParameterType"/>s list.
        /// </param>
        private void PopulateSheetArrays(IEnumerable <Guid> elementDefinitions, IEnumerable <Guid> parameterTypes)
        {
            // Instantiate the different rows
            var sheetRowAssembler = new CrossviewSheetRowAssembler();

            sheetRowAssembler.Assemble(this.iteration, elementDefinitions);
            var excelRows = sheetRowAssembler.ExcelRows;

            // Use the instantiated rows to populate the excel array
            this.crossviewArrayAssember = new CrossviewArrayAssembler(excelRows, parameterTypes);

            // Instantiate header
            this.headerArrayAssembler = new CrossviewHeaderArrayAssembler(
                this.session,
                this.iteration,
                this.participant,
                this.crossviewArrayAssember.ContentArray.GetLength(1));
        }