Index: Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Forms.Test/TreeNodeInfos/HeightStructuresCalculationGroupContextTreeNodeInfoTest.cs =================================================================== diff -u -rb2f617ad0d8d6457422a569685763b9718740560 -r6b6f344a9cf3e6c44b63320dfa3f5c828c4221d8 --- Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Forms.Test/TreeNodeInfos/HeightStructuresCalculationGroupContextTreeNodeInfoTest.cs (.../HeightStructuresCalculationGroupContextTreeNodeInfoTest.cs) (revision b2f617ad0d8d6457422a569685763b9718740560) +++ Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Forms.Test/TreeNodeInfos/HeightStructuresCalculationGroupContextTreeNodeInfoTest.cs (.../HeightStructuresCalculationGroupContextTreeNodeInfoTest.cs) (revision 6b6f344a9cf3e6c44b63320dfa3f5c828c4221d8) @@ -67,7 +67,7 @@ private const int contextMenuClearAllIndexNestedGroup = 5; private readonly string testDataPath = TestHelper.GetTestDataPath(TestDataPath.Ringtoets.HydraRing.IO, "HydraulicBoundaryLocationReader"); - private IGui guiMock; + private IGui guiStub; private TreeNodeInfo info; private MockRepository mocks; private HeightStructuresPlugin plugin; @@ -76,10 +76,10 @@ public void SetUp() { mocks = new MockRepository(); - guiMock = mocks.Stub(); + guiStub = mocks.Stub(); plugin = new HeightStructuresPlugin { - Gui = guiMock + Gui = guiStub }; info = plugin.GetTreeNodeInfos().First(tni => tni.TagType == typeof(HeightStructuresCalculationGroupContext)); @@ -118,12 +118,12 @@ // Setup var group = new CalculationGroup(); var failureMechanism = new HeightStructuresFailureMechanism(); - var assessmentSectionMock = mocks.Stub(); + var assessmentSectionStub = mocks.Stub(); mocks.ReplayAll(); var groupContext = new HeightStructuresCalculationGroupContext(group, failureMechanism, - assessmentSectionMock); + assessmentSectionStub); // Call var children = info.ChildNodeObjects(groupContext); @@ -136,7 +136,7 @@ public void ChildNodeObjects_GroupWithMixedContents_ReturnChildren() { // Setup - var assessmentSectionMock = mocks.Stub(); + var assessmentSectionStub = mocks.Stub(); var calculationItemMock = mocks.Stub(); mocks.ReplayAll(); @@ -151,7 +151,7 @@ var groupContext = new HeightStructuresCalculationGroupContext(group, failureMechanism, - assessmentSectionMock); + assessmentSectionStub); // Call var children = info.ChildNodeObjects(groupContext).ToArray(); @@ -161,11 +161,11 @@ var calculationGroupContext = (HeightStructuresCalculationGroupContext) children[0]; Assert.AreSame(childGroup, calculationGroupContext.WrappedData); Assert.AreSame(failureMechanism, calculationGroupContext.FailureMechanism); - Assert.AreSame(assessmentSectionMock, calculationGroupContext.AssessmentSection); + Assert.AreSame(assessmentSectionStub, calculationGroupContext.AssessmentSection); Assert.AreSame(calculationItemMock, children[1]); var calculationContext = (HeightStructuresCalculationContext) children[2]; Assert.AreSame(childCalculation, calculationContext.WrappedData); - Assert.AreSame(assessmentSectionMock, calculationContext.AssessmentSection); + Assert.AreSame(assessmentSectionStub, calculationContext.AssessmentSection); } [Test] @@ -174,10 +174,10 @@ // Setup var group = new CalculationGroup(); var failureMechanism = new HeightStructuresFailureMechanism(); - var assessmentSectionMock = mocks.Stub(); + var assessmentSectionStub = mocks.Stub(); var groupContext = new HeightStructuresCalculationGroupContext(group, failureMechanism, - assessmentSectionMock); + assessmentSectionStub); var menuBuilderMock = mocks.StrictMock(); menuBuilderMock.Expect(mb => mb.AddCustomItem(null)).IgnoreArguments().Return(menuBuilderMock); @@ -199,8 +199,8 @@ using (var treeViewControl = new TreeViewControl()) { - guiMock.Expect(cmp => cmp.Get(groupContext, treeViewControl)).Return(menuBuilderMock); - guiMock.Stub(cmp => cmp.ViewCommands).Return(mocks.Stub()); + guiStub.Expect(cmp => cmp.Get(groupContext, treeViewControl)).Return(menuBuilderMock); + guiStub.Stub(cmp => cmp.ViewCommands).Return(mocks.Stub()); mocks.ReplayAll(); @@ -217,16 +217,16 @@ // Setup var group = new CalculationGroup(); var failureMechanism = new HeightStructuresFailureMechanism(); - var assessmentSectionMock = mocks.Stub(); + var assessmentSectionStub = mocks.Stub(); var groupContext = new HeightStructuresCalculationGroupContext(group, failureMechanism, - assessmentSectionMock); + assessmentSectionStub); var menuBuilder = new CustomItemsOnlyContextMenuBuilder(); using (var treeViewControl = new TreeViewControl()) { - guiMock.Expect(g => g.Get(groupContext, treeViewControl)).Return(menuBuilder); - guiMock.Stub(cmp => cmp.ViewCommands).Return(mocks.Stub()); + guiStub.Expect(g => g.Get(groupContext, treeViewControl)).Return(menuBuilder); + guiStub.Stub(cmp => cmp.ViewCommands).Return(mocks.Stub()); mocks.ReplayAll(); @@ -281,17 +281,17 @@ var group = new CalculationGroup(); var failureMechanism = new HeightStructuresFailureMechanism(); failureMechanism.HeightStructures.Add(new TestHeightStructure()); - var assessmentSectionMock = mocks.Stub(); - assessmentSectionMock.HydraulicBoundaryDatabase = new HydraulicBoundaryDatabase(); + var assessmentSectionStub = mocks.Stub(); + assessmentSectionStub.HydraulicBoundaryDatabase = new HydraulicBoundaryDatabase(); var groupContext = new HeightStructuresCalculationGroupContext(group, failureMechanism, - assessmentSectionMock); + assessmentSectionStub); var menuBuilder = new CustomItemsOnlyContextMenuBuilder(); using (var treeViewControl = new TreeViewControl()) { - guiMock.Expect(g => g.Get(groupContext, treeViewControl)).Return(menuBuilder); - guiMock.Stub(cmp => cmp.ViewCommands).Return(mocks.Stub()); + guiStub.Expect(g => g.Get(groupContext, treeViewControl)).Return(menuBuilder); + guiStub.Stub(cmp => cmp.ViewCommands).Return(mocks.Stub()); mocks.ReplayAll(); @@ -316,13 +316,13 @@ var group = new CalculationGroup(); var parentGroup = new CalculationGroup(); var failureMechanism = new HeightStructuresFailureMechanism(); - var assessmentSectionMock = mocks.Stub(); + var assessmentSectionStub = mocks.Stub(); var groupContext = new HeightStructuresCalculationGroupContext(group, failureMechanism, - assessmentSectionMock); + assessmentSectionStub); var parentGroupContext = new HeightStructuresCalculationGroupContext(parentGroup, failureMechanism, - assessmentSectionMock); + assessmentSectionStub); var menuBuilderMock = mocks.StrictMock(); menuBuilderMock.Expect(mb => mb.AddCustomItem(null)).IgnoreArguments().Return(menuBuilderMock); @@ -343,7 +343,7 @@ using (var treeViewControl = new TreeViewControl()) { - guiMock.Expect(cmp => cmp.Get(groupContext, treeViewControl)).Return(menuBuilderMock); + guiStub.Expect(cmp => cmp.Get(groupContext, treeViewControl)).Return(menuBuilderMock); mocks.ReplayAll(); @@ -361,20 +361,20 @@ var group = new CalculationGroup(); var parentGroup = new CalculationGroup(); var failureMechanism = new HeightStructuresFailureMechanism(); - var assessmentSectionMock = mocks.Stub(); + var assessmentSectionStub = mocks.Stub(); var groupContext = new HeightStructuresCalculationGroupContext(group, failureMechanism, - assessmentSectionMock); + assessmentSectionStub); var parentGroupContext = new HeightStructuresCalculationGroupContext(parentGroup, failureMechanism, - assessmentSectionMock); + assessmentSectionStub); var menuBuilder = new CustomItemsOnlyContextMenuBuilder(); mocks.ReplayAll(); using (var treeViewControl = new TreeViewControl()) { - guiMock.Expect(g => g.Get(groupContext, treeViewControl)).Return(menuBuilder); + guiStub.Expect(g => g.Get(groupContext, treeViewControl)).Return(menuBuilder); // Call using (ContextMenuStrip menu = info.ContextMenuStrip(groupContext, parentGroupContext, treeViewControl)) @@ -415,7 +415,7 @@ { // Setup var failureMechanism = new HeightStructuresFailureMechanism(); - var assessmentSectionMock = mocks.Stub(); + var assessmentSectionStub = mocks.Stub(); var group = new CalculationGroup { @@ -427,14 +427,14 @@ var nodeData = new HeightStructuresCalculationGroupContext(group, failureMechanism, - assessmentSectionMock); + assessmentSectionStub); var menuBuilder = new CustomItemsOnlyContextMenuBuilder(); using (var treeViewControl = new TreeViewControl()) { - guiMock.Expect(g => g.Get(nodeData, treeViewControl)).Return(menuBuilder); - guiMock.Stub(cmp => cmp.ViewCommands).Return(mocks.Stub()); + guiStub.Expect(g => g.Get(nodeData, treeViewControl)).Return(menuBuilder); + guiStub.Stub(cmp => cmp.ViewCommands).Return(mocks.Stub()); mocks.ReplayAll(); @@ -470,19 +470,18 @@ })); failureMechanism.CalculationsGroup.Children.Add(new HeightStructuresCalculation()); - var assessmentSectionMock = mocks.Stub(); - assessmentSectionMock.HydraulicBoundaryDatabase = null; + var assessmentSectionStub = mocks.Stub(); var nodeData = new HeightStructuresCalculationGroupContext(group, failureMechanism, - assessmentSectionMock); + assessmentSectionStub); var menuBuilder = new CustomItemsOnlyContextMenuBuilder(); using (var treeViewControl = new TreeViewControl()) { - guiMock.Expect(g => g.Get(nodeData, treeViewControl)).Return(menuBuilder); - guiMock.Stub(cmp => cmp.ViewCommands).Return(mocks.Stub()); + guiStub.Expect(g => g.Get(nodeData, treeViewControl)).Return(menuBuilder); + guiStub.Stub(cmp => cmp.ViewCommands).Return(mocks.Stub()); mocks.ReplayAll(); @@ -518,22 +517,22 @@ })); failureMechanism.CalculationsGroup.Children.Add(new HeightStructuresCalculation()); - var assessmentSectionMock = mocks.Stub(); - assessmentSectionMock.HydraulicBoundaryDatabase = new HydraulicBoundaryDatabase(); - + var assessmentSectionStub = mocks.Stub(); var nodeData = new HeightStructuresCalculationGroupContext(group, failureMechanism, - assessmentSectionMock); + assessmentSectionStub); var menuBuilder = new CustomItemsOnlyContextMenuBuilder(); using (var treeViewControl = new TreeViewControl()) { - guiMock.Expect(g => g.Get(nodeData, treeViewControl)).Return(menuBuilder); - guiMock.Stub(cmp => cmp.ViewCommands).Return(mocks.Stub()); + guiStub.Expect(g => g.Get(nodeData, treeViewControl)).Return(menuBuilder); + guiStub.Stub(cmp => cmp.ViewCommands).Return(mocks.Stub()); mocks.ReplayAll(); + assessmentSectionStub.HydraulicBoundaryDatabase = new HydraulicBoundaryDatabase(); + // Call using (ContextMenuStrip contextMenu = info.ContextMenuStrip(nodeData, null, treeViewControl)) { @@ -575,22 +574,22 @@ })); failureMechanism.CalculationsGroup.Children.Add(new HeightStructuresCalculation()); - var assessmentSectionMock = mocks.Stub(); - assessmentSectionMock.HydraulicBoundaryDatabase = hydraulicBoundaryDatabase; - + var assessmentSectionStub = mocks.Stub(); var nodeData = new HeightStructuresCalculationGroupContext(group, failureMechanism, - assessmentSectionMock); + assessmentSectionStub); var menuBuilder = new CustomItemsOnlyContextMenuBuilder(); using (var treeViewControl = new TreeViewControl()) { - guiMock.Expect(g => g.Get(nodeData, treeViewControl)).Return(menuBuilder); - guiMock.Stub(cmp => cmp.ViewCommands).Return(mocks.Stub()); + guiStub.Expect(g => g.Get(nodeData, treeViewControl)).Return(menuBuilder); + guiStub.Stub(cmp => cmp.ViewCommands).Return(mocks.Stub()); mocks.ReplayAll(); + assessmentSectionStub.HydraulicBoundaryDatabase = hydraulicBoundaryDatabase; + // Call using (ContextMenuStrip menu = info.ContextMenuStrip(nodeData, null, treeViewControl)) { @@ -608,7 +607,7 @@ { // Setup var failureMechanism = new HeightStructuresFailureMechanism(); - var assessmentSectionMock = mocks.Stub(); + var assessmentSectionStub = mocks.Stub(); var group = new CalculationGroup { @@ -620,14 +619,14 @@ var nodeData = new HeightStructuresCalculationGroupContext(group, failureMechanism, - assessmentSectionMock); + assessmentSectionStub); var menuBuilder = new CustomItemsOnlyContextMenuBuilder(); using (var treeViewControl = new TreeViewControl()) { - guiMock.Expect(g => g.Get(nodeData, treeViewControl)).Return(menuBuilder); - guiMock.Stub(cmp => cmp.ViewCommands).Return(mocks.Stub()); + guiStub.Expect(g => g.Get(nodeData, treeViewControl)).Return(menuBuilder); + guiStub.Stub(cmp => cmp.ViewCommands).Return(mocks.Stub()); mocks.ReplayAll(); @@ -663,18 +662,18 @@ })); failureMechanism.CalculationsGroup.Children.Add(new HeightStructuresCalculation()); - var assessmentSectionMock = mocks.Stub(); + var assessmentSectionStub = mocks.Stub(); var nodeData = new HeightStructuresCalculationGroupContext(group, failureMechanism, - assessmentSectionMock); + assessmentSectionStub); var menuBuilder = new CustomItemsOnlyContextMenuBuilder(); using (var treeViewControl = new TreeViewControl()) { - guiMock.Expect(g => g.Get(nodeData, treeViewControl)).Return(menuBuilder); - guiMock.Stub(cmp => cmp.ViewCommands).Return(mocks.Stub()); + guiStub.Expect(g => g.Get(nodeData, treeViewControl)).Return(menuBuilder); + guiStub.Stub(cmp => cmp.ViewCommands).Return(mocks.Stub()); mocks.ReplayAll(); @@ -710,22 +709,22 @@ })); failureMechanism.CalculationsGroup.Children.Add(new HeightStructuresCalculation()); - var assessmentSectionMock = mocks.Stub(); - assessmentSectionMock.HydraulicBoundaryDatabase = new HydraulicBoundaryDatabase(); - + var assessmentSectionStub = mocks.Stub(); var nodeData = new HeightStructuresCalculationGroupContext(group, failureMechanism, - assessmentSectionMock); + assessmentSectionStub); var menuBuilder = new CustomItemsOnlyContextMenuBuilder(); using (var treeViewControl = new TreeViewControl()) { - guiMock.Expect(g => g.Get(nodeData, treeViewControl)).Return(menuBuilder); - guiMock.Stub(cmp => cmp.ViewCommands).Return(mocks.Stub()); + guiStub.Expect(g => g.Get(nodeData, treeViewControl)).Return(menuBuilder); + guiStub.Stub(cmp => cmp.ViewCommands).Return(mocks.Stub()); mocks.ReplayAll(); + assessmentSectionStub.HydraulicBoundaryDatabase = new HydraulicBoundaryDatabase(); + // Call using (ContextMenuStrip contextMenu = info.ContextMenuStrip(nodeData, null, treeViewControl)) { @@ -767,22 +766,22 @@ })); failureMechanism.CalculationsGroup.Children.Add(new HeightStructuresCalculation()); - var assessmentSectionMock = mocks.Stub(); - assessmentSectionMock.HydraulicBoundaryDatabase = hydraulicBoundaryDatabase; - + var assessmentSectionStub = mocks.Stub(); var nodeData = new HeightStructuresCalculationGroupContext(group, failureMechanism, - assessmentSectionMock); + assessmentSectionStub); var menuBuilder = new CustomItemsOnlyContextMenuBuilder(); using (var treeViewControl = new TreeViewControl()) { - guiMock.Expect(g => g.Get(nodeData, treeViewControl)).Return(menuBuilder); - guiMock.Stub(cmp => cmp.ViewCommands).Return(mocks.Stub()); + guiStub.Expect(g => g.Get(nodeData, treeViewControl)).Return(menuBuilder); + guiStub.Stub(cmp => cmp.ViewCommands).Return(mocks.Stub()); mocks.ReplayAll(); + assessmentSectionStub.HydraulicBoundaryDatabase = hydraulicBoundaryDatabase; + // Call using (ContextMenuStrip menu = info.ContextMenuStrip(nodeData, null, treeViewControl)) { @@ -835,23 +834,23 @@ var hydraulicBoundaryDatabaseStub = mocks.Stub(); hydraulicBoundaryDatabaseStub.FilePath = validFilePath; - var assessmentSectionMock = mocks.Stub(); - assessmentSectionMock.HydraulicBoundaryDatabase = hydraulicBoundaryDatabaseStub; - + var assessmentSectionStub = mocks.Stub(); var groupContext = new HeightStructuresCalculationGroupContext(failureMechanism.CalculationsGroup, failureMechanism, - assessmentSectionMock); + assessmentSectionStub); using (var treeViewControl = new TreeViewControl()) { - guiMock.Expect(g => g.Get(groupContext, treeViewControl)).Return(menuBuilder); - guiMock.Expect(g => g.MainWindow).Return(mainWindowStub); - guiMock.Stub(cmp => cmp.ViewCommands).Return(mocks.Stub()); + guiStub.Expect(g => g.Get(groupContext, treeViewControl)).Return(menuBuilder); + guiStub.Expect(g => g.MainWindow).Return(mainWindowStub); + guiStub.Stub(cmp => cmp.ViewCommands).Return(mocks.Stub()); mocks.ReplayAll(); - plugin.Gui = guiMock; + assessmentSectionStub.HydraulicBoundaryDatabase = hydraulicBoundaryDatabaseStub; + plugin.Gui = guiStub; + DialogBoxHandler = (name, wnd) => { // Expect an activity dialog which is automatically closed @@ -921,22 +920,22 @@ var hydraulicBoundaryDatabaseStub = mocks.Stub(); hydraulicBoundaryDatabaseStub.FilePath = validFilePath; - var assessmentSectionMock = mocks.Stub(); - assessmentSectionMock.HydraulicBoundaryDatabase = hydraulicBoundaryDatabaseStub; - + var assessmentSectionStub = mocks.Stub(); var groupContext = new HeightStructuresCalculationGroupContext(failureMechanism.CalculationsGroup, failureMechanism, - assessmentSectionMock); + assessmentSectionStub); using (var treeViewControl = new TreeViewControl()) { - guiMock.Expect(g => g.Get(groupContext, treeViewControl)).Return(menuBuilder); - guiMock.Stub(cmp => cmp.ViewCommands).Return(mocks.Stub()); + guiStub.Expect(g => g.Get(groupContext, treeViewControl)).Return(menuBuilder); + guiStub.Stub(cmp => cmp.ViewCommands).Return(mocks.Stub()); mocks.ReplayAll(); - plugin.Gui = guiMock; + assessmentSectionStub.HydraulicBoundaryDatabase = hydraulicBoundaryDatabaseStub; + plugin.Gui = guiStub; + using (ContextMenuStrip contextMenu = info.ContextMenuStrip(groupContext, null, treeViewControl)) { // Call @@ -962,10 +961,10 @@ var menuBuilder = new CustomItemsOnlyContextMenuBuilder(); var group = new CalculationGroup(); var failureMechanism = new HeightStructuresFailureMechanism(); - var assessmentSectionMock = mocks.Stub(); + var assessmentSectionStub = mocks.Stub(); var nodeData = new HeightStructuresCalculationGroupContext(group, failureMechanism, - assessmentSectionMock); + assessmentSectionStub); var calculationGroup = new CalculationGroup { Name = "Nieuwe map" @@ -976,8 +975,8 @@ using (var treeViewControl = new TreeViewControl()) { - guiMock.Expect(cmp => cmp.Get(nodeData, treeViewControl)).Return(menuBuilder); - guiMock.Stub(cmp => cmp.ViewCommands).Return(mocks.Stub()); + guiStub.Expect(cmp => cmp.Get(nodeData, treeViewControl)).Return(menuBuilder); + guiStub.Stub(cmp => cmp.ViewCommands).Return(mocks.Stub()); mocks.ReplayAll(); @@ -1009,10 +1008,10 @@ var menuBuilder = new CustomItemsOnlyContextMenuBuilder(); var group = new CalculationGroup(); var failureMechanism = new HeightStructuresFailureMechanism(); - var assessmentSectionMock = mocks.Stub(); + var assessmentSectionStub = mocks.Stub(); var nodeData = new HeightStructuresCalculationGroupContext(group, failureMechanism, - assessmentSectionMock); + assessmentSectionStub); var calculation = new HeightStructuresCalculation { Name = "Nieuwe berekening" @@ -1022,8 +1021,8 @@ using (var treeViewControl = new TreeViewControl()) { - guiMock.Expect(cmp => cmp.Get(nodeData, treeViewControl)).Return(menuBuilder); - guiMock.Stub(cmp => cmp.ViewCommands).Return(mocks.Stub()); + guiStub.Expect(cmp => cmp.Get(nodeData, treeViewControl)).Return(menuBuilder); + guiStub.Stub(cmp => cmp.ViewCommands).Return(mocks.Stub()); mocks.ReplayAll(); @@ -1055,10 +1054,10 @@ var menuBuilder = new CustomItemsOnlyContextMenuBuilder(); var group = new CalculationGroup(); var failureMechanism = new HeightStructuresFailureMechanism(); - var assessmentSectionMock = mocks.Stub(); + var assessmentSectionStub = mocks.Stub(); var nodeData = new HeightStructuresCalculationGroupContext(group, failureMechanism, - assessmentSectionMock); + assessmentSectionStub); var calculation = new HeightStructuresCalculation { Name = "Nieuwe berekening" @@ -1071,15 +1070,15 @@ using (var treeViewControl = new TreeViewControl()) { - guiMock.Expect(cmp => cmp.Get(nodeData, treeViewControl)).Return(menuBuilder); - guiMock.Stub(cmp => cmp.ViewCommands).Return(viewCommandsMock); + guiStub.Expect(cmp => cmp.Get(nodeData, treeViewControl)).Return(menuBuilder); + guiStub.Stub(cmp => cmp.ViewCommands).Return(viewCommandsMock); mocks.ReplayAll(); group.Children.Add(calculation); nodeData.Attach(observerMock); - plugin.Gui = guiMock; + plugin.Gui = guiStub; DialogBoxHandler = (name, wnd) => { @@ -1104,15 +1103,15 @@ // Setup var observerMock = mocks.StrictMock(); var failureMechanism = new HeightStructuresFailureMechanism(); - var assessmentSectionMock = mocks.Stub(); + var assessmentSectionStub = mocks.Stub(); var group = new CalculationGroup(); var parentGroup = new CalculationGroup(); var nodeData = new HeightStructuresCalculationGroupContext(group, failureMechanism, - assessmentSectionMock); + assessmentSectionStub); var parentNodeData = new HeightStructuresCalculationGroupContext(parentGroup, failureMechanism, - assessmentSectionMock); + assessmentSectionStub); observerMock.Expect(o => o.UpdateObserver()); @@ -1136,16 +1135,16 @@ { // Setup var observerMock = mocks.StrictMock(); - var assessmentSectionMock = mocks.Stub(); + var assessmentSectionStub = mocks.Stub(); var failureMechanism = new HeightStructuresFailureMechanism(); var group = new CalculationGroup(); var parentGroup = new CalculationGroup(); var nodeData = new HeightStructuresCalculationGroupContext(group, failureMechanism, - assessmentSectionMock); + assessmentSectionStub); var parentNodeData = new HeightStructuresCalculationGroupContext(parentGroup, failureMechanism, - assessmentSectionMock); + assessmentSectionStub); var calculation = new HeightStructuresCalculation(); observerMock.Expect(o => o.UpdateObserver());