public void RemoveEngineTest() { var parent = new DockPaneLayoutEngine(new DockPaneBase()); var target = new DockPaneLayoutEngine(new DockPaneBase()); var layout = new DockPaneLayoutEngine(new DockPaneBase()); parent.AddEngine(target); target.Parent = parent; target.AddEngine(layout); layout.Parent = target; target.RemoveEngine(layout); var parent_acc = DockPaneLayoutEngine_Accessor.AttachShadow(parent); Assert.IsTrue(parent_acc.OwnNodes.Contains(parent)); Assert.IsTrue(parent_acc.OwnNodes.Contains(target)); Assert.IsFalse(parent_acc.OwnNodes.Contains(layout)); Assert.AreEqual(2, parent_acc.OwnNodes.Count); var target_acc = DockPaneLayoutEngine_Accessor.AttachShadow(target); Assert.IsTrue(target_acc.OwnNodes.Contains(target)); Assert.IsFalse(target_acc.OwnNodes.Contains(layout)); Assert.AreEqual(1, target_acc.OwnNodes.Count); }