private void AppendTestConstructorTitle([NotNull] IncludedTestConstructor test) { XmlElement row = CreateTableRow(); XmlElement cell = CreateTableCell(test.Title, 3, test.Obsolete ? "obsoleteConstructorTitle" : "constructorTitle"); row.AppendChild(cell); cell.AppendChild(CreateAnchor(test.Key)); _htmlTable.AppendChild(row); }
public void IncludeConstructor([NotNull] IncludedTestConstructor testConstructor) { Assert.ArgumentNotNull(testConstructor, nameof(testConstructor)); Assert.ArgumentCondition(_testType == testConstructor.TestType, "Test constructor does not belong to this test class"); if (_testConstructors.Contains(testConstructor)) { return; } _testConstructors.Add(testConstructor); }
public void IncludeTest(Type testType, int constructorIndex) { var newTestClass = false; IncludedTestClass testClass; if (!_includedTestClasses.TryGetValue(testType, out testClass)) { testClass = new IncludedTestClass(testType); if (!_includeObsolete && testClass.Obsolete) { return; } if (testClass.InternallyUsed) { return; } // this test class is to be added, if the constructor is not obsolete newTestClass = true; } if (testClass.Obsolete) { return; } IncludedTestConstructor testConstructor = testClass.CreateTestConstructor(constructorIndex); if (!_includeObsolete && testConstructor.Obsolete) { return; } if (testConstructor.InternallyUsed) { return; } testClass.IncludeConstructor(testConstructor); if (newTestClass) { _includedTestClasses.Add(testType, testClass); } }