Esempio n. 1
0
 private static Element GetFailMessageElements(IComparerResult comparerResult)
 {
     Element element = new Element(string.Format("{0} {1}", comparerResult.ResultContext, comparerResult.Name));
       element.Add("Added Elements:", comparerResult.AddedItems.Select(added => string.Format("{0} -- {1}", added.ItemName, added.ResultContext)));
       element.Add("Removed Elements:", comparerResult.RemovedItems.Select(removed => string.Format("{0} -- {1}", removed.ItemName, removed.ResultContext)));
       element.Add("Changed Flags:", comparerResult.ChangedFlags.Select(changed => string.Format("{0} from {1} to {2}", changed.PropertyName, changed.ReferenceValue, changed.NewValue)));
       element.Add("Changed Attributes:", comparerResult.ChangedProperties.Select(changed => string.Format("{0} from {1} to {2}", changed.PropertyName, changed.ReferenceValue, changed.NewValue)));
       element.Add("Changed Children:", comparerResult.ComparerResults.Select(GetFailMessageElements));
       return element.HasElements ? element : null;
 }
Esempio n. 2
0
 private void Add(Element element)
 {
     _elements.Add(element);
 }