https://bugzilla.novell.com/show_bug.cgi?id=666872

https://bugzilla.novell.com/show_bug.cgi?id=666872#c0


           Summary: XElement.Changed event is not triggered during an
                    XElement Add
    Classification: Mono
           Product: Mono: Class Libraries
           Version: unspecified
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: Sys.XML
        AssignedTo: [email protected]
        ReportedBy: [email protected]
         QAContact: [email protected]
          Found By: ---
           Blocker: ---


User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 6.1; en-GB; rv:1.9.2.13)
Gecko/20101203 Firefox/3.6.13 (.NET CLR 3.5.30729)

The code below fails:

        [Test]
        public void Add_ToRootNode_ChangeTriggers ()
        {
            var inputXml = "<root><a><b /></a></root>";
            var reader = XmlReader.Create (new StringReader (inputXml), new
XmlReaderSettings ());
            XDocument doc = XDocument.Load (reader);
            var eventHandler = new EventHandler();
            doc.Root.Changed += eventHandler.OnChanged;

            var newElement = XElement.Parse("<c/>");

            doc.Root.Add(newElement);

            Assert.IsTrue(eventHandler.HasChanged, "OnChanged not triggered");
        }



Reproducible: Always

Steps to Reproduce:
See Details

-- 
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
_______________________________________________
mono-bugs maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-bugs

Reply via email to