Esempio n. 1
0
 public void SerializeElement(XmlElement xmlElement, IUnitTestElement element)
 {
     xmlElement.SetAttribute(c_elementType, element.GetType().FullName);
     xmlElement.SetAttribute(c_absoluteId, element.Id);
     xmlElement.SetAttribute(c_projectId, ((ITestElement)element).GetProject().AssertNotNull().GetPersistentID());
     xmlElement.SetAttribute(c_text, element.GetPresentation());
 }
Esempio n. 2
0
 public void SerializeElement([NotNull] XmlElement xmlElement, [NotNull] IUnitTestElement element)
 {
     xmlElement.SetAttribute(c_elementType, element.GetType().FullName);
     xmlElement.SetAttribute(c_absoluteId, element.Id);
     xmlElement.SetAttribute(c_projectId, ObjectExtensions.NotNull(((ITestElement)element).GetProject()).GetPersistentID());
     xmlElement.SetAttribute(c_text, element.GetPresentation());
     xmlElement.SetAttribute(c_categories, element.Categories.Select(x => x.Name).Join("|"));
 }
Esempio n. 3
0
        protected virtual void DumpElement(TextWriter file, IUnitTestElement element, ISet <IUnitTestElement> reported, string indent)
        {
            var isReported = reported.Contains(element)
                ? string.Empty
                : "NOT REPORTED";

            file.WriteLine(indent + GetIdString(element) + ":" + isReported);
            file.WriteLine(indent + "  Kind: " + element.Kind);
            file.WriteLine(indent + "  DisplayName: " + element.GetPresentation());
            file.WriteLine(indent + "  Categories: {0}", element.Categories().ToSet().AggregateString(",", (builder, category) => builder.Append(category.Name)));
            file.WriteLine();

            foreach (var testElement in OrderById(element.Children))
            {
                DumpElement(file, testElement, reported, indent + "  ");
            }
        }
 public void SerializeElement(XmlElement xmlElement, IUnitTestElement element)
 {
     xmlElement.SetAttribute(c_elementType, element.GetType().FullName);
       xmlElement.SetAttribute(c_absoluteId, element.Id);
       xmlElement.SetAttribute(c_projectId, ((ITestElement) element).GetProject().AssertNotNull().GetPersistentID());
       xmlElement.SetAttribute(c_text, element.GetPresentation());
       xmlElement.SetAttribute(c_categories, element.Categories.Select(x => x.Name).Join("|"));
 }