public static void AreEqual(TestComponentData expected, TestComponentData actual) { if (expected == null) { Assert.IsNull(actual); return; } Assert.AreEqual(expected.Id, actual.Id); Assert.AreEqual(expected.Name, actual.Name); Assert.AreEqual(expected.CodeReference, actual.CodeReference); Assert.AreEqual(expected.CodeLocation, actual.CodeLocation); AreEqual(expected.Metadata, actual.Metadata); }
private static TestTreeNode BuildNamespaceNode(TestComponentData testData, TestTreeNode parent, TreeBuilderOptions options) { var @namespace = testData.CodeReference.NamespaceName; if (string.IsNullOrEmpty(@namespace)) return parent; if (options.NamespaceHierarchy == NamespaceHierarchy.Flat) { parent = FindOrAddNamespaceNode(parent, @namespace, @namespace); return parent; } var namespaces = @namespace.Split('.'); foreach (var namespaceSegment in namespaces) { if (namespaceSegment.Length == 0) continue; parent = FindOrAddNamespaceNode(parent, @namespace, namespaceSegment); } return parent; }
private static bool FixtureNode(TestComponentData testData) { return testData.CodeReference.MemberName == null && testData.CodeReference.NamespaceName != null; }