public void CreateDiffResult()
 {
     _result = new DiffResult();
     _diff = new XmlDiff("<a/>", "<b/>");
     _majorDifference = new Difference(DifferenceType.ElementTagName, XmlNodeType.Element, XmlNodeType.Element);
     _minorDifference = new Difference(DifferenceType.AttributeSequence, XmlNodeType.Comment, XmlNodeType.Comment);
 }
示例#2
0
 public void DifferenceFound(XmlDiff inDiff, Difference difference)
 {
     _identical = false;
     if (difference.MajorDifference) {
         _equal = false;
     }
     _difference = difference;
     if (_stringBuilder.Length == 0) {
         _stringBuilder.Append(inDiff.OptionalDescription);
     }
     _stringBuilder.Append(Environment.NewLine).Append(difference);
 }
 public void CreateMinorDifference()
 {
     DifferenceType id = DifferenceType.AttributeSequence;
     Assert.AreEqual(false, Differences.isMajorDifference(id));
     minorDifference = new Difference(id);
 }
 public FlowControlException(Difference cause)
 {
     this.cause = cause;
 }
示例#5
0
 private bool ContinueComparison(Difference afterDifference) {
     return !afterDifference.MajorDifference;
 }
示例#6
0
 private void DifferenceFound(Difference difference, DiffResult result) {
     result.DifferenceFound(this, difference);
     
     //if (!ContinueComparison(difference)) {
     //    throw new FlowControlException(difference);
     //}
 }
示例#7
0
 public FlowControlException(Difference cause)
 {
     this.cause = cause;
 }