Index: Ringtoets/Integration/test/Ringtoets.Integration.Plugin.Test/ViewInfos/WaveHeightLocationsViewInfoTest.cs =================================================================== diff -u -r0ce4c68a5285d7596b108dc1b42693970961bd50 -r2d014f7589947c4c9e34140b42687e496ee04c5f --- Ringtoets/Integration/test/Ringtoets.Integration.Plugin.Test/ViewInfos/WaveHeightLocationsViewInfoTest.cs (.../WaveHeightLocationsViewInfoTest.cs) (revision 0ce4c68a5285d7596b108dc1b42693970961bd50) +++ Ringtoets/Integration/test/Ringtoets.Integration.Plugin.Test/ViewInfos/WaveHeightLocationsViewInfoTest.cs (.../WaveHeightLocationsViewInfoTest.cs) (revision 2d014f7589947c4c9e34140b42687e496ee04c5f) @@ -32,10 +32,9 @@ using Core.Common.TestUtil; using NUnit.Framework; using Rhino.Mocks; -using Ringtoets.Common.Data.AssessmentSection; using Ringtoets.Common.Data.Hydraulics; +using Ringtoets.Common.Data.TestUtil; using Ringtoets.Common.Forms.GuiServices; -using Ringtoets.Integration.Data; using Ringtoets.Integration.Forms.PresentationObjects; using Ringtoets.Integration.Forms.Views; using RingtoetsCommonFormsResources = Ringtoets.Common.Forms.Properties.Resources; @@ -65,7 +64,7 @@ public void GetViewName_Always_ReturnsViewName() { // Setup - using (var view = new WaveHeightLocationsView(new AssessmentSection(AssessmentSectionComposition.Dike))) + using (var view = new WaveHeightLocationsView(new ObservableTestAssessmentSectionStub())) { // Call string viewName = info.GetViewName(view, Enumerable.Empty()); @@ -109,11 +108,11 @@ public void GetViewData_Always_ReturnsHydraulicBoundaryDatabase() { // Setup - var mocks = new MockRepository(); var hydraulicBoundaryDatabase = new HydraulicBoundaryDatabase(); - var assessmentSection = mocks.Stub(); - assessmentSection.HydraulicBoundaryDatabase = hydraulicBoundaryDatabase; - mocks.ReplayAll(); + var assessmentSection = new ObservableTestAssessmentSectionStub + { + HydraulicBoundaryDatabase = hydraulicBoundaryDatabase + }; var context = new WaveHeightLocationsContext(assessmentSection); @@ -122,15 +121,13 @@ // Assert Assert.AreSame(hydraulicBoundaryDatabase.Locations, viewData); - mocks.VerifyAll(); } [Test] public void CreateInstance_Always_SetExpectedProperties() { // Setup - - var assessmentSection = new AssessmentSection(AssessmentSectionComposition.Dike) + var assessmentSection = new ObservableTestAssessmentSectionStub { HydraulicBoundaryDatabase = new HydraulicBoundaryDatabase() }; @@ -163,7 +160,7 @@ mocks.ReplayAll(); - var assessmentSection = new AssessmentSection(AssessmentSectionComposition.Dike) + var assessmentSection = new ObservableTestAssessmentSectionStub { HydraulicBoundaryDatabase = new HydraulicBoundaryDatabase() }; @@ -189,7 +186,7 @@ public void CloseViewForData_ForMatchingAssessmentSection_ReturnsTrue() { // Setup - var assessmentSection = new AssessmentSection(AssessmentSectionComposition.Dike); + var assessmentSection = new ObservableTestAssessmentSectionStub(); using (var view = new WaveHeightLocationsView(assessmentSection)) { @@ -205,8 +202,8 @@ public void CloseViewForData_ForNonMatchingAssessmentSection_ReturnsFalse() { // Setup - var assessmentSectionA = new AssessmentSection(AssessmentSectionComposition.Dike); - var assessmentSectionB = new AssessmentSection(AssessmentSectionComposition.Dike); + var assessmentSectionA = new ObservableTestAssessmentSectionStub(); + var assessmentSectionB = new ObservableTestAssessmentSectionStub(); using (var view = new WaveHeightLocationsView(assessmentSectionA)) { @@ -222,7 +219,7 @@ public void CloseViewForData_ForOtherObjectType_ReturnsFalse() { // Setup - var assessmentSectionA = new AssessmentSection(AssessmentSectionComposition.Dike); + var assessmentSectionA = new ObservableTestAssessmentSectionStub(); using (var view = new WaveHeightLocationsView(assessmentSectionA)) { @@ -240,7 +237,7 @@ public void CloseViewForData_ViewDataNull_ReturnsFalse() { // Setup - using (var view = new WaveHeightLocationsView(new AssessmentSection(AssessmentSectionComposition.Dike))) + using (var view = new WaveHeightLocationsView(new ObservableTestAssessmentSectionStub())) { // Call bool closeForData = info.CloseForData(view, new object());