public static ITestConfigurationProvider ReadConfiguration(XElement node) { if (!node.Name.LocalName.Equals("TestConfiguration")) { throw new InternalErrorException(); } var name = node.Attribute("Name").Value; var config = new ConfigurationWrapper(name); foreach (var feature in node.Elements("TestFeature")) { config.Add(ReadTestFeature(feature)); } foreach (var category in node.Elements("TestCategory")) { config.Add(ReadTestCategory(category)); } return(config); }