Index: Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Forms.Test/PropertyClasses/HeightStructuresInputContextPropertiesTest.cs =================================================================== diff -u -r3163642d26872e5a54e31f9d7640192bc7191363 -r7d922899412d52bcc7c2f1432589dfcd62d364b4 --- Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Forms.Test/PropertyClasses/HeightStructuresInputContextPropertiesTest.cs (.../HeightStructuresInputContextPropertiesTest.cs) (revision 3163642d26872e5a54e31f9d7640192bc7191363) +++ Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Forms.Test/PropertyClasses/HeightStructuresInputContextPropertiesTest.cs (.../HeightStructuresInputContextPropertiesTest.cs) (revision 7d922899412d52bcc7c2f1432589dfcd62d364b4) @@ -26,7 +26,6 @@ using Core.Common.Base; using Core.Common.Base.Data; using Core.Common.Base.Geometry; -using Core.Common.Gui.PropertyBag; using Core.Common.TestUtil; using NUnit.Framework; using Rhino.Mocks; @@ -64,11 +63,13 @@ private const int stormDurationPropertyIndex = 15; private MockRepository mockRepository; + private IAssessmentSection assessmentSection; [SetUp] public void SetUp() { mockRepository = new MockRepository(); + assessmentSection = mockRepository.StrictMock(); } [Test] @@ -90,7 +91,6 @@ public void Constructor_WithoutHandler_ExpectedValues() { // Setup - var assessmentSectionStub = mockRepository.Stub(); mockRepository.ReplayAll(); var failureMechanism = new HeightStructuresFailureMechanism(); @@ -99,7 +99,7 @@ var inputContext = new HeightStructuresInputContext(calculation.InputParameters, calculation, failureMechanism, - assessmentSectionStub); + assessmentSection); // Call TestDelegate test = () => new HeightStructuresInputContextProperties(inputContext, null); @@ -113,7 +113,6 @@ public void Constructor_WithDataAndHandler_ExpectedValues() { // Setup - var assessmentSectionStub = mockRepository.Stub(); var handler = mockRepository.Stub(); mockRepository.ReplayAll(); @@ -123,7 +122,7 @@ var inputContext = new HeightStructuresInputContext(calculation.InputParameters, calculation, failureMechanism, - assessmentSectionStub); + assessmentSection); // Call var properties = new HeightStructuresInputContextProperties(inputContext, handler); @@ -142,7 +141,6 @@ public void Constructor_WithData_PropertiesHaveExpectedAttributesValues() { // Setup - var assessmentSectionStub = mockRepository.Stub(); var handler = mockRepository.Stub(); mockRepository.ReplayAll(); @@ -151,7 +149,7 @@ var inputContext = new HeightStructuresInputContext(calculation.InputParameters, calculation, failureMechanism, - assessmentSectionStub); + assessmentSection); // Call var properties = new HeightStructuresInputContextProperties(inputContext, handler); @@ -194,7 +192,6 @@ public void Constructor_WithOrWithoutStructure_CorrectReadOnlyForStructureDependentProperties(bool hasStructure) { // Setup - var assessmentSectionStub = mockRepository.Stub(); var handler = mockRepository.Stub(); mockRepository.ReplayAll(); @@ -203,7 +200,7 @@ var inputContext = new HeightStructuresInputContext(calculation.InputParameters, calculation, failureMechanism, - assessmentSectionStub); + assessmentSection); if (hasStructure) { calculation.InputParameters.Structure = new TestHeightStructure(); @@ -237,7 +234,6 @@ public void GetAvailableForeshoreProfiles_SetInputContextInstanceWithForeshoreProfiles_ReturnForeshoreProfiles() { // Setup - var assessmentSectionStub = mockRepository.Stub(); var handler = mockRepository.Stub(); mockRepository.ReplayAll(); @@ -252,7 +248,7 @@ var inputContext = new HeightStructuresInputContext(calculation.InputParameters, calculation, failureMechanism, - assessmentSectionStub); + assessmentSection); var properties = new HeightStructuresInputContextProperties(inputContext, handler); // Call @@ -267,7 +263,6 @@ public void GetAvailableStructures_SetInputContextInstanceWithStructures_ReturnStructures() { // Setup - var assessmentSectionStub = mockRepository.Stub(); var handler = mockRepository.Stub(); mockRepository.ReplayAll(); @@ -282,7 +277,7 @@ var inputContext = new HeightStructuresInputContext(calculation.InputParameters, calculation, failureMechanism, - assessmentSectionStub); + assessmentSection); var properties = new HeightStructuresInputContextProperties(inputContext, handler); // Call @@ -297,15 +292,14 @@ public void SetStructure_StructureInSection_UpdateSectionResults() { // Setup - var assessmentSectionStub = mockRepository.Stub(); mockRepository.ReplayAll(); var failureMechanism = new HeightStructuresFailureMechanism(); var calculation = new StructuresCalculation(); var inputContext = new HeightStructuresInputContext(calculation.InputParameters, calculation, failureMechanism, - assessmentSectionStub); + assessmentSection); var newStructure = new TestHeightStructure(); var handler = new CalculationInputSetPropertyValueAfterConfirmationParameterTester(Enumerable.Empty()); @@ -338,7 +332,6 @@ { // Setup var observable = mockRepository.StrictMock(); - var assessmentSection = mockRepository.StrictMock(); observable.Expect(o => o.NotifyObservers()); mockRepository.ReplayAll();