Index: Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Forms.Test/Views/ClosingStructuresFailureMechanismViewTest.cs =================================================================== diff -u -r737cd3675ab5bc1b6400e4a0b86ebd543eaee650 -r3014d0ced22c45300938639e7958ea0850485240 --- Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Forms.Test/Views/ClosingStructuresFailureMechanismViewTest.cs (.../ClosingStructuresFailureMechanismViewTest.cs) (revision 737cd3675ab5bc1b6400e4a0b86ebd543eaee650) +++ Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Forms.Test/Views/ClosingStructuresFailureMechanismViewTest.cs (.../ClosingStructuresFailureMechanismViewTest.cs) (revision 3014d0ced22c45300938639e7958ea0850485240) @@ -29,7 +29,6 @@ using Core.Components.Gis.Forms; using Core.Components.Gis.Geometries; using NUnit.Framework; -using Rhino.Mocks; using Ringtoets.ClosingStructures.Data; using Ringtoets.ClosingStructures.Data.TestUtil; using Ringtoets.ClosingStructures.Forms.PresentationObjects; @@ -90,9 +89,7 @@ // Setup using (var view = new ClosingStructuresFailureMechanismView()) { - var mockRepository = new MockRepository(); - IAssessmentSection assessmentSection = mockRepository.Stub(); - mockRepository.ReplayAll(); + var assessmentSection = new ObservableTestAssessmentSectionStub(); var failureMechanismContext = new ClosingStructuresFailureMechanismContext( new ClosingStructuresFailureMechanism(), assessmentSection); @@ -102,8 +99,6 @@ // Assert Assert.AreSame(failureMechanismContext, view.Data); - - mockRepository.VerifyAll(); } } @@ -115,10 +110,13 @@ IAssessmentSection assessmentSection = new ObservableTestAssessmentSectionStub { - BackgroundMapData = backgroundMapData + BackgroundMapData = + { + MapData = backgroundMapData + } }; - using(new UseCustomTileSourceFactoryConfig(backgroundMapData)) + using (new UseCustomTileSourceFactoryConfig(backgroundMapData)) using (var view = new ClosingStructuresFailureMechanismView()) { var failureMechanismContext = new ClosingStructuresFailureMechanismContext( @@ -154,9 +152,7 @@ // Setup using (var view = new ClosingStructuresFailureMechanismView()) { - var mockRepository = new MockRepository(); - IAssessmentSection assessmentSection = mockRepository.Stub(); - mockRepository.ReplayAll(); + var assessmentSection = new ObservableTestAssessmentSectionStub(); var failureMechanismContext = new ClosingStructuresFailureMechanismContext( new ClosingStructuresFailureMechanism(), @@ -174,8 +170,6 @@ Assert.IsNull(view.Data); Assert.IsNull(view.Map.Data); Assert.IsNull(view.Map.BackgroundMapData); - - mockRepository.VerifyAll(); } } @@ -185,9 +179,7 @@ // Setup using (var view = new ClosingStructuresFailureMechanismView()) { - var mockRepository = new MockRepository(); - IAssessmentSection assessmentSection = mockRepository.Stub(); - mockRepository.ReplayAll(); + var assessmentSection = new ObservableTestAssessmentSectionStub(); var failureMechanismContext = new ClosingStructuresFailureMechanismContext( new ClosingStructuresFailureMechanism(), @@ -199,8 +191,6 @@ // Assert Assert.AreSame(failureMechanismContext, view.Data); AssertEmptyMapData(view.Map.Data); - - mockRepository.VerifyAll(); } } @@ -235,11 +225,11 @@ new Point2D(2.0, 1.0) }); - var mockRepository = new MockRepository(); - IAssessmentSection assessmentSection = mockRepository.Stub(); - assessmentSection.HydraulicBoundaryDatabase = hydraulicBoundaryDatabase; - assessmentSection.ReferenceLine = referenceLine; - mockRepository.ReplayAll(); + var assessmentSection = new ObservableTestAssessmentSectionStub + { + HydraulicBoundaryDatabase = hydraulicBoundaryDatabase, + ReferenceLine = referenceLine + }; var calculationLocationA = new Point2D(1.2, 2.3); var calculationLocationB = new Point2D(2.7, 2.0); @@ -306,8 +296,6 @@ AssertCalculationsMapData( failureMechanism.Calculations.Cast>(), mapDataList[calculationsIndex]); - - mockRepository.VerifyAll(); } }