예제 #1
0
 public void Handle(object sender, XmlDifferentEventArgs args)
 {
     if (nextCallback >= expectedCallbacks.Count)
     {
         Assert.Fail("Unexpected callback: {0}", args);
     }
     Assert.AreEqual(expectedCallbacks[nextCallback], args.ToString());
     nextCallback++;
     args.Handled = true;
 }
예제 #2
0
        private void HandleDifference(XmlDifferenceType differenceType, string expectedXPath, string actualXPath, string valueExpected, string valueActual)
        {
            XmlDifferentEventArgs args = new XmlDifferentEventArgs(differenceType, expectedXPath, actualXPath, valueExpected, valueActual);

            if (DifferenceFound != null)
            {
                DifferenceFound(this, args);
            }
            if (!args.Handled)
            {
                throw new XmlDifferentException(args.ToString());
            }
        }