public void AddAndRemoveEventListnersXElementAddRemoveEventListners() { XDocument xDoc = new XDocument(InputSpace.GetElement(10, 10)); EventsHelper docHelper = new EventsHelper(xDoc); EventsHelper eHelper = new EventsHelper(xDoc.Root); xDoc.Root.Add(new XElement("Add", "Me")); docHelper.Verify(XObjectChange.Add); eHelper.Verify(XObjectChange.Add); eHelper.RemoveListners(); xDoc.Root.Add(new XComment("Comment")); eHelper.Verify(0); docHelper.Verify(XObjectChange.Add); }