public XElement CreateTestResultDetailsXElement(
ITestResult testResult,
IXMLElementsStruct xmlStruct)
{
if (0 == testResult.Details.Count) {
return null;
}
var testResultDetailsElement =
new XElement("details",
from testResultDetail in testResult.Details
select new XElement("detail",
CreateXattribute("name", testResultDetail.Name),
CreateXattribute(xmlStruct.TimeSpentAttribute, testResultDetail.Timestamp),
CreateXattribute("status", testResultDetail.DetailStatus)
)
);
return testResultDetailsElement;
}