Index: Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/TreeNodeInfos/PipingCalculationGroupContextTreeNodeInfoTest.cs =================================================================== diff -u -r8c60e937f4b8009fea80f3702879e100fe03b63f -r28d7428ed418504296e2c686958a4500b910cc32 --- Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/TreeNodeInfos/PipingCalculationGroupContextTreeNodeInfoTest.cs (.../PipingCalculationGroupContextTreeNodeInfoTest.cs) (revision 8c60e937f4b8009fea80f3702879e100fe03b63f) +++ Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/TreeNodeInfos/PipingCalculationGroupContextTreeNodeInfoTest.cs (.../PipingCalculationGroupContextTreeNodeInfoTest.cs) (revision 28d7428ed418504296e2c686958a4500b910cc32) @@ -166,7 +166,7 @@ public void ChildNodeObjects_GroupWithMixedContents_ReturnChildren() { // Setup - var calculationItem = mocks.StrictMock(); + var calculationItem = mocks.StrictMock(); var childCalculation = new PipingCalculation(new GeneralPipingInput(), new SemiProbabilisticPipingInput()); @@ -708,7 +708,7 @@ pipingFailureMechanismMock, assessmentSectionMock); - var calculationItem = mocks.Stub(); + var calculationItem = mocks.Stub(); calculationItem.Expect(ci => ci.Name).Return("Nieuwe map"); var observer = mocks.StrictMock(); @@ -759,7 +759,7 @@ pipingFailureMechanismMock, assessmentSectionMock); - var calculationItem = mocks.Stub(); + var calculationItem = mocks.Stub(); calculationItem.Expect(ci => ci.Name).Return("Nieuwe berekening"); var observer = mocks.StrictMock(); @@ -977,17 +977,12 @@ messageBox.ClickCancel(); } }; - - // Precondition - Assert.IsTrue(group.HasOutput); - var contextMenu = info.ContextMenuStrip(nodeData, null, treeViewControl); // Call contextMenu.Items[contextMenuClearOutputIndex].PerformClick(); // Assert - Assert.AreNotEqual(confirm, group.HasOutput); Assert.AreNotEqual(confirm, calculation1.HasOutput); Assert.AreNotEqual(confirm, calculation2.HasOutput); @@ -1530,7 +1525,7 @@ [Values(PipingCalculationType.Calculation, PipingCalculationType.Group)] PipingCalculationType draggedItemType) { // Setup - ICalculationItem draggedItem; + ICalculationBase draggedItem; object draggedItemContext; var failureMechanism = new PipingFailureMechanism(); @@ -1577,7 +1572,7 @@ [Values(PipingCalculationType.Calculation, PipingCalculationType.Group)] PipingCalculationType draggedItemType) { // Setup - ICalculationItem draggedItem; + ICalculationBase draggedItem; object draggedItemContext; var targetFailureMechanism = new PipingFailureMechanism(); @@ -1629,7 +1624,7 @@ var pipingFailureMechanismMock = mocks.StrictMock(); var assessmentSection = mocks.StrictMock(); - ICalculationItem draggedItem; + ICalculationBase draggedItem; object draggedItemContext; CreatePipingCalculationAndContext(draggedItemType, out draggedItem, out draggedItemContext, pipingFailureMechanismMock, assessmentSection); @@ -1681,11 +1676,11 @@ var assessmentSection = mocks.StrictMock(); const string name = "Very cool name"; - ICalculationItem draggedItem; + ICalculationBase draggedItem; object draggedItemContext; CreatePipingCalculationAndContext(draggedItemType, out draggedItem, out draggedItemContext, pipingFailureMechanismMock, assessmentSection, name); - var existingItemStub = mocks.Stub(); + var existingItemStub = mocks.Stub(); existingItemStub.Stub(i => i.Name).Return(""); PipingCalculationGroup originalOwnerGroup; @@ -1730,7 +1725,7 @@ var pipingFailureMechanismMock = mocks.StrictMock(); var assessmentSection = mocks.StrictMock(); - ICalculationItem draggedItem; + ICalculationBase draggedItem; object draggedItemContext; CreatePipingCalculationAndContext(draggedItemType, out draggedItem, out draggedItemContext, pipingFailureMechanismMock, assessmentSection); @@ -1743,7 +1738,7 @@ PipingCalculationGroupContext newOwnerGroupContext; CreatePipingCalculationGroupAndContext(out newOwnerGroup, out newOwnerGroupContext, pipingFailureMechanismMock, assessmentSection); - var sameNamedItem = mocks.Stub(); + var sameNamedItem = mocks.Stub(); sameNamedItem.Stub(i => i.Name).Return(draggedItem.Name); var originalOwnerObserver = mocks.StrictMock(); @@ -1815,16 +1810,16 @@ } /// - /// Creates an instance of and the corresponding context. + /// Creates an instance of and the corresponding context. /// - /// Defines the implementation of to be constructed. + /// Defines the implementation of to be constructed. /// Output: The concrete create class based on . /// Output: The corresponding with . /// The piping failure mechanism the item and context belong to. /// The assessment section the item and context belong to. /// Optional: The name of . /// - private static void CreatePipingCalculationAndContext(PipingCalculationType type, out ICalculationItem data, out object dataContext, PipingFailureMechanism pipingFailureMechanism, IAssessmentSection assessmentSection, string initialName = null) + private static void CreatePipingCalculationAndContext(PipingCalculationType type, out ICalculationBase data, out object dataContext, PipingFailureMechanism pipingFailureMechanism, IAssessmentSection assessmentSection, string initialName = null) { switch (type) { @@ -1876,7 +1871,7 @@ } /// - /// Type indicator for implementations of to be created in a test. + /// Type indicator for implementations of to be created in a test. /// public enum PipingCalculationType {