Index: Ringtoets/StabilityPointStructures/src/Ringtoets.StabilityPointStructures.Forms/PresentationObjects/StabilityPointStructuresContext.cs =================================================================== diff -u -rfe8e564d0114932ff274b9c4e3066639ae2f02f1 -r193e94f5864e02ed187eb5f69e29faf1305e4072 --- Ringtoets/StabilityPointStructures/src/Ringtoets.StabilityPointStructures.Forms/PresentationObjects/StabilityPointStructuresContext.cs (.../StabilityPointStructuresContext.cs) (revision fe8e564d0114932ff274b9c4e3066639ae2f02f1) +++ Ringtoets/StabilityPointStructures/src/Ringtoets.StabilityPointStructures.Forms/PresentationObjects/StabilityPointStructuresContext.cs (.../StabilityPointStructuresContext.cs) (revision 193e94f5864e02ed187eb5f69e29faf1305e4072) @@ -35,14 +35,14 @@ /// Presentation object representing all required stability point structures input knowledge to configure and create /// related objects. It will delegate observable behavior to the wrapped data object. /// - public class StabilityPointStructuresContext : ObservableWrappedObjectContextBase where T : IObservable + public abstract class StabilityPointStructuresContext : ObservableWrappedObjectContextBase where T : IObservable { /// /// Initializes a new instance of the class. /// /// The concrete data instance wrapped by this context object. /// The failure mechanism which the context belongs to. - /// The assessment section which the context belongs to. + /// The assessment section which belongs to. /// When any input argument is null. protected StabilityPointStructuresContext( T wrappedData, @@ -70,7 +70,7 @@ public StabilityPointStructuresFailureMechanism FailureMechanism { get; private set; } /// - /// Gets the assessment section which the context belongs to. + /// Gets the assessment section which belongs to. /// public IAssessmentSection AssessmentSection { get; private set; } Index: Ringtoets/StabilityPointStructures/src/Ringtoets.StabilityPointStructures.Plugin/StabilityPointStructuresPlugin.cs =================================================================== diff -u -ref9afe23c21b5d7f43619638a593b8869ec15793 -r193e94f5864e02ed187eb5f69e29faf1305e4072 --- Ringtoets/StabilityPointStructures/src/Ringtoets.StabilityPointStructures.Plugin/StabilityPointStructuresPlugin.cs (.../StabilityPointStructuresPlugin.cs) (revision ef9afe23c21b5d7f43619638a593b8869ec15793) +++ Ringtoets/StabilityPointStructures/src/Ringtoets.StabilityPointStructures.Plugin/StabilityPointStructuresPlugin.cs (.../StabilityPointStructuresPlugin.cs) (revision 193e94f5864e02ed187eb5f69e29faf1305e4072) @@ -264,7 +264,7 @@ { CalculationGroup group = context.WrappedData; var builder = new RingtoetsContextMenuBuilder(Gui.Get(context, treeViewControl)); - var isNestedGroup = parentData is StabilityPointStructuresCalculationGroupContext; + bool isNestedGroup = parentData is StabilityPointStructuresCalculationGroupContext; StrictContextMenuItem generateCalculationsItem = CreateGenerateCalculationsItem(context); Index: Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.Data.Test/StabilityPointStructuresCalculationTest.cs =================================================================== diff -u -rfe8e564d0114932ff274b9c4e3066639ae2f02f1 -r193e94f5864e02ed187eb5f69e29faf1305e4072 --- Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.Data.Test/StabilityPointStructuresCalculationTest.cs (.../StabilityPointStructuresCalculationTest.cs) (revision fe8e564d0114932ff274b9c4e3066639ae2f02f1) +++ Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.Data.Test/StabilityPointStructuresCalculationTest.cs (.../StabilityPointStructuresCalculationTest.cs) (revision 193e94f5864e02ed187eb5f69e29faf1305e4072) @@ -141,7 +141,7 @@ { // Setup var calculation = new StabilityPointStructuresCalculation(); - var inputParameters = calculation.InputParameters; + StabilityPointStructuresInput inputParameters = calculation.InputParameters; // Call ICalculationInput input = calculation.GetObservableInput(); Index: Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.Forms.Test/PresentationObjects/StabilityPointStructuresContextTest.cs =================================================================== diff -u -rfe8e564d0114932ff274b9c4e3066639ae2f02f1 -r193e94f5864e02ed187eb5f69e29faf1305e4072 --- Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.Forms.Test/PresentationObjects/StabilityPointStructuresContextTest.cs (.../StabilityPointStructuresContextTest.cs) (revision fe8e564d0114932ff274b9c4e3066639ae2f02f1) +++ Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.Forms.Test/PresentationObjects/StabilityPointStructuresContextTest.cs (.../StabilityPointStructuresContextTest.cs) (revision 193e94f5864e02ed187eb5f69e29faf1305e4072) @@ -40,8 +40,7 @@ { // Setup var mockRepository = new MockRepository(); - var assessmentSectionMock = mockRepository.StrictMock(); - assessmentSectionMock.Expect(asm => asm.HydraulicBoundaryDatabase).Return(null); + var assessmentSectionMock = mockRepository.Stub(); mockRepository.ReplayAll(); var target = new ObservableObject(); @@ -64,7 +63,7 @@ { // Setup var mockRepository = new MockRepository(); - var assessmentSectionMock = mockRepository.StrictMock(); + var assessmentSectionMock = mockRepository.Stub(); mockRepository.ReplayAll(); var observableObject = new ObservableObject(); @@ -101,8 +100,8 @@ hydraulicBoundaryDatabase.Locations.Add(new HydraulicBoundaryLocation(1, "name", 1.1, 2.2)); var mockRepository = new MockRepository(); - var assessmentSectionMock = mockRepository.StrictMock(); - assessmentSectionMock.Expect(asm => asm.HydraulicBoundaryDatabase).Return(hydraulicBoundaryDatabase).Repeat.Twice(); + var assessmentSectionMock = mockRepository.Stub(); + assessmentSectionMock.HydraulicBoundaryDatabase = hydraulicBoundaryDatabase; mockRepository.ReplayAll(); var failureMechanism = new StabilityPointStructuresFailureMechanism(); Index: Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.Forms.Test/TreeNodeInfos/StabilityPointStructuresCalculationGroupContextTreeNodeInfoTest.cs =================================================================== diff -u -r2a1fab6b1433b01ef0dbb2c79a35430dd7efe0bd -r193e94f5864e02ed187eb5f69e29faf1305e4072 --- Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.Forms.Test/TreeNodeInfos/StabilityPointStructuresCalculationGroupContextTreeNodeInfoTest.cs (.../StabilityPointStructuresCalculationGroupContextTreeNodeInfoTest.cs) (revision 2a1fab6b1433b01ef0dbb2c79a35430dd7efe0bd) +++ Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.Forms.Test/TreeNodeInfos/StabilityPointStructuresCalculationGroupContextTreeNodeInfoTest.cs (.../StabilityPointStructuresCalculationGroupContextTreeNodeInfoTest.cs) (revision 193e94f5864e02ed187eb5f69e29faf1305e4072) @@ -66,7 +66,7 @@ public void SetUp() { mocks = new MockRepository(); - guiMock = mocks.StrictMock(); + guiMock = mocks.Stub(); plugin = new StabilityPointStructuresPlugin { Gui = guiMock @@ -108,7 +108,7 @@ // Setup var group = new CalculationGroup(); var failureMechanism = new StabilityPointStructuresFailureMechanism(); - var assessmentSectionMock = mocks.StrictMock(); + var assessmentSectionMock = mocks.Stub(); mocks.ReplayAll(); var groupContext = new StabilityPointStructuresCalculationGroupContext(group, @@ -126,8 +126,7 @@ public void ChildNodeObjects_GroupWithMixedContents_ReturnChildren() { // Setup - var assessmentSectionMock = mocks.StrictMock(); - var calculationItemMock = mocks.StrictMock(); + var assessmentSectionMock = mocks.Stub(); mocks.ReplayAll(); var failureMechanism = new StabilityPointStructuresFailureMechanism(); @@ -136,24 +135,22 @@ var childCalculation = new StabilityPointStructuresCalculation(); group.Children.Add(childGroup); - group.Children.Add(calculationItemMock); group.Children.Add(childCalculation); var groupContext = new StabilityPointStructuresCalculationGroupContext(group, failureMechanism, assessmentSectionMock); // Call - var children = info.ChildNodeObjects(groupContext).ToArray(); + object[] children = info.ChildNodeObjects(groupContext).ToArray(); // Assert Assert.AreEqual(group.Children.Count, children.Length); var calculationGroupContext = (StabilityPointStructuresCalculationGroupContext) children[0]; Assert.AreSame(childGroup, calculationGroupContext.WrappedData); Assert.AreSame(failureMechanism, calculationGroupContext.FailureMechanism); Assert.AreSame(assessmentSectionMock, calculationGroupContext.AssessmentSection); - Assert.AreSame(calculationItemMock, children[1]); - var calculationContext = (StabilityPointStructuresCalculationContext) children[2]; + var calculationContext = (StabilityPointStructuresCalculationContext) children[1]; Assert.AreSame(childCalculation, calculationContext.WrappedData); Assert.AreSame(assessmentSectionMock, calculationContext.AssessmentSection); } @@ -164,7 +161,7 @@ // Setup var group = new CalculationGroup(); var failureMechanism = new StabilityPointStructuresFailureMechanism(); - var assessmentSectionMock = mocks.StrictMock(); + var assessmentSectionMock = mocks.Stub(); var groupContext = new StabilityPointStructuresCalculationGroupContext(group, failureMechanism, assessmentSectionMock); @@ -208,7 +205,7 @@ // Setup var group = new CalculationGroup(); var failureMechanism = new StabilityPointStructuresFailureMechanism(); - var assessmentSectionMock = mocks.StrictMock(); + var assessmentSectionMock = mocks.Stub(); var groupContext = new StabilityPointStructuresCalculationGroupContext(group, failureMechanism, assessmentSectionMock); @@ -265,7 +262,7 @@ var group = new CalculationGroup(); var parentGroup = new CalculationGroup(); var failureMechanism = new StabilityPointStructuresFailureMechanism(); - var assessmentSectionMock = mocks.StrictMock(); + var assessmentSectionMock = mocks.Stub(); var groupContext = new StabilityPointStructuresCalculationGroupContext(group, failureMechanism, assessmentSectionMock); @@ -309,7 +306,7 @@ var group = new CalculationGroup(); var parentGroup = new CalculationGroup(); var failureMechanism = new StabilityPointStructuresFailureMechanism(); - var assessmentSectionMock = mocks.StrictMock(); + var assessmentSectionMock = mocks.Stub(); var groupContext = new StabilityPointStructuresCalculationGroupContext(group, failureMechanism, assessmentSectionMock); @@ -364,7 +361,7 @@ var menuBuilder = new CustomItemsOnlyContextMenuBuilder(); var group = new CalculationGroup(); var failureMechanism = new StabilityPointStructuresFailureMechanism(); - var assessmentSectionMock = mocks.StrictMock(); + var assessmentSectionMock = mocks.Stub(); var nodeData = new StabilityPointStructuresCalculationGroupContext(group, failureMechanism, assessmentSectionMock); @@ -410,7 +407,7 @@ var menuBuilder = new CustomItemsOnlyContextMenuBuilder(); var group = new CalculationGroup(); var failureMechanism = new StabilityPointStructuresFailureMechanism(); - var assessmentSectionMock = mocks.StrictMock(); + var assessmentSectionMock = mocks.Stub(); var nodeData = new StabilityPointStructuresCalculationGroupContext(group, failureMechanism, assessmentSectionMock); @@ -465,7 +462,7 @@ }; var failureMechanism = new StabilityPointStructuresFailureMechanism(); - var assessmentSectionMock = mocks.StrictMock(); + var assessmentSectionMock = mocks.Stub(); var nodeData = new StabilityPointStructuresCalculationGroupContext(group, failureMechanism, assessmentSectionMock); @@ -504,7 +501,7 @@ // Setup var observerMock = mocks.StrictMock(); var failureMechanism = new StabilityPointStructuresFailureMechanism(); - var assessmentSectionMock = mocks.StrictMock(); + var assessmentSectionMock = mocks.Stub(); var group = new CalculationGroup(); var parentGroup = new CalculationGroup(); var nodeData = new StabilityPointStructuresCalculationGroupContext(group,