private static BaseProperties ExtractSuiteBasePropertiesClass(XElement node)
        {
            string     dId            = node.Attribute(NUnitXmlAttributeNames.Id).Value;
            string     dName          = node.Attribute(NUnitXmlAttributeNames.Name).Value;
            string     dFullname      = node.Attribute(NUnitXmlAttributeNames.Fullname).Value;
            var        dRunstate      = ExtractRunState(node);
            const char apo            = '\'';
            var        tcs            = node.Attribute(NUnitXmlAttributeNames.Testcasecount)?.Value.Trim(apo);
            int        dTestcasecount = int.Parse(tcs ?? "1", CultureInfo.InvariantCulture);
            var        bp             = new BaseProperties(dId, dName, dFullname, dTestcasecount, dRunstate);

            foreach (var propnode in node.Elements("properties").Elements("property"))
            {
                var prop = new NUnitProperty(
                    propnode.Attribute("name").Value,
                    propnode.Attribute("value").Value);
                bp.Properties.Add(prop);
            }
            return(bp);
        }
예제 #2
0
 public void Add(NUnitProperty p) => TheProperties.Add(p);