Пример #1
0
 internal HtmlTestParameter([NotNull] TestParameter testParameter)
 {
     Name        = testParameter.Name;
     Description = StringUtils.IsNotEmpty(testParameter.Description)
                                       ? testParameter.Description
                                       : null;
     Type = TestImplementationUtils.GetParameterTypeString(testParameter);
 }
Пример #2
0
        private IEnumerable <XmlElement> GetTestParameterRows([NotNull] IncludedTest test)
        {
            TestFactory testFactory = test.TestFactory;

            var rows = new List <XmlElement>();

            if (test is IncludedTestConstructor)
            {
                XmlElement signatureRow = GetSignatureRow(testFactory);
                rows.Add(signatureRow);
                rows.Add(GetTestDescriptionTextRow(test));
            }

            // create Html-Row for Parameter Description title
            XmlElement parameterHeadingRow = CreateTableRow();

            parameterHeadingRow.AppendChild(CreateTableCell("Parameter", "header"));
            parameterHeadingRow.AppendChild(CreateTableCell("Type", "header"));
            parameterHeadingRow.AppendChild(CreateTableCell("Description", "header"));
            rows.Add(parameterHeadingRow);

            foreach (TestParameter testParameter in testFactory.Parameters)
            {
                string parameterDescription =
                    test.TestFactory.GetParameterDescription(testParameter.Name);

                XmlElement parameterRow = CreateTableRow();
                rows.Add(parameterRow);

                parameterRow.AppendChild(CreateTableCell(testParameter.Name));
                parameterRow.AppendChild(
                    CreateTableCell(TestImplementationUtils.GetParameterTypeString(testParameter)));
                parameterRow.AppendChild(
                    CreateTableCell(parameterDescription ?? "<no description>"));
            }

            return(rows);
        }