Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/IntegrationTests/StorageSqLiteIntegrationTest.cs =================================================================== diff -u -r8b5a6f938fe2b04cd78623649df37580e145055f -r3434a272cc8bfb25dae4bd7bd50afedb377343c0 --- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/IntegrationTests/StorageSqLiteIntegrationTest.cs (.../StorageSqLiteIntegrationTest.cs) (revision 8b5a6f938fe2b04cd78623649df37580e145055f) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/IntegrationTests/StorageSqLiteIntegrationTest.cs (.../StorageSqLiteIntegrationTest.cs) (revision 3434a272cc8bfb25dae4bd7bd50afedb377343c0) @@ -223,7 +223,7 @@ } } - private static void AssertHydraulicBoundaryDatabase(AssessmentSectionBase expectedProject, AssessmentSectionBase project) + private static void AssertHydraulicBoundaryDatabase(IAssessmentSection expectedProject, IAssessmentSection project) { Assert.IsNotNull(expectedProject.HydraulicBoundaryDatabase); Assert.AreEqual(expectedProject.HydraulicBoundaryDatabase.Version, project.HydraulicBoundaryDatabase.Version); @@ -241,7 +241,7 @@ } - private static void AssertReferenceLine(AssessmentSectionBase expectedProject, AssessmentSectionBase project) + private static void AssertReferenceLine(IAssessmentSection expectedProject, IAssessmentSection project) { Assert.IsNotNull(expectedProject.ReferenceLine); Fisheye: Tag 3434a272cc8bfb25dae4bd7bd50afedb377343c0 refers to a dead (removed) revision in file `Ringtoets/Common/src/Ringtoets.Common.Data/AssessmentSectionBase.cs'. Fisheye: No comparison available. Pass `N' to diff? Index: Ringtoets/Common/src/Ringtoets.Common.Data/IAssessmentSection.cs =================================================================== diff -u --- Ringtoets/Common/src/Ringtoets.Common.Data/IAssessmentSection.cs (revision 0) +++ Ringtoets/Common/src/Ringtoets.Common.Data/IAssessmentSection.cs (revision 3434a272cc8bfb25dae4bd7bd50afedb377343c0) @@ -0,0 +1,62 @@ +// Copyright (C) Stichting Deltares 2016. All rights reserved. +// +// This file is part of Ringtoets. +// +// Ringtoets is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +// +// All names, logos, and references to "Deltares" are registered trademarks of +// Stichting Deltares and remain full property of Stichting Deltares at all times. +// All rights reserved. + +using System.Collections.Generic; + +using Core.Common.Base; +using Core.Common.Base.Storage; + +using Ringtoets.Common.Data.Contribution; +using Ringtoets.HydraRing.Data; + +namespace Ringtoets.Common.Data +{ + /// + /// Base implementation of assessment sections. + /// + public interface IAssessmentSection : IObservable, IStorable + { + /// + /// Gets or sets the name of the assessment section. + /// + string Name { get; set; } + + /// + /// Gets or sets the reference line defining the geometry of the assessment section. + /// + ReferenceLine ReferenceLine { get; set; } + + /// + /// Gets or sets the contribution of each failure mechanism available in this assessment section. + /// + FailureMechanismContribution FailureMechanismContribution { get; } + + /// + /// Gets or sets the hydraulic boundary database. + /// + HydraulicBoundaryDatabase HydraulicBoundaryDatabase { get; set; } + + /// + /// Gets the failure mechanisms corresponding to the assessment section. + /// + IEnumerable GetFailureMechanisms(); + } +} \ No newline at end of file Index: Ringtoets/Common/src/Ringtoets.Common.Data/Ringtoets.Common.Data.csproj =================================================================== diff -u -r756f077b356b86d6524dac7234ed6003b51a6d68 -r3434a272cc8bfb25dae4bd7bd50afedb377343c0 --- Ringtoets/Common/src/Ringtoets.Common.Data/Ringtoets.Common.Data.csproj (.../Ringtoets.Common.Data.csproj) (revision 756f077b356b86d6524dac7234ed6003b51a6d68) +++ Ringtoets/Common/src/Ringtoets.Common.Data/Ringtoets.Common.Data.csproj (.../Ringtoets.Common.Data.csproj) (revision 3434a272cc8bfb25dae4bd7bd50afedb377343c0) @@ -34,7 +34,7 @@ Properties\GlobalAssembly.cs - + Index: Ringtoets/Common/src/Ringtoets.Common.Forms/PresentationObjects/FailureMechanismContext.cs =================================================================== diff -u -re39d854a4358365b293595d9efdcc2a6a6de18e9 -r3434a272cc8bfb25dae4bd7bd50afedb377343c0 --- Ringtoets/Common/src/Ringtoets.Common.Forms/PresentationObjects/FailureMechanismContext.cs (.../FailureMechanismContext.cs) (revision e39d854a4358365b293595d9efdcc2a6a6de18e9) +++ Ringtoets/Common/src/Ringtoets.Common.Forms/PresentationObjects/FailureMechanismContext.cs (.../FailureMechanismContext.cs) (revision 3434a272cc8bfb25dae4bd7bd50afedb377343c0) @@ -35,7 +35,7 @@ /// The failure mechanism. /// The parent of . /// Thrown when or are null. - protected FailureMechanismContext(T wrappedFailureMechanism, AssessmentSectionBase parent) + protected FailureMechanismContext(T wrappedFailureMechanism, IAssessmentSection parent) { AssertInputsAreNotNull(wrappedFailureMechanism, parent); @@ -46,14 +46,14 @@ /// /// Gets the parent of . /// - public AssessmentSectionBase Parent { get; private set; } + public IAssessmentSection Parent { get; private set; } /// /// Gets the wrapped failure mechanism. /// public T WrappedData { get; private set; } - private void AssertInputsAreNotNull(T wrappedFailureMechanism, AssessmentSectionBase parent) + private void AssertInputsAreNotNull(T wrappedFailureMechanism, IAssessmentSection parent) { if (wrappedFailureMechanism == null) { Index: Ringtoets/Common/src/Ringtoets.Common.Forms/PresentationObjects/FailureMechanismSectionsContext.cs =================================================================== diff -u -rf03b38fb7ef00a60db346246b2fb738f960841c9 -r3434a272cc8bfb25dae4bd7bd50afedb377343c0 --- Ringtoets/Common/src/Ringtoets.Common.Forms/PresentationObjects/FailureMechanismSectionsContext.cs (.../FailureMechanismSectionsContext.cs) (revision f03b38fb7ef00a60db346246b2fb738f960841c9) +++ Ringtoets/Common/src/Ringtoets.Common.Forms/PresentationObjects/FailureMechanismSectionsContext.cs (.../FailureMechanismSectionsContext.cs) (revision 3434a272cc8bfb25dae4bd7bd50afedb377343c0) @@ -39,7 +39,7 @@ /// The failure mechanism whose sections to wrap. /// The owning assessment section of . /// When any input argument is null. - public FailureMechanismSectionsContext(IFailureMechanism failureMechanism, AssessmentSectionBase assessmentSection) + public FailureMechanismSectionsContext(IFailureMechanism failureMechanism, IAssessmentSection assessmentSection) { if (failureMechanism == null) { @@ -74,7 +74,7 @@ /// /// Gets the assessment section that owns . /// - public AssessmentSectionBase ParentAssessmentSection { get; private set; } + public IAssessmentSection ParentAssessmentSection { get; private set; } #region IObservable Index: Ringtoets/Common/src/Ringtoets.Common.Forms/PresentationObjects/ReferenceLineContext.cs =================================================================== diff -u -rd36a95d2e88d98b7b92ff5d091abf711d1dd31d9 -r3434a272cc8bfb25dae4bd7bd50afedb377343c0 --- Ringtoets/Common/src/Ringtoets.Common.Forms/PresentationObjects/ReferenceLineContext.cs (.../ReferenceLineContext.cs) (revision d36a95d2e88d98b7b92ff5d091abf711d1dd31d9) +++ Ringtoets/Common/src/Ringtoets.Common.Forms/PresentationObjects/ReferenceLineContext.cs (.../ReferenceLineContext.cs) (revision 3434a272cc8bfb25dae4bd7bd50afedb377343c0) @@ -36,7 +36,7 @@ /// /// The parent owner of the data represented by the presentation object. /// Thrown when is null. - public ReferenceLineContext(AssessmentSectionBase parent) + public ReferenceLineContext(IAssessmentSection parent) { if (parent == null) { @@ -59,7 +59,7 @@ /// /// The assessment section owning . /// - public AssessmentSectionBase Parent { get; private set; } + public IAssessmentSection Parent { get; private set; } #region Equatable Index: Ringtoets/Common/src/Ringtoets.Common.IO/ReferenceLineImporter.cs =================================================================== diff -u -rd36a95d2e88d98b7b92ff5d091abf711d1dd31d9 -r3434a272cc8bfb25dae4bd7bd50afedb377343c0 --- Ringtoets/Common/src/Ringtoets.Common.IO/ReferenceLineImporter.cs (.../ReferenceLineImporter.cs) (revision d36a95d2e88d98b7b92ff5d091abf711d1dd31d9) +++ Ringtoets/Common/src/Ringtoets.Common.IO/ReferenceLineImporter.cs (.../ReferenceLineImporter.cs) (revision 3434a272cc8bfb25dae4bd7bd50afedb377343c0) @@ -39,7 +39,7 @@ namespace Ringtoets.Common.IO { /// - /// Imports a and stores in on a , + /// Imports a and stores in on a , /// taking data from a shapefile containing a single polyline. /// public class ReferenceLineImporter : FileImporterBase @@ -125,7 +125,7 @@ return changedObservables; } - private bool ConfirmImportOfReferenceLineToClearReferenceLineDependentData(AssessmentSectionBase assessmentSection) + private bool ConfirmImportOfReferenceLineToClearReferenceLineDependentData(IAssessmentSection assessmentSection) { var clearReferenceLineDependentData = false; @@ -182,7 +182,7 @@ return new ReadResult(true); } - private void AddReferenceLineToDataModel(AssessmentSectionBase assessmentSection, ReferenceLine importedReferenceLine, bool clearReferenceLineDependentData) + private void AddReferenceLineToDataModel(IAssessmentSection assessmentSection, ReferenceLine importedReferenceLine, bool clearReferenceLineDependentData) { NotifyProgress(Resources.ReferenceLineImporter_ProgressText_Adding_imported_referenceline_to_assessmentsection, 2, clearReferenceLineDependentData ? 4 : 2); @@ -196,7 +196,7 @@ } } - private void ClearReferenceLineDependentData(AssessmentSectionBase assessmentSection) + private void ClearReferenceLineDependentData(IAssessmentSection assessmentSection) { NotifyProgress(Resources.ReferenceLineImporter_ProgressText_Removing_calculation_output_and_failure_mechanism_sections, 3, 4); @@ -230,7 +230,7 @@ } } - private void ClearHydraulicBoundaryOutput(AssessmentSectionBase assessmentSection) + private void ClearHydraulicBoundaryOutput(IAssessmentSection assessmentSection) { // TODO: WTI-360 - Clear all 'Toetspeil' calculation output //changedObservables.Add(clearedInstance); Fisheye: Tag 3434a272cc8bfb25dae4bd7bd50afedb377343c0 refers to a dead (removed) revision in file `Ringtoets/Common/test/Ringtoets.Common.Data.Test/AssessmentSectionBaseTest.cs'. Fisheye: No comparison available. Pass `N' to diff? Index: Ringtoets/Common/test/Ringtoets.Common.Data.Test/Ringtoets.Common.Data.Test.csproj =================================================================== diff -u -r756f077b356b86d6524dac7234ed6003b51a6d68 -r3434a272cc8bfb25dae4bd7bd50afedb377343c0 --- Ringtoets/Common/test/Ringtoets.Common.Data.Test/Ringtoets.Common.Data.Test.csproj (.../Ringtoets.Common.Data.Test.csproj) (revision 756f077b356b86d6524dac7234ed6003b51a6d68) +++ Ringtoets/Common/test/Ringtoets.Common.Data.Test/Ringtoets.Common.Data.Test.csproj (.../Ringtoets.Common.Data.Test.csproj) (revision 3434a272cc8bfb25dae4bd7bd50afedb377343c0) @@ -52,7 +52,6 @@ - Index: Ringtoets/Common/test/Ringtoets.Common.Forms.Test/PresentationObjects/FailureMechanismContextTest.cs =================================================================== diff -u -rc2ba7fe7272ecdda1b319d1caa18340d6cf219e4 -r3434a272cc8bfb25dae4bd7bd50afedb377343c0 --- Ringtoets/Common/test/Ringtoets.Common.Forms.Test/PresentationObjects/FailureMechanismContextTest.cs (.../FailureMechanismContextTest.cs) (revision c2ba7fe7272ecdda1b319d1caa18340d6cf219e4) +++ Ringtoets/Common/test/Ringtoets.Common.Forms.Test/PresentationObjects/FailureMechanismContextTest.cs (.../FailureMechanismContextTest.cs) (revision 3434a272cc8bfb25dae4bd7bd50afedb377343c0) @@ -16,7 +16,7 @@ { // Setup var mocks = new MockRepository(); - var assessmentSection = mocks.Stub(); + var assessmentSection = mocks.Stub(); var failureMechanism = mocks.Stub(); mocks.ReplayAll(); @@ -34,7 +34,7 @@ { // Setup var mocks = new MockRepository(); - var assessmentSection = mocks.Stub(); + var assessmentSection = mocks.Stub(); mocks.ReplayAll(); // Call @@ -66,7 +66,7 @@ { // Setup var mocks = new MockRepository(); - var assessmentSection = mocks.StrictMock(); + var assessmentSection = mocks.StrictMock(); var failureMechanism = mocks.StrictMock(); mocks.ReplayAll(); @@ -85,7 +85,7 @@ { // Setup var mocks = new MockRepository(); - var assessmentSection = mocks.StrictMock(); + var assessmentSection = mocks.StrictMock(); var failureMechanism = mocks.StrictMock(); mocks.ReplayAll(); @@ -104,7 +104,7 @@ { // Setup var mocks = new MockRepository(); - var assessmentSection = mocks.StrictMock(); + var assessmentSection = mocks.StrictMock(); var failureMechanism = mocks.StrictMock(); mocks.ReplayAll(); @@ -126,7 +126,7 @@ { // Setup var mocks = new MockRepository(); - var assessmentSection = mocks.StrictMock(); + var assessmentSection = mocks.StrictMock(); var failureMechanism = mocks.StrictMock(); var otherFailureMechanism = mocks.StrictMock(); mocks.ReplayAll(); @@ -149,7 +149,7 @@ { // Setup var mocks = new MockRepository(); - var assessmentSection = mocks.StrictMock(); + var assessmentSection = mocks.StrictMock(); var failureMechanism = mocks.StrictMock(); mocks.ReplayAll(); @@ -171,7 +171,7 @@ { // Setup var mocks = new MockRepository(); - var assessmentSection = mocks.StrictMock(); + var assessmentSection = mocks.StrictMock(); var failureMechanism = mocks.StrictMock(); mocks.ReplayAll(); @@ -194,7 +194,7 @@ private class SimpleFailureMechanismContext : FailureMechanismContext { - public SimpleFailureMechanismContext(IFailureMechanism wrappedFailureMechanism, AssessmentSectionBase parent) : base(wrappedFailureMechanism, parent) {} + public SimpleFailureMechanismContext(IFailureMechanism wrappedFailureMechanism, IAssessmentSection parent) : base(wrappedFailureMechanism, parent) {} } } } \ No newline at end of file Index: Ringtoets/Common/test/Ringtoets.Common.Forms.Test/PresentationObjects/FailureMechanismSectionsContextTest.cs =================================================================== diff -u -r5e426c2c9fd73b2bab4be73f9e4b7f9b2feb0a49 -r3434a272cc8bfb25dae4bd7bd50afedb377343c0 --- Ringtoets/Common/test/Ringtoets.Common.Forms.Test/PresentationObjects/FailureMechanismSectionsContextTest.cs (.../FailureMechanismSectionsContextTest.cs) (revision 5e426c2c9fd73b2bab4be73f9e4b7f9b2feb0a49) +++ Ringtoets/Common/test/Ringtoets.Common.Forms.Test/PresentationObjects/FailureMechanismSectionsContextTest.cs (.../FailureMechanismSectionsContextTest.cs) (revision 3434a272cc8bfb25dae4bd7bd50afedb377343c0) @@ -38,7 +38,7 @@ var failureMechanism = mocks.Stub(); failureMechanism.Stub(fm => fm.Sections).Return(sectionsSequence); - var assessmentSection = mocks.Stub(); + var assessmentSection = mocks.Stub(); mocks.ReplayAll(); // Call @@ -57,7 +57,7 @@ { // Setup var mocks = new MockRepository(); - var assessmentSection = mocks.Stub(); + var assessmentSection = mocks.Stub(); mocks.ReplayAll(); // Call @@ -89,7 +89,7 @@ { // Setup var mocks = new MockRepository(); - var assessmentSection = mocks.StrictMock(); + var assessmentSection = mocks.StrictMock(); var failureMechanism = mocks.StrictMock(); var observer = mocks.StrictMock(); @@ -111,7 +111,7 @@ { // Setup var mocks = new MockRepository(); - var assessmentSection = mocks.StrictMock(); + var assessmentSection = mocks.StrictMock(); var failureMechanism = mocks.StrictMock(); var observer = mocks.StrictMock(); @@ -133,7 +133,7 @@ { // Setup var mocks = new MockRepository(); - var assessmentSection = mocks.StrictMock(); + var assessmentSection = mocks.StrictMock(); var failureMechanism = mocks.StrictMock(); failureMechanism.Expect(fm => fm.NotifyObservers()); @@ -154,7 +154,7 @@ { // Setup var mocks = new MockRepository(); - var assessmentSection = mocks.StrictMock(); + var assessmentSection = mocks.StrictMock(); var failureMechanism = mocks.Stub(); mocks.ReplayAll(); @@ -173,7 +173,7 @@ { // Setup var mocks = new MockRepository(); - var assessmentSection = mocks.StrictMock(); + var assessmentSection = mocks.StrictMock(); var failureMechanism = mocks.Stub(); mocks.ReplayAll(); @@ -192,7 +192,7 @@ { // Setup var mocks = new MockRepository(); - var assessmentSection = mocks.StrictMock(); + var assessmentSection = mocks.StrictMock(); var failureMechanism = mocks.Stub(); mocks.ReplayAll(); @@ -215,7 +215,7 @@ { // Setup var mocks = new MockRepository(); - var assessmentSection = mocks.StrictMock(); + var assessmentSection = mocks.StrictMock(); var failureMechanism = mocks.Stub(); var otherFailureMechanism = mocks.Stub(); mocks.ReplayAll(); @@ -239,7 +239,7 @@ { // Setup var mocks = new MockRepository(); - var assessmentSection = mocks.StrictMock(); + var assessmentSection = mocks.StrictMock(); var failureMechanism = mocks.Stub(); mocks.ReplayAll(); Index: Ringtoets/Common/test/Ringtoets.Common.Forms.Test/PresentationObjects/ReferenceLineContextTest.cs =================================================================== diff -u -rf03b38fb7ef00a60db346246b2fb738f960841c9 -r3434a272cc8bfb25dae4bd7bd50afedb377343c0 --- Ringtoets/Common/test/Ringtoets.Common.Forms.Test/PresentationObjects/ReferenceLineContextTest.cs (.../ReferenceLineContextTest.cs) (revision f03b38fb7ef00a60db346246b2fb738f960841c9) +++ Ringtoets/Common/test/Ringtoets.Common.Forms.Test/PresentationObjects/ReferenceLineContextTest.cs (.../ReferenceLineContextTest.cs) (revision 3434a272cc8bfb25dae4bd7bd50afedb377343c0) @@ -18,7 +18,7 @@ var referenceLine = new ReferenceLine(); var mocks = new MockRepository(); - var assessmentSection = mocks.Stub(); + var assessmentSection = mocks.Stub(); assessmentSection.ReferenceLine = referenceLine; mocks.ReplayAll(); @@ -48,7 +48,7 @@ { // Setup var mocks = new MockRepository(); - var assessmentSection = mocks.Stub(); + var assessmentSection = mocks.Stub(); mocks.ReplayAll(); var context1 = new ReferenceLineContext(assessmentSection); @@ -69,8 +69,8 @@ { // Setup var mocks = new MockRepository(); - var assessmentSection1 = mocks.Stub(); - var assessmentSection2 = mocks.Stub(); + var assessmentSection1 = mocks.Stub(); + var assessmentSection2 = mocks.Stub(); mocks.ReplayAll(); var context1 = new ReferenceLineContext(assessmentSection1); @@ -91,7 +91,7 @@ { // Setup var mocks = new MockRepository(); - var assessmentSection = mocks.Stub(); + var assessmentSection = mocks.Stub(); mocks.ReplayAll(); var context = new ReferenceLineContext(assessmentSection); @@ -109,7 +109,7 @@ { // Setup var mocks = new MockRepository(); - var assessmentSection = mocks.Stub(); + var assessmentSection = mocks.Stub(); mocks.ReplayAll(); var context = new ReferenceLineContext(assessmentSection); @@ -127,7 +127,7 @@ { // Setup var mocks = new MockRepository(); - var assessmentSection = mocks.StrictMock(); + var assessmentSection = mocks.StrictMock(); mocks.ReplayAll(); var context = new ReferenceLineContext(assessmentSection); Index: Ringtoets/Common/test/Ringtoets.Common.IO.Test/ReferenceLineImporterTest.cs =================================================================== diff -u -rd36a95d2e88d98b7b92ff5d091abf711d1dd31d9 -r3434a272cc8bfb25dae4bd7bd50afedb377343c0 --- Ringtoets/Common/test/Ringtoets.Common.IO.Test/ReferenceLineImporterTest.cs (.../ReferenceLineImporterTest.cs) (revision d36a95d2e88d98b7b92ff5d091abf711d1dd31d9) +++ Ringtoets/Common/test/Ringtoets.Common.IO.Test/ReferenceLineImporterTest.cs (.../ReferenceLineImporterTest.cs) (revision 3434a272cc8bfb25dae4bd7bd50afedb377343c0) @@ -36,7 +36,7 @@ { // Setup var mocks = new MockRepository(); - var assessmentSection = mocks.Stub(); + var assessmentSection = mocks.Stub(); mocks.ReplayAll(); var path = TestHelper.GetTestDataPath(TestDataPath.Ringtoets.Common.IO, "traject_10-2.shp"); @@ -64,7 +64,7 @@ { // Setup var mocks = new MockRepository(); - var assessmentSection = mocks.Stub(); + var assessmentSection = mocks.Stub(); mocks.ReplayAll(); var path = TestHelper.GetTestDataPath(TestDataPath.Ringtoets.Common.IO, "traject_10-2.shp"); @@ -101,7 +101,7 @@ { // Setup var mocks = new MockRepository(); - var assessmentSection = mocks.Stub(); + var assessmentSection = mocks.Stub(); mocks.ReplayAll(); var path = TestHelper.GetTestDataPath(TestDataPath.Ringtoets.Common.IO, Path.DirectorySeparatorChar.ToString()); @@ -129,7 +129,7 @@ { // Setup var mocks = new MockRepository(); - var assessmentSection = mocks.Stub(); + var assessmentSection = mocks.Stub(); mocks.ReplayAll(); var path = TestHelper.GetTestDataPath(TestDataPath.Ringtoets.Common.IO, "I_dont_exist"); @@ -174,7 +174,7 @@ calculation3, }); - var assessmentSection = mocks.Stub(); + var assessmentSection = mocks.Stub(); assessmentSection.ReferenceLine = originalReferenceLine; assessmentSection.Stub(a => a.GetFailureMechanisms()).Return(new[] { @@ -247,7 +247,7 @@ calculation4 }); - var assessmentSection = mocks.Stub(); + var assessmentSection = mocks.Stub(); assessmentSection.ReferenceLine = originalReferenceLine; assessmentSection.Stub(a => a.GetFailureMechanisms()).Return(new[] { @@ -311,7 +311,7 @@ calculation2 }); - var assessmentSection = mocks.Stub(); + var assessmentSection = mocks.Stub(); assessmentSection.ReferenceLine = originalReferenceLine; assessmentSection.Stub(a => a.GetFailureMechanisms()).Return(new[] { @@ -361,7 +361,7 @@ var originalReferenceLine = new ReferenceLine(); var mocks = new MockRepository(); - var assessmentSection = mocks.Stub(); + var assessmentSection = mocks.Stub(); assessmentSection.ReferenceLine = originalReferenceLine; mocks.ReplayAll(); @@ -397,7 +397,7 @@ var originalReferenceLine = new ReferenceLine(); var mocks = new MockRepository(); - var assessmentSection = mocks.Stub(); + var assessmentSection = mocks.Stub(); assessmentSection.ReferenceLine = originalReferenceLine; mocks.ReplayAll(); @@ -435,7 +435,7 @@ { // Setup var mocks = new MockRepository(); - var assessmentSection = mocks.Stub(); + var assessmentSection = mocks.Stub(); mocks.ReplayAll(); var path = TestHelper.GetTestDataPath(TestDataPath.Ringtoets.Common.IO, "traject_10-2.shp"); @@ -497,13 +497,14 @@ calculation4 }); - var assessmentSection = mocks.Stub(); + var assessmentSection = mocks.Stub(); assessmentSection.ReferenceLine = originalReferenceLine; assessmentSection.Stub(a => a.GetFailureMechanisms()).Return(new[] { failureMechanism1, failureMechanism2 }); + assessmentSection.Expect(section => section.NotifyObservers()); var contextObserver = mocks.Stub(); contextObserver.Expect(o => o.UpdateObserver()); @@ -539,12 +540,13 @@ var originalReferenceLine = new ReferenceLine(); var mocks = new MockRepository(); + var observer = mocks.Stub(); - var assessmentSection = mocks.Stub(); + var assessmentSection = mocks.Stub(); + assessmentSection.Stub(section => section.GetFailureMechanisms()).Return(Enumerable.Empty()); assessmentSection.ReferenceLine = originalReferenceLine; - - var observer = mocks.Stub(); - observer.Expect(o => o.UpdateObserver()); + assessmentSection.Expect(section => section.Attach(observer)); + assessmentSection.Expect(section => section.NotifyObservers()); mocks.ReplayAll(); var path = TestHelper.GetTestDataPath(TestDataPath.Ringtoets.Common.IO, "traject_10-2.shp"); @@ -585,7 +587,7 @@ calculation1 }); - var assessmentSection = mocks.Stub(); + var assessmentSection = mocks.Stub(); assessmentSection.ReferenceLine = originalReferenceLine; assessmentSection.Stub(a => a.GetFailureMechanisms()).Return(new[] { @@ -658,13 +660,14 @@ calculation4 }); - var assessmentSection = mocks.Stub(); + var assessmentSection = mocks.Stub(); assessmentSection.ReferenceLine = originalReferenceLine; assessmentSection.Stub(a => a.GetFailureMechanisms()).Return(new[] { failureMechanism1, failureMechanism2 }); + assessmentSection.Expect(section => section.NotifyObservers()); var contextObserver = mocks.Stub(); contextObserver.Expect(o => o.UpdateObserver()); Index: Ringtoets/Integration/src/Ringtoets.Integration.Data/AssessmentSection.cs =================================================================== diff -u -r61cf98b13fbdbae035c111cb1e419237b8164059 -r3434a272cc8bfb25dae4bd7bd50afedb377343c0 --- Ringtoets/Integration/src/Ringtoets.Integration.Data/AssessmentSection.cs (.../AssessmentSection.cs) (revision 61cf98b13fbdbae035c111cb1e419237b8164059) +++ Ringtoets/Integration/src/Ringtoets.Integration.Data/AssessmentSection.cs (.../AssessmentSection.cs) (revision 3434a272cc8bfb25dae4bd7bd50afedb377343c0) @@ -20,9 +20,13 @@ // All rights reserved. using System.Collections.Generic; + +using Core.Common.Base; using Core.Common.Base.Geometry; + using Ringtoets.Common.Data; using Ringtoets.Common.Data.Contribution; +using Ringtoets.HydraRing.Data; using Ringtoets.Integration.Data.Placeholders; using Ringtoets.Integration.Data.Properties; using Ringtoets.Piping.Data; @@ -32,8 +36,12 @@ /// /// The section to be assessed by the user for safety in regards of various failure mechanisms. /// - public sealed class AssessmentSection : AssessmentSectionBase + public sealed class AssessmentSection : Observable, IAssessmentSection { + private ReferenceLine referenceLine; + + private FailureMechanismContribution contritbution; + /// /// Initializes a new instance of the class. /// @@ -85,32 +93,6 @@ FailureMechanismContribution = new FailureMechanismContribution(GetFailureMechanisms(), 30, 30000); } - public override ReferenceLine ReferenceLine - { - get - { - return base.ReferenceLine; - } - set - { - base.ReferenceLine = value; - PipingFailureMechanism.SemiProbabilisticInput.SectionLength = value == null ? double.NaN : Math2D.Length(value.Points); - } - } - - public override FailureMechanismContribution FailureMechanismContribution - { - get - { - return base.FailureMechanismContribution; - } - protected set - { - base.FailureMechanismContribution = value; - PipingFailureMechanism.SemiProbabilisticInput.Norm = value.Norm; - } - } - /// /// Gets the "Piping" failure mechanism. /// @@ -161,8 +143,40 @@ /// public FailureMechanismPlaceholder DuneErosionFailureMechanism { get; private set; } - public override IEnumerable GetFailureMechanisms() + public string Name { get; set; } + + public ReferenceLine ReferenceLine { + get + { + return referenceLine; + } + set + { + referenceLine = value; + PipingFailureMechanism.SemiProbabilisticInput.SectionLength = value == null ? double.NaN : Math2D.Length(value.Points); + } + } + + public FailureMechanismContribution FailureMechanismContribution + { + get + { + return contritbution; + } + private set + { + contritbution = value; + PipingFailureMechanism.SemiProbabilisticInput.Norm = value.Norm; + } + } + + public HydraulicBoundaryDatabase HydraulicBoundaryDatabase { get; set; } + + public long StorageId { get; set; } + + public IEnumerable GetFailureMechanisms() + { yield return PipingFailureMechanism; yield return GrassErosionFailureMechanism; yield return MacrostabilityInwardFailureMechanism; Index: Ringtoets/Integration/src/Ringtoets.Integration.Forms/PresentationObjects/FailureMechanismPlaceholderContext.cs =================================================================== diff -u -r7144ed9829e56a34e064267053216ffbcf6cff52 -r3434a272cc8bfb25dae4bd7bd50afedb377343c0 --- Ringtoets/Integration/src/Ringtoets.Integration.Forms/PresentationObjects/FailureMechanismPlaceholderContext.cs (.../FailureMechanismPlaceholderContext.cs) (revision 7144ed9829e56a34e064267053216ffbcf6cff52) +++ Ringtoets/Integration/src/Ringtoets.Integration.Forms/PresentationObjects/FailureMechanismPlaceholderContext.cs (.../FailureMechanismPlaceholderContext.cs) (revision 3434a272cc8bfb25dae4bd7bd50afedb377343c0) @@ -37,7 +37,7 @@ /// The failure mechanism. /// The parent of . /// Thrown when or are null. - public FailureMechanismPlaceholderContext(FailureMechanismPlaceholder wrappedFailureMechanism, AssessmentSectionBase parent) : + public FailureMechanismPlaceholderContext(FailureMechanismPlaceholder wrappedFailureMechanism, IAssessmentSection parent) : base(wrappedFailureMechanism, parent) { Index: Ringtoets/Integration/src/Ringtoets.Integration.Forms/PresentationObjects/HydraulicBoundaryDatabaseContext.cs =================================================================== diff -u -r088f1f6f74733f2b37f6b79b434026bdbc34c941 -r3434a272cc8bfb25dae4bd7bd50afedb377343c0 --- Ringtoets/Integration/src/Ringtoets.Integration.Forms/PresentationObjects/HydraulicBoundaryDatabaseContext.cs (.../HydraulicBoundaryDatabaseContext.cs) (revision 088f1f6f74733f2b37f6b79b434026bdbc34c941) +++ Ringtoets/Integration/src/Ringtoets.Integration.Forms/PresentationObjects/HydraulicBoundaryDatabaseContext.cs (.../HydraulicBoundaryDatabaseContext.cs) (revision 3434a272cc8bfb25dae4bd7bd50afedb377343c0) @@ -33,14 +33,14 @@ /// public class HydraulicBoundaryDatabaseContext : Observable { - private readonly AssessmentSectionBase parent; + private readonly IAssessmentSection parent; /// /// Creates a new instance of . /// - /// The which the belongs to. + /// The which the belongs to. /// Thrown when is null. - public HydraulicBoundaryDatabaseContext(AssessmentSectionBase parent) + public HydraulicBoundaryDatabaseContext(IAssessmentSection parent) { if (parent == null) { @@ -51,9 +51,9 @@ } /// - /// Gets the which this context object belongs to. + /// Gets the which this context object belongs to. /// - public AssessmentSectionBase Parent + public IAssessmentSection Parent { get { Index: Ringtoets/Integration/src/Ringtoets.Integration.Forms/PropertyClasses/AssessmentSectionBaseProperties.cs =================================================================== diff -u -r8b5a6f938fe2b04cd78623649df37580e145055f -r3434a272cc8bfb25dae4bd7bd50afedb377343c0 --- Ringtoets/Integration/src/Ringtoets.Integration.Forms/PropertyClasses/AssessmentSectionBaseProperties.cs (.../AssessmentSectionBaseProperties.cs) (revision 8b5a6f938fe2b04cd78623649df37580e145055f) +++ Ringtoets/Integration/src/Ringtoets.Integration.Forms/PropertyClasses/AssessmentSectionBaseProperties.cs (.../AssessmentSectionBaseProperties.cs) (revision 3434a272cc8bfb25dae4bd7bd50afedb377343c0) @@ -32,7 +32,7 @@ /// /// ViewModel of for properties panel. /// - public class AssessmentSectionBaseProperties : ObjectProperties + public class AssessmentSectionBaseProperties : ObjectProperties { [ResourcesCategory(typeof(Resources), "Categories_General")] [ResourcesDisplayName(typeof(Resources), "AssessmentSectionBase_Name_DisplayName")] Index: Ringtoets/Integration/src/Ringtoets.Integration.Forms/Views/AssessmentSectionView.cs =================================================================== diff -u -recef7aa46cb8fb7d138a5cc00a35f9e7aa7676b6 -r3434a272cc8bfb25dae4bd7bd50afedb377343c0 --- Ringtoets/Integration/src/Ringtoets.Integration.Forms/Views/AssessmentSectionView.cs (.../AssessmentSectionView.cs) (revision ecef7aa46cb8fb7d138a5cc00a35f9e7aa7676b6) +++ Ringtoets/Integration/src/Ringtoets.Integration.Forms/Views/AssessmentSectionView.cs (.../AssessmentSectionView.cs) (revision 3434a272cc8bfb25dae4bd7bd50afedb377343c0) @@ -43,7 +43,7 @@ public partial class AssessmentSectionView : UserControl, IMapView, IObserver { private readonly MapControl mapControl; - private AssessmentSectionBase data; + private IAssessmentSection data; private MapData hydraulicBoundaryDatabaseLocations; private MapData referenceLineData; @@ -68,7 +68,7 @@ } set { - data = value as AssessmentSectionBase; + data = value as IAssessmentSection; if (data != null) { Index: Ringtoets/Integration/src/Ringtoets.Integration.Plugin/FileImporters/HydraulicBoundaryDatabaseImporter.cs =================================================================== diff -u -r088f1f6f74733f2b37f6b79b434026bdbc34c941 -r3434a272cc8bfb25dae4bd7bd50afedb377343c0 --- Ringtoets/Integration/src/Ringtoets.Integration.Plugin/FileImporters/HydraulicBoundaryDatabaseImporter.cs (.../HydraulicBoundaryDatabaseImporter.cs) (revision 088f1f6f74733f2b37f6b79b434026bdbc34c941) +++ Ringtoets/Integration/src/Ringtoets.Integration.Plugin/FileImporters/HydraulicBoundaryDatabaseImporter.cs (.../HydraulicBoundaryDatabaseImporter.cs) (revision 3434a272cc8bfb25dae4bd7bd50afedb377343c0) @@ -191,7 +191,7 @@ } } - private static void AddImportedDataToModel(AssessmentSectionBase assessmentSection, HydraulicBoundaryDatabase importedData) + private static void AddImportedDataToModel(IAssessmentSection assessmentSection, HydraulicBoundaryDatabase importedData) { assessmentSection.HydraulicBoundaryDatabase = importedData; assessmentSection.NotifyObservers(); Index: Ringtoets/Integration/src/Ringtoets.Integration.Plugin/RingtoetsApplicationPlugin.cs =================================================================== diff -u -r8b5a6f938fe2b04cd78623649df37580e145055f -r3434a272cc8bfb25dae4bd7bd50afedb377343c0 --- Ringtoets/Integration/src/Ringtoets.Integration.Plugin/RingtoetsApplicationPlugin.cs (.../RingtoetsApplicationPlugin.cs) (revision 8b5a6f938fe2b04cd78623649df37580e145055f) +++ Ringtoets/Integration/src/Ringtoets.Integration.Plugin/RingtoetsApplicationPlugin.cs (.../RingtoetsApplicationPlugin.cs) (revision 3434a272cc8bfb25dae4bd7bd50afedb377343c0) @@ -66,7 +66,7 @@ private static string GetUniqueForAssessmentSectionName(Project project, string baseName) { - return NamingHelper.GetUniqueName(project.Items.OfType(), baseName, a => a.Name); + return NamingHelper.GetUniqueName(project.Items.OfType(), baseName, a => a.Name); } } } \ No newline at end of file Index: Ringtoets/Integration/src/Ringtoets.Integration.Plugin/RingtoetsGuiPlugin.cs =================================================================== diff -u -rc6f57328aeeabd813c96aee9ef763f54b6267214 -r3434a272cc8bfb25dae4bd7bd50afedb377343c0 --- Ringtoets/Integration/src/Ringtoets.Integration.Plugin/RingtoetsGuiPlugin.cs (.../RingtoetsGuiPlugin.cs) (revision c6f57328aeeabd813c96aee9ef763f54b6267214) +++ Ringtoets/Integration/src/Ringtoets.Integration.Plugin/RingtoetsGuiPlugin.cs (.../RingtoetsGuiPlugin.cs) (revision 3434a272cc8bfb25dae4bd7bd50afedb377343c0) @@ -81,7 +81,7 @@ /// public override IEnumerable GetPropertyInfos() { - yield return new PropertyInfo(); + yield return new PropertyInfo(); yield return new PropertyInfo(); } @@ -96,12 +96,12 @@ Image = RingtoetsCommonFormsResources.GenericInputOutputIcon, CloseForData = (v, o) => { - var assessmentSection = o as AssessmentSectionBase; + var assessmentSection = o as IAssessmentSection; return assessmentSection != null && assessmentSection.FailureMechanismContribution == v.Data; } }; - yield return new ViewInfo + yield return new ViewInfo { GetViewName = (v, o) => RingtoetsFormsResources.AssessmentSectionMap_DisplayName, Image = RingtoetsFormsResources.Map @@ -124,7 +124,7 @@ /// Sequence of child data. public override IEnumerable GetChildDataWithViewDefinitions(object dataObject) { - var assessmentSection = dataObject as AssessmentSectionBase; + var assessmentSection = dataObject as IAssessmentSection; if (assessmentSection != null) { yield return assessmentSection.FailureMechanismContribution; @@ -136,7 +136,7 @@ /// public override IEnumerable GetTreeNodeInfos() { - yield return new TreeNodeInfo + yield return new TreeNodeInfo { Text = assessmentSectionBase => assessmentSectionBase.Name, Image = assessmentSectionBase => RingtoetsFormsResources.AssessmentSectionFolderIcon, @@ -231,7 +231,7 @@ private static bool CloseFailureMechanismResultViewForData(FailureMechanismResultView view, object o) { - var assessmentSectionBase = o as AssessmentSectionBase; + var assessmentSectionBase = o as IAssessmentSection; if (assessmentSectionBase != null) { return assessmentSectionBase.GetFailureMechanisms().Any(failureMechanism => view.Data == failureMechanism.SectionResults); @@ -255,7 +255,7 @@ # region AssessmentSectionBase - private object[] AssessmentSectionBaseChildNodeObjects(AssessmentSectionBase nodeData) + private object[] AssessmentSectionBaseChildNodeObjects(IAssessmentSection nodeData) { var childNodes = new List { @@ -270,7 +270,7 @@ return childNodes.ToArray(); } - private static IEnumerable WrapFailureMechanismsInContexts(AssessmentSectionBase nodeData) + private static IEnumerable WrapFailureMechanismsInContexts(IAssessmentSection nodeData) { foreach (IFailureMechanism failureMechanism in nodeData.GetFailureMechanisms()) { @@ -291,21 +291,21 @@ } } - private void AssessmentSectionBaseOnNodeRenamed(AssessmentSectionBase nodeData, string newName) + private void AssessmentSectionBaseOnNodeRenamed(IAssessmentSection nodeData, string newName) { nodeData.Name = newName; nodeData.NotifyObservers(); } - private void AssessmentSectionBaseOnNodeRemoved(AssessmentSectionBase nodeData, object parentNodeData) + private void AssessmentSectionBaseOnNodeRemoved(IAssessmentSection nodeData, object parentNodeData) { var parentProject = (Project) parentNodeData; parentProject.Items.Remove(nodeData); parentProject.NotifyObservers(); } - private ContextMenuStrip AssessmentSectionBaseContextMenuStrip(AssessmentSectionBase nodeData, object parentData, TreeViewControl treeViewControl) + private ContextMenuStrip AssessmentSectionBaseContextMenuStrip(IAssessmentSection nodeData, object parentData, TreeViewControl treeViewControl) { return Gui.Get(nodeData, treeViewControl) .AddOpenItem() @@ -340,7 +340,7 @@ }; } - private IList GetInputs(FailureMechanismPlaceholder nodeData, AssessmentSectionBase assessmentSection) + private IList GetInputs(FailureMechanismPlaceholder nodeData, IAssessmentSection assessmentSection) { return new ArrayList { @@ -571,7 +571,7 @@ } } - private static TargetProbabilityCalculationActivity CreateHydraRingActivity(AssessmentSectionBase assessmentSection, HydraulicBoundaryLocation hydraulicBoundaryLocation, string hlcdDirectory) + private static TargetProbabilityCalculationActivity CreateHydraRingActivity(IAssessmentSection assessmentSection, HydraulicBoundaryLocation hydraulicBoundaryLocation, string hlcdDirectory) { return HydraRingActivityFactory.Create( string.Format(Resources.RingtoetsGuiPlugin_Calculate_assessment_level_for_location_0_, hydraulicBoundaryLocation.Id), @@ -614,7 +614,7 @@ } } - private static void ClearCalculations(AssessmentSectionBase nodeData) + private static void ClearCalculations(IAssessmentSection nodeData) { var failureMechanisms = nodeData.GetFailureMechanisms(); Index: Ringtoets/Integration/test/Ringtoets.Integration.Data.Test/AssessmentSectionTest.cs =================================================================== diff -u -reaba38093f5f76350766303e83e497fd4af07227 -r3434a272cc8bfb25dae4bd7bd50afedb377343c0 --- Ringtoets/Integration/test/Ringtoets.Integration.Data.Test/AssessmentSectionTest.cs (.../AssessmentSectionTest.cs) (revision eaba38093f5f76350766303e83e497fd4af07227) +++ Ringtoets/Integration/test/Ringtoets.Integration.Data.Test/AssessmentSectionTest.cs (.../AssessmentSectionTest.cs) (revision 3434a272cc8bfb25dae4bd7bd50afedb377343c0) @@ -50,7 +50,7 @@ // Assert Assert.IsInstanceOf(section); - Assert.IsInstanceOf(section); + Assert.IsInstanceOf(section); Assert.AreEqual("Traject", section.Name); Assert.IsNull(section.ReferenceLine); @@ -159,6 +159,21 @@ } [Test] + public void ReferenceLine_SetNewValue_GetNewValue() + { + // Setup + var assessmentSection = new AssessmentSection(); + + var referenceLine = new ReferenceLine(); + + // Call + assessmentSection.ReferenceLine = referenceLine; + + // Assert + Assert.AreSame(referenceLine, assessmentSection.ReferenceLine); + } + + [Test] public void ReferenceLine_SomeReferenceLine_GeneralPipingInputSectionLengthSet() { // Setup Index: Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/PresentationObjects/FailureMechanismPlaceholderContextTest.cs =================================================================== diff -u -r7144ed9829e56a34e064267053216ffbcf6cff52 -r3434a272cc8bfb25dae4bd7bd50afedb377343c0 --- Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/PresentationObjects/FailureMechanismPlaceholderContextTest.cs (.../FailureMechanismPlaceholderContextTest.cs) (revision 7144ed9829e56a34e064267053216ffbcf6cff52) +++ Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/PresentationObjects/FailureMechanismPlaceholderContextTest.cs (.../FailureMechanismPlaceholderContextTest.cs) (revision 3434a272cc8bfb25dae4bd7bd50afedb377343c0) @@ -17,7 +17,7 @@ { // Setup var mocks = new MockRepository(); - var assessmentSection = mocks.Stub(); + var assessmentSection = mocks.Stub(); mocks.ReplayAll(); var failureMechanism = new FailureMechanismPlaceholder("A"); Index: Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/PresentationObjects/HydraulicBoundaryDatabaseContextTest.cs =================================================================== diff -u -r80576716d918faade1c20baeb13971641ac5aac1 -r3434a272cc8bfb25dae4bd7bd50afedb377343c0 --- Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/PresentationObjects/HydraulicBoundaryDatabaseContextTest.cs (.../HydraulicBoundaryDatabaseContextTest.cs) (revision 80576716d918faade1c20baeb13971641ac5aac1) +++ Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/PresentationObjects/HydraulicBoundaryDatabaseContextTest.cs (.../HydraulicBoundaryDatabaseContextTest.cs) (revision 3434a272cc8bfb25dae4bd7bd50afedb377343c0) @@ -40,7 +40,7 @@ { // Setup var mocks = new MockRepository(); - var assessmentSectionBaseMock = mocks.StrictMock(); + var assessmentSectionBaseMock = mocks.StrictMock(); mocks.ReplayAll(); // Call @@ -70,7 +70,7 @@ { // Setup var mocks = new MockRepository(); - var assessmentSection = mocks.Stub(); + var assessmentSection = mocks.Stub(); mocks.ReplayAll(); var context = new HydraulicBoundaryDatabaseContext(assessmentSection); @@ -87,7 +87,7 @@ { // Setup var mocks = new MockRepository(); - var assessmentSection = mocks.Stub(); + var assessmentSection = mocks.Stub(); mocks.ReplayAll(); var context = new HydraulicBoundaryDatabaseContext(assessmentSection); @@ -104,7 +104,7 @@ { // Setup var mocks = new MockRepository(); - var assessmentSection = mocks.Stub(); + var assessmentSection = mocks.Stub(); mocks.ReplayAll(); var context = new HydraulicBoundaryDatabaseContext(assessmentSection); @@ -123,7 +123,7 @@ { // Setup var mocks = new MockRepository(); - var assessmentSection = mocks.Stub(); + var assessmentSection = mocks.Stub(); mocks.ReplayAll(); object context1 = new HydraulicBoundaryDatabaseContext(assessmentSection); @@ -143,8 +143,8 @@ { // Setup var mocks = new MockRepository(); - var assessmentSection1 = mocks.Stub(); - var assessmentSection2 = mocks.Stub(); + var assessmentSection1 = mocks.Stub(); + var assessmentSection2 = mocks.Stub(); mocks.ReplayAll(); object context1 = new HydraulicBoundaryDatabaseContext(assessmentSection1); @@ -164,7 +164,7 @@ { // Setup var mocks = new MockRepository(); - var assessmentSection = mocks.Stub(); + var assessmentSection = mocks.Stub(); mocks.ReplayAll(); object context1 = new HydraulicBoundaryDatabaseContext(assessmentSection); Index: Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/PropertyClasses/AssessmentSectionPropertiesTest.cs =================================================================== diff -u -r8b5a6f938fe2b04cd78623649df37580e145055f -r3434a272cc8bfb25dae4bd7bd50afedb377343c0 --- Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/PropertyClasses/AssessmentSectionPropertiesTest.cs (.../AssessmentSectionPropertiesTest.cs) (revision 8b5a6f938fe2b04cd78623649df37580e145055f) +++ Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/PropertyClasses/AssessmentSectionPropertiesTest.cs (.../AssessmentSectionPropertiesTest.cs) (revision 3434a272cc8bfb25dae4bd7bd50afedb377343c0) @@ -19,7 +19,7 @@ var properties = new AssessmentSectionBaseProperties(); // Assert - Assert.IsInstanceOf>(properties); + Assert.IsInstanceOf>(properties); Assert.IsNull(properties.Data); } Index: Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/PropertyClasses/HydraulicBoundaryDatabasePropertiesTest.cs =================================================================== diff -u -r0e801c8485332bd9cdd1a907619f1f93e495ba4c -r3434a272cc8bfb25dae4bd7bd50afedb377343c0 --- Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/PropertyClasses/HydraulicBoundaryDatabasePropertiesTest.cs (.../HydraulicBoundaryDatabasePropertiesTest.cs) (revision 0e801c8485332bd9cdd1a907619f1f93e495ba4c) +++ Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/PropertyClasses/HydraulicBoundaryDatabasePropertiesTest.cs (.../HydraulicBoundaryDatabasePropertiesTest.cs) (revision 3434a272cc8bfb25dae4bd7bd50afedb377343c0) @@ -26,7 +26,6 @@ using Ringtoets.Common.Data; using Ringtoets.HydraRing.Data; -using Ringtoets.Integration.Data; using Ringtoets.Integration.Forms.PresentationObjects; using Ringtoets.Integration.Forms.PropertyClasses; @@ -51,7 +50,7 @@ { // Setup var mocks = new MockRepository(); - var assessmentSectionBaseMock = mocks.StrictMock(); + var assessmentSectionBaseMock = mocks.Stub(); mocks.ReplayAll(); HydraulicBoundaryLocation hydraulicBoundaryLocation = new HydraulicBoundaryLocation(1, "name", 1.0, 2.0); Index: Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/TreeNodeInfos/AssessmentSectionBaseTreeNodeInfoTest.cs =================================================================== diff -u -rb79e419a1fcdf3d80760ea4bc35ac354525911d2 -r3434a272cc8bfb25dae4bd7bd50afedb377343c0 --- Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/TreeNodeInfos/AssessmentSectionBaseTreeNodeInfoTest.cs (.../AssessmentSectionBaseTreeNodeInfoTest.cs) (revision b79e419a1fcdf3d80760ea4bc35ac354525911d2) +++ Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/TreeNodeInfos/AssessmentSectionBaseTreeNodeInfoTest.cs (.../AssessmentSectionBaseTreeNodeInfoTest.cs) (revision 3434a272cc8bfb25dae4bd7bd50afedb377343c0) @@ -11,6 +11,7 @@ using Ringtoets.Common.Data; using Ringtoets.Common.Data.Contribution; using Ringtoets.Common.Forms.PresentationObjects; +using Ringtoets.HydraRing.Data; using Ringtoets.Integration.Data.Placeholders; using Ringtoets.Integration.Forms.PresentationObjects; using Ringtoets.Integration.Plugin; @@ -33,7 +34,7 @@ { mocks = new MockRepository(); plugin = new RingtoetsGuiPlugin(); - info = plugin.GetTreeNodeInfos().First(tni => tni.TagType == typeof(AssessmentSectionBase)); + info = plugin.GetTreeNodeInfos().First(tni => tni.TagType == typeof(IAssessmentSection)); } [TearDown] @@ -46,7 +47,7 @@ public void Initialized_Always_ExpectedPropertiesSet() { // Assert - Assert.AreEqual(typeof(AssessmentSectionBase), info.TagType); + Assert.AreEqual(typeof(IAssessmentSection), info.TagType); Assert.IsNull(info.ForeColor); Assert.IsNull(info.CanCheck); Assert.IsNull(info.IsChecked); @@ -61,8 +62,9 @@ public void Text_Always_ReturnsName() { // Setup - var assessmentSection = mocks.StrictMock(); var testName = "ttt"; + + var assessmentSection = mocks.Stub(); assessmentSection.Name = testName; mocks.ReplayAll(); @@ -80,7 +82,7 @@ public void Image_Always_ReturnsSetImage() { // Setup - var assessmentSection = mocks.StrictMock(); + var assessmentSection = mocks.StrictMock(); mocks.ReplayAll(); @@ -97,7 +99,7 @@ public void EnsureVisibleOnCreate_Always_ReturnsTrue() { // Setup - var assessmentSection = mocks.StrictMock(); + var assessmentSection = mocks.StrictMock(); mocks.ReplayAll(); @@ -114,14 +116,19 @@ public void ChildNodeObjects_Always_ReturnsChildsOnData() { // Setup - var failureMechanismList = new List + var failureMechanisms = new IFailureMechanism[] { new PipingFailureMechanism(), new FailureMechanismPlaceholder("A") }; - var contribution = new FailureMechanismContribution(failureMechanismList, 10.0, 2); - var assessmentSection = new TestAssessmentSectionBase(contribution, failureMechanismList); + var contribution = new FailureMechanismContribution(failureMechanisms, 10.0, 2); + var assessmentSection = mocks.Stub(); + assessmentSection.Stub(section => section.FailureMechanismContribution).Return(contribution); + assessmentSection.Stub(section => section.GetFailureMechanisms()).Return(failureMechanisms); + mocks.ReplayAll(); + + // Call var objects = info.ChildNodeObjects(assessmentSection).ToArray(); @@ -138,11 +145,11 @@ Assert.AreSame(assessmentSection, context.Parent); var pipingFailureMechanismContext = (PipingFailureMechanismContext)objects[3]; - Assert.AreSame(failureMechanismList[0], pipingFailureMechanismContext.WrappedData); + Assert.AreSame(failureMechanisms[0], pipingFailureMechanismContext.WrappedData); Assert.AreSame(assessmentSection, pipingFailureMechanismContext.Parent); var placeholderFailureMechanismContext = (FailureMechanismPlaceholderContext)objects[4]; - Assert.AreSame(failureMechanismList[1], placeholderFailureMechanismContext.WrappedData); + Assert.AreSame(failureMechanisms[1], placeholderFailureMechanismContext.WrappedData); Assert.AreSame(assessmentSection, placeholderFailureMechanismContext.Parent); mocks.VerifyAll(); @@ -196,15 +203,11 @@ public void OnNodeRenamed_WithData_SetProjectNameWithNotification() { // Setup - var assessmentSectionObserver = mocks.StrictMock(); - var assessmentSection = mocks.Stub(); - - assessmentSectionObserver.Expect(o => o.UpdateObserver()); - + var assessmentSection = mocks.Stub(); + assessmentSection.Expect(section => section.NotifyObservers()); + mocks.ReplayAll(); - assessmentSection.Attach(assessmentSectionObserver); - // Call const string newName = "New Name"; info.OnNodeRenamed(assessmentSection, newName); @@ -229,7 +232,7 @@ { // Setup var observerMock = mocks.StrictMock(); - var assessmentSection = mocks.Stub(); + var assessmentSection = mocks.Stub(); observerMock.Expect(o => o.UpdateObserver()); @@ -248,20 +251,4 @@ mocks.VerifyAll(); } } - - public class TestAssessmentSectionBase : AssessmentSectionBase - { - private readonly IEnumerable failureMechanisms; - - public TestAssessmentSectionBase(FailureMechanismContribution contribution, IEnumerable failureMechanisms) - { - FailureMechanismContribution = contribution; - this.failureMechanisms = failureMechanisms; - } - - public override IEnumerable GetFailureMechanisms() - { - return failureMechanisms; - } - } } \ No newline at end of file Index: Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/TreeNodeInfos/FailureMechanismPlaceholderTreeNodeInfoTest.cs =================================================================== diff -u -r2c58a8ed345659c071f1531edb80bf6fc9e4f913 -r3434a272cc8bfb25dae4bd7bd50afedb377343c0 --- Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/TreeNodeInfos/FailureMechanismPlaceholderTreeNodeInfoTest.cs (.../FailureMechanismPlaceholderTreeNodeInfoTest.cs) (revision 2c58a8ed345659c071f1531edb80bf6fc9e4f913) +++ Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/TreeNodeInfos/FailureMechanismPlaceholderTreeNodeInfoTest.cs (.../FailureMechanismPlaceholderTreeNodeInfoTest.cs) (revision 3434a272cc8bfb25dae4bd7bd50afedb377343c0) @@ -64,7 +64,7 @@ public void Text_Always_ReturnsName() { // Setup - var assessmentSection = mocks.Stub(); + var assessmentSection = mocks.Stub(); mocks.ReplayAll(); var testName = "ttt"; @@ -103,7 +103,7 @@ public void ChildNodeObjects_Always_ReturnFoldersWithInputAndOutput() { // Setup - var assessmentSection = mocks.Stub(); + var assessmentSection = mocks.Stub(); mocks.ReplayAll(); var failureMechanism = new FailureMechanismPlaceholder("test"); Index: Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/TreeNodeInfos/FailureMechanismSectionsContextTreeNodeInfoTest.cs =================================================================== diff -u -rfcc49aac894f989182fb9faa487e50a585fbed03 -r3434a272cc8bfb25dae4bd7bd50afedb377343c0 --- Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/TreeNodeInfos/FailureMechanismSectionsContextTreeNodeInfoTest.cs (.../FailureMechanismSectionsContextTreeNodeInfoTest.cs) (revision fcc49aac894f989182fb9faa487e50a585fbed03) +++ Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/TreeNodeInfos/FailureMechanismSectionsContextTreeNodeInfoTest.cs (.../FailureMechanismSectionsContextTreeNodeInfoTest.cs) (revision 3434a272cc8bfb25dae4bd7bd50afedb377343c0) @@ -93,7 +93,7 @@ menuBuilderMock.Expect(mb => mb.Build()).Return(null); var failureMechanism = mocks.Stub(); - var assessmentSection = mocks.Stub(); + var assessmentSection = mocks.Stub(); var context = new FailureMechanismSectionsContext(failureMechanism, assessmentSection); var gui = mocks.StrictMock(); @@ -114,7 +114,7 @@ public void ForeColor_NoSectionsOnFailureMechanism_ReturnGrayText() { // Setup - var assessmentSection = mocks.Stub(); + var assessmentSection = mocks.Stub(); var failureMechanism = mocks.Stub(); failureMechanism.Stub(fm => fm.Sections).Return(Enumerable.Empty()); mocks.ReplayAll(); @@ -133,7 +133,7 @@ public void ForeColor_HasSectionsOnFailureMechanism_ReturnControlText() { // Setup - var assessmentSection = mocks.Stub(); + var assessmentSection = mocks.Stub(); var failureMechanism = mocks.Stub(); failureMechanism.Stub(fm => fm.Sections).Return(new[] { Index: Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/TreeNodeInfos/HydraulicBoundaryDatabaseContextTreeNodeInfoTest.cs =================================================================== diff -u -r08ab7af115b5bbad87eaffb9bc1b1c4379ec8738 -r3434a272cc8bfb25dae4bd7bd50afedb377343c0 --- Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/TreeNodeInfos/HydraulicBoundaryDatabaseContextTreeNodeInfoTest.cs (.../HydraulicBoundaryDatabaseContextTreeNodeInfoTest.cs) (revision 08ab7af115b5bbad87eaffb9bc1b1c4379ec8738) +++ Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/TreeNodeInfos/HydraulicBoundaryDatabaseContextTreeNodeInfoTest.cs (.../HydraulicBoundaryDatabaseContextTreeNodeInfoTest.cs) (revision 3434a272cc8bfb25dae4bd7bd50afedb377343c0) @@ -65,7 +65,7 @@ { // Setup var name = "Hydraulische randvoorwaarden"; - var assessmentSectionMock = mocks.StrictMock(); + var assessmentSectionMock = mocks.StrictMock(); mocks.ReplayAll(); @@ -107,7 +107,7 @@ var guiMock = mocks.StrictMock(); var menuBuilderMock = mocks.StrictMock(); var treeViewControlMock = mocks.StrictMock(); - var assessmentSectionMock = mocks.StrictMock(); + var assessmentSectionMock = mocks.Stub(); var nodeData = new HydraulicBoundaryDatabaseContext(assessmentSectionMock); @@ -141,7 +141,7 @@ // Setup var guiMock = mocks.StrictMock(); var treeViewControlMock = mocks.StrictMock(); - var assessmentSectionMock = mocks.StrictMock(); + var assessmentSectionMock = mocks.Stub(); var nodeData = new HydraulicBoundaryDatabaseContext(assessmentSectionMock); @@ -168,7 +168,7 @@ // Setup var guiMock = mocks.StrictMock(); var treeViewControlMock = mocks.StrictMock(); - var assessmentSectionMock = mocks.StrictMock(); + var assessmentSectionMock = mocks.Stub(); var nodeData = new HydraulicBoundaryDatabaseContext(assessmentSectionMock); nodeData.Parent.HydraulicBoundaryDatabase = new HydraulicBoundaryDatabase(); @@ -197,41 +197,45 @@ // Given var gui = mocks.DynamicMock(); - var assessmentSectionBaseObserver = mocks.StrictMock(); var hydraulicBoundaryDatabaseContextObserver = mocks.StrictMock(); var mainWindow = mocks.DynamicMock(); var treeViewControlMock = mocks.StrictMock(); + var contextMenuRunAssessmentLevelCalculationsIndex = 3; + var hydraulicBoundaryLocation1 = new HydraulicBoundaryLocation(100001, "", 1.1, 2.2); var hydraulicBoundaryLocation2 = new HydraulicBoundaryLocation(100002, "", 3.3, 4.4) { DesignWaterLevel = 4.2 }; - var assessmentSectionBase = new AssessmentSectionBaseImplementation + + var hydraulicBoundaryDatabase = new HydraulicBoundaryDatabase { - Name = "Dummy", - HydraulicBoundaryDatabase = new HydraulicBoundaryDatabase + Locations = { - Locations = - { - hydraulicBoundaryLocation1, - hydraulicBoundaryLocation2 - }, - FilePath = "D:/nonExistingDirectory/nonExistingFile", - Version = "random" - } + hydraulicBoundaryLocation1, + hydraulicBoundaryLocation2 + }, + FilePath = "D:/nonExistingDirectory/nonExistingFile", + Version = "random" }; + var failureMechanismContribution = new FailureMechanismContribution(Enumerable.Empty(), 10, 30000); + + var assessmentSectionBase = mocks.Stub(); + assessmentSectionBase.Name = "Dummy"; + assessmentSectionBase.HydraulicBoundaryDatabase = hydraulicBoundaryDatabase; + assessmentSectionBase.Stub(section => section.FailureMechanismContribution).Return(failureMechanismContribution); + assessmentSectionBase.Expect(section => section.NotifyObservers()); + var hydraulicBoundaryDatabaseContext = new HydraulicBoundaryDatabaseContext(assessmentSectionBase); - assessmentSectionBaseObserver.Expect(o => o.UpdateObserver()); hydraulicBoundaryDatabaseContextObserver.Expect(o => o.UpdateObserver()); gui.Expect(cmp => cmp.Get(hydraulicBoundaryDatabaseContext, treeViewControlMock)).Return(new CustomItemsOnlyContextMenuBuilder()); gui.Expect(g => g.MainWindow).Return(mainWindow); mocks.ReplayAll(); - assessmentSectionBase.Attach(assessmentSectionBaseObserver); hydraulicBoundaryDatabaseContext.Attach(hydraulicBoundaryDatabaseContextObserver); plugin.Gui = gui; @@ -270,7 +274,7 @@ public void ForeColor_ContextHasNoReferenceLine_ReturnDisabledColor() { // Setup - var assessmentSection = mocks.Stub(); + var assessmentSection = mocks.Stub(); mocks.ReplayAll(); var hydraulicBoundaryDatabaseContext = new HydraulicBoundaryDatabaseContext(assessmentSection); @@ -287,7 +291,7 @@ public void ForeColor_ContextHasReferenceLineData_ReturnControlText() { // Setup - var assessmentSection = mocks.Stub(); + var assessmentSection = mocks.Stub(); assessmentSection.HydraulicBoundaryDatabase = new HydraulicBoundaryDatabase(); mocks.ReplayAll(); @@ -300,18 +304,5 @@ Assert.AreEqual(Color.FromKnownColor(KnownColor.ControlText), color); mocks.VerifyAll(); } - - private class AssessmentSectionBaseImplementation : AssessmentSectionBase - { - public AssessmentSectionBaseImplementation() - { - FailureMechanismContribution = new FailureMechanismContribution(Enumerable.Empty(), 10, 30000); - } - - public override IEnumerable GetFailureMechanisms() - { - yield break; - } - } } } \ No newline at end of file Index: Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/TreeNodeInfos/ReferenceLineContextTreeNodeInfoTest.cs =================================================================== diff -u -rb79e419a1fcdf3d80760ea4bc35ac354525911d2 -r3434a272cc8bfb25dae4bd7bd50afedb377343c0 --- Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/TreeNodeInfos/ReferenceLineContextTreeNodeInfoTest.cs (.../ReferenceLineContextTreeNodeInfoTest.cs) (revision b79e419a1fcdf3d80760ea4bc35ac354525911d2) +++ Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/TreeNodeInfos/ReferenceLineContextTreeNodeInfoTest.cs (.../ReferenceLineContextTreeNodeInfoTest.cs) (revision 3434a272cc8bfb25dae4bd7bd50afedb377343c0) @@ -64,7 +64,7 @@ public void Text_Always_ReturnsName() { // Setup - var assessmentSection = mocks.StrictMock(); + var assessmentSection = mocks.StrictMock(); mocks.ReplayAll(); var referenceLine = new ReferenceLine(); @@ -84,7 +84,7 @@ public void Image_Always_ReturnsSetImage() { // Setup - var assessmentSection = mocks.StrictMock(); + var assessmentSection = mocks.StrictMock(); mocks.ReplayAll(); var referenceLine = new ReferenceLine(); @@ -126,7 +126,7 @@ public void ForeColor_ContextHasNoReferenceLine_ReturnDisabledColor() { // Setup - var assessmentSection = mocks.Stub(); + var assessmentSection = mocks.Stub(); mocks.ReplayAll(); var referenceLineContext = new ReferenceLineContext(assessmentSection); @@ -143,7 +143,7 @@ public void ForeColor_ContextHasReferenceLineData_ReturnControlText() { // Setup - var assessmentSection = mocks.Stub(); + var assessmentSection = mocks.Stub(); assessmentSection.ReferenceLine = new ReferenceLine(); mocks.ReplayAll(); Index: Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/AssessmentSectionViewTest.cs =================================================================== diff -u -recef7aa46cb8fb7d138a5cc00a35f9e7aa7676b6 -r3434a272cc8bfb25dae4bd7bd50afedb377343c0 --- Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/AssessmentSectionViewTest.cs (.../AssessmentSectionViewTest.cs) (revision ecef7aa46cb8fb7d138a5cc00a35f9e7aa7676b6) +++ Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/AssessmentSectionViewTest.cs (.../AssessmentSectionViewTest.cs) (revision 3434a272cc8bfb25dae4bd7bd50afedb377343c0) @@ -29,6 +29,7 @@ using Core.Components.Gis.Data; using NUnit.Framework; using Ringtoets.Common.Data; +using Ringtoets.Common.Data.Contribution; using Ringtoets.HydraRing.Data; using Ringtoets.Integration.Forms.Views; @@ -79,7 +80,7 @@ view.Data = assessmentSectionBase; // Assert - var mapData = (MapDataCollection) map.Data; + MapDataCollection mapData = map.Data; Assert.AreEqual(2, mapData.List.Count); @@ -123,7 +124,7 @@ // Assert Assert.AreSame(assessmentSectionBase, view.Data); Assert.IsInstanceOf(map.Data); - var mapData = map.Data as MapDataCollection; + MapDataCollection mapData = map.Data; Assert.IsNotNull(mapData); var hrLocationsMapData = (MapPointData)mapData.List[0]; @@ -307,12 +308,19 @@ Assert.AreEqual(dataBeforeUpdate, map.Data); } - private class TestAssessmentSectionBase : AssessmentSectionBase + private class TestAssessmentSectionBase : Observable, IAssessmentSection { - public override IEnumerable GetFailureMechanisms() + public string Name { get; set; } + public ReferenceLine ReferenceLine { get; set; } + public FailureMechanismContribution FailureMechanismContribution { get; private set; } + public HydraulicBoundaryDatabase HydraulicBoundaryDatabase { get; set; } + + public IEnumerable GetFailureMechanisms() { yield break; } + + public long StorageId { get; set; } } } } \ No newline at end of file Index: Ringtoets/Integration/test/Ringtoets.Integration.Plugin.Test/FileImporters/FailureMechanismSectionsImporterTest.cs =================================================================== diff -u -rb79e419a1fcdf3d80760ea4bc35ac354525911d2 -r3434a272cc8bfb25dae4bd7bd50afedb377343c0 --- Ringtoets/Integration/test/Ringtoets.Integration.Plugin.Test/FileImporters/FailureMechanismSectionsImporterTest.cs (.../FailureMechanismSectionsImporterTest.cs) (revision b79e419a1fcdf3d80760ea4bc35ac354525911d2) +++ Ringtoets/Integration/test/Ringtoets.Integration.Plugin.Test/FileImporters/FailureMechanismSectionsImporterTest.cs (.../FailureMechanismSectionsImporterTest.cs) (revision 3434a272cc8bfb25dae4bd7bd50afedb377343c0) @@ -45,7 +45,7 @@ // Setup var mocks = new MockRepository(); var failureMechanism = mocks.Stub(); - var assessmentSection = mocks.Stub(); + var assessmentSection = mocks.Stub(); assessmentSection.ReferenceLine = new ReferenceLine(); mocks.ReplayAll(); @@ -67,7 +67,7 @@ // Setup var mocks = new MockRepository(); var failureMechanism = mocks.Stub(); - var assessmentSection = mocks.Stub(); + var assessmentSection = mocks.Stub(); assessmentSection.ReferenceLine = null; mocks.ReplayAll(); @@ -91,7 +91,7 @@ var sectionsFilePath = TestHelper.GetTestDataPath(TestDataPath.Ringtoets.Common.IO, "traject_1-1_vakken.shp"); var mocks = new MockRepository(); - var assessmentSection = mocks.Stub(); + var assessmentSection = mocks.Stub(); mocks.ReplayAll(); var referenceLineContext = new ReferenceLineContext(assessmentSection); @@ -124,7 +124,7 @@ var sectionsFilePath = TestHelper.GetTestDataPath(TestDataPath.Ringtoets.Common.IO, "traject_1-1_vakken.shp"); var mocks = new MockRepository(); - var assessmentSection = mocks.Stub(); + var assessmentSection = mocks.Stub(); mocks.ReplayAll(); var referenceLineContext = new ReferenceLineContext(assessmentSection); @@ -158,7 +158,7 @@ var sectionsFilePath = TestHelper.GetTestDataPath(TestDataPath.Ringtoets.Common.IO, "Artificial_referencelijn_testA_ValidVakken.shp"); var mocks = new MockRepository(); - var assessmentSection = mocks.Stub(); + var assessmentSection = mocks.Stub(); mocks.ReplayAll(); var referenceLineContext = new ReferenceLineContext(assessmentSection); @@ -191,7 +191,7 @@ var sectionsFilePath = TestHelper.GetTestDataPath(TestDataPath.Ringtoets.Common.IO, "Artificial_referencelijn_testA_ValidVakken.shp"); var mocks = new MockRepository(); - var assessmentSection = mocks.Stub(); + var assessmentSection = mocks.Stub(); mocks.ReplayAll(); var referenceLineContext = new ReferenceLineContext(assessmentSection); @@ -243,7 +243,7 @@ var sectionsFilePath = TestHelper.GetTestDataPath(TestDataPath.Ringtoets.Common.IO, Path.DirectorySeparatorChar.ToString()); var mocks = new MockRepository(); - var assessmentSection = mocks.Stub(); + var assessmentSection = mocks.Stub(); mocks.ReplayAll(); var referenceLineContext = new ReferenceLineContext(assessmentSection); @@ -278,7 +278,7 @@ var sectionsFilePath = TestHelper.GetTestDataPath(TestDataPath.Ringtoets.Common.IO, "I_dont_exist.shp"); var mocks = new MockRepository(); - var assessmentSection = mocks.Stub(); + var assessmentSection = mocks.Stub(); mocks.ReplayAll(); var referenceLineContext = new ReferenceLineContext(assessmentSection); @@ -312,7 +312,7 @@ var sectionsFilePath = TestHelper.GetTestDataPath(TestDataPath.Ringtoets.Common.IO, "traject_1-1_vakken.shp"); var mocks = new MockRepository(); - var assessmentSection = mocks.Stub(); + var assessmentSection = mocks.Stub(); assessmentSection.ReferenceLine = null; mocks.ReplayAll(); @@ -343,7 +343,7 @@ var sectionsFilePath = TestHelper.GetTestDataPath(TestDataPath.Ringtoets.Common.IO, "Artificial_referencelijn_testA_EmptyVakken.shp"); var mocks = new MockRepository(); - var assessmentSection = mocks.Stub(); + var assessmentSection = mocks.Stub(); mocks.ReplayAll(); var referenceLineContext = new ReferenceLineContext(assessmentSection); @@ -380,7 +380,7 @@ var sectionsFilePath = TestHelper.GetTestDataPath(TestDataPath.Ringtoets.Common.IO, shapeFileName); var mocks = new MockRepository(); - var assessmentSection = mocks.Stub(); + var assessmentSection = mocks.Stub(); mocks.ReplayAll(); var referenceLineContext = new ReferenceLineContext(assessmentSection); @@ -417,7 +417,7 @@ var sectionsFilePath = TestHelper.GetTestDataPath(TestDataPath.Ringtoets.Common.IO, shapeFileName); var mocks = new MockRepository(); - var assessmentSection = mocks.Stub(); + var assessmentSection = mocks.Stub(); mocks.ReplayAll(); var referenceLineContext = new ReferenceLineContext(assessmentSection); @@ -452,7 +452,7 @@ var sectionsFilePath = TestHelper.GetTestDataPath(TestDataPath.Ringtoets.Common.IO, "Artificial_referencelijn_testA_InvalidVakken_NotCoveringWholeReferenceLine.shp"); var mocks = new MockRepository(); - var assessmentSection = mocks.Stub(); + var assessmentSection = mocks.Stub(); mocks.ReplayAll(); var referenceLineContext = new ReferenceLineContext(assessmentSection); @@ -487,7 +487,7 @@ var sectionsFilePath = TestHelper.GetTestDataPath(TestDataPath.Ringtoets.Common.IO, "Artificial_referencelijn_testA_InvalidVakken_PointsTooFarFromReferenceLine.shp"); var mocks = new MockRepository(); - var assessmentSection = mocks.Stub(); + var assessmentSection = mocks.Stub(); mocks.ReplayAll(); var referenceLineContext = new ReferenceLineContext(assessmentSection); @@ -522,7 +522,7 @@ var sectionsFilePath = TestHelper.GetTestDataPath(TestDataPath.Ringtoets.Common.IO, "traject_1-1_vakken.shp"); var mocks = new MockRepository(); - var assessmentSection = mocks.Stub(); + var assessmentSection = mocks.Stub(); mocks.ReplayAll(); var referenceLineContext = new ReferenceLineContext(assessmentSection); Index: Ringtoets/Integration/test/Ringtoets.Integration.Plugin.Test/FileImporters/HydraulicBoundaryDatabaseImporterTest.cs =================================================================== diff -u -r088f1f6f74733f2b37f6b79b434026bdbc34c941 -r3434a272cc8bfb25dae4bd7bd50afedb377343c0 --- Ringtoets/Integration/test/Ringtoets.Integration.Plugin.Test/FileImporters/HydraulicBoundaryDatabaseImporterTest.cs (.../HydraulicBoundaryDatabaseImporterTest.cs) (revision 088f1f6f74733f2b37f6b79b434026bdbc34c941) +++ Ringtoets/Integration/test/Ringtoets.Integration.Plugin.Test/FileImporters/HydraulicBoundaryDatabaseImporterTest.cs (.../HydraulicBoundaryDatabaseImporterTest.cs) (revision 3434a272cc8bfb25dae4bd7bd50afedb377343c0) @@ -143,12 +143,10 @@ { // Setup var mocks = new MockRepository(); - var assessmentSection = mocks.StrictMock(); - var observer = mocks.StrictMock(); + var assessmentSection = mocks.Stub(); + assessmentSection.Expect(section => section.NotifyObservers()).Repeat.Never(); mocks.ReplayAll(); - assessmentSection.Attach(observer); - var context = new HydraulicBoundaryDatabaseContext(assessmentSection); var expectedMessage = "Er is nog geen bestand geopend."; @@ -167,15 +165,10 @@ { // Setup var mocks = new MockRepository(); - var assessmentSection = mocks.StrictMock(); - var observer = mocks.StrictMock(); - - observer.Expect(o => o.UpdateObserver()); - + var assessmentSection = mocks.Stub(); + assessmentSection.Expect(section => section.NotifyObservers()); mocks.ReplayAll(); - assessmentSection.Attach(observer); - var importTarget = new HydraulicBoundaryDatabaseContext(assessmentSection); string validFilePath = Path.Combine(testDataPath, "complete.sqlite"); @@ -208,12 +201,10 @@ { // Setup var mocks = new MockRepository(); - var assessmentSection = mocks.StrictMock(); - var observer = mocks.StrictMock(); + var assessmentSection = mocks.Stub(); + assessmentSection.Expect(section => section.NotifyObservers()).Repeat.Never(); mocks.ReplayAll(); - assessmentSection.Attach(observer); - var importTarget = new HydraulicBoundaryDatabaseContext(assessmentSection); string corruptPath = Path.Combine(testDataPath, "corruptschema.sqlite"); @@ -239,13 +230,11 @@ { // Setup var mocks = new MockRepository(); - var assessmentSection = mocks.StrictMock(); - var observer = mocks.StrictMock(); + var assessmentSection = mocks.Stub(); + assessmentSection.Expect(section => section.NotifyObservers()).Repeat.Never(); var importTarget = mocks.StrictMock(assessmentSection); mocks.ReplayAll(); - assessmentSection.Attach(observer); - string validFilePath = Path.Combine(testDataPath, "corruptschema.sqlite"); string expectedMessage = new FileReaderErrorMessageBuilder(validFilePath) .Build("Kritieke fout opgetreden bij het uitlezen van waardes uit kolommen in de database. Het bestand wordt overgeslagen."); Index: Ringtoets/Integration/test/Ringtoets.Integration.Plugin.Test/RingtoetsApplicationPluginTest.cs =================================================================== diff -u -r8b5a6f938fe2b04cd78623649df37580e145055f -r3434a272cc8bfb25dae4bd7bd50afedb377343c0 --- Ringtoets/Integration/test/Ringtoets.Integration.Plugin.Test/RingtoetsApplicationPluginTest.cs (.../RingtoetsApplicationPluginTest.cs) (revision 8b5a6f938fe2b04cd78623649df37580e145055f) +++ Ringtoets/Integration/test/Ringtoets.Integration.Plugin.Test/RingtoetsApplicationPluginTest.cs (.../RingtoetsApplicationPluginTest.cs) (revision 3434a272cc8bfb25dae4bd7bd50afedb377343c0) @@ -75,7 +75,7 @@ AddAssessmentSectionToProject(project, plugin); // Assert - CollectionAssert.AllItemsAreUnique(project.Items.Cast().Select(section => section.Name)); + CollectionAssert.AllItemsAreUnique(project.Items.Cast().Select(section => section.Name)); } private void AddAssessmentSectionToProject(Project project, RingtoetsApplicationPlugin plugin) Index: Ringtoets/Integration/test/Ringtoets.Integration.Plugin.Test/RingtoetsGuiPluginTest.cs =================================================================== diff -u -r2c58a8ed345659c071f1531edb80bf6fc9e4f913 -r3434a272cc8bfb25dae4bd7bd50afedb377343c0 --- Ringtoets/Integration/test/Ringtoets.Integration.Plugin.Test/RingtoetsGuiPluginTest.cs (.../RingtoetsGuiPluginTest.cs) (revision 2c58a8ed345659c071f1531edb80bf6fc9e4f913) +++ Ringtoets/Integration/test/Ringtoets.Integration.Plugin.Test/RingtoetsGuiPluginTest.cs (.../RingtoetsGuiPluginTest.cs) (revision 3434a272cc8bfb25dae4bd7bd50afedb377343c0) @@ -50,7 +50,7 @@ // assert Assert.AreEqual(2, propertyInfos.Length); - var assessmentSectionProperties = propertyInfos.Single(pi => pi.DataType == typeof(AssessmentSectionBase)); + var assessmentSectionProperties = propertyInfos.Single(pi => pi.DataType == typeof(IAssessmentSection)); Assert.AreEqual(typeof(AssessmentSectionBaseProperties), assessmentSectionProperties.PropertyObjectType); Assert.IsNull(assessmentSectionProperties.AdditionalDataCheck); Assert.IsNull(assessmentSectionProperties.GetObjectPropertiesData); @@ -80,7 +80,7 @@ Assert.AreEqual(typeof(FailureMechanismContributionView), contributionViewInfo.ViewType); TestHelper.AssertImagesAreEqual(RingtoetsCommonFormsResources.GenericInputOutputIcon, contributionViewInfo.Image); - var mapViewInfo = viewInfos.Single(vi => vi.DataType == typeof(AssessmentSectionBase)); + var mapViewInfo = viewInfos.Single(vi => vi.DataType == typeof(IAssessmentSection)); Assert.AreEqual(typeof(AssessmentSectionView), mapViewInfo.ViewType); TestHelper.AssertImagesAreEqual(RingtoetsFormsResources.Map, mapViewInfo.Image); @@ -114,7 +114,7 @@ // assert Assert.AreEqual(9, treeNodeInfos.Length); - Assert.IsTrue(treeNodeInfos.Any(tni => tni.TagType == typeof(AssessmentSectionBase))); + Assert.IsTrue(treeNodeInfos.Any(tni => tni.TagType == typeof(IAssessmentSection))); Assert.IsTrue(treeNodeInfos.Any(tni => tni.TagType == typeof(ReferenceLineContext))); Assert.IsTrue(treeNodeInfos.Any(tni => tni.TagType == typeof(PlaceholderWithReadonlyName))); Assert.IsTrue(treeNodeInfos.Any(tni => tni.TagType == typeof(FailureMechanismPlaceholderContext))); @@ -132,7 +132,7 @@ { // Setup var mocks = new MockRepository(); - var assessmentSectionBase = mocks.Stub(); + var assessmentSectionBase = mocks.Stub(); mocks.ReplayAll(); var guiPlugin = new RingtoetsGuiPlugin(); Index: Ringtoets/Integration/test/Ringtoets.Integration.Plugin.Test/ViewInfos/FailureMechanismResultViewInfoTest.cs =================================================================== diff -u -rd49b0c7df08ca616edb5c3945adbb22eab479bf7 -r3434a272cc8bfb25dae4bd7bd50afedb377343c0 --- Ringtoets/Integration/test/Ringtoets.Integration.Plugin.Test/ViewInfos/FailureMechanismResultViewInfoTest.cs (.../FailureMechanismResultViewInfoTest.cs) (revision d49b0c7df08ca616edb5c3945adbb22eab479bf7) +++ Ringtoets/Integration/test/Ringtoets.Integration.Plugin.Test/ViewInfos/FailureMechanismResultViewInfoTest.cs (.../FailureMechanismResultViewInfoTest.cs) (revision 3434a272cc8bfb25dae4bd7bd50afedb377343c0) @@ -137,7 +137,7 @@ { // Setup var viewMock = mocks.StrictMock(); - var assessmentSectionMock = mocks.StrictMock(); + var assessmentSectionMock = mocks.StrictMock(); var failureMechanism = new SimpleFailureMechanism(); viewMock.Expect(vm => vm.Data).Return(failureMechanism.SectionResults); @@ -157,7 +157,7 @@ { // Setup var viewMock = mocks.StrictMock(); - var assessmentSectionMock = mocks.StrictMock(); + var assessmentSectionMock = mocks.StrictMock(); var failureMechanismMock = mocks.Stub(); var failureMechanism = new SimpleFailureMechanism(); @@ -181,7 +181,7 @@ { // Setup var viewMock = mocks.StrictMock(); - var assessmentSectionMock = mocks.StrictMock(); + var assessmentSectionMock = mocks.StrictMock(); var failureMechanism = new SimpleFailureMechanism(); viewMock.Expect(vm => vm.Data).Return(failureMechanism.SectionResults); Index: Ringtoets/Piping/src/Ringtoets.Piping.Forms/PresentationObjects/PipingCalculationContext.cs =================================================================== diff -u -r43fb77c51a8d1c0af128a2da0c3d51bbea6e25bb -r3434a272cc8bfb25dae4bd7bd50afedb377343c0 --- Ringtoets/Piping/src/Ringtoets.Piping.Forms/PresentationObjects/PipingCalculationContext.cs (.../PipingCalculationContext.cs) (revision 43fb77c51a8d1c0af128a2da0c3d51bbea6e25bb) +++ Ringtoets/Piping/src/Ringtoets.Piping.Forms/PresentationObjects/PipingCalculationContext.cs (.../PipingCalculationContext.cs) (revision 3434a272cc8bfb25dae4bd7bd50afedb377343c0) @@ -42,7 +42,7 @@ /// The stochastic soil models available within the piping context. /// The piping failure mechanism which the piping context belongs to. /// The assessment section which the piping context belongs to. - public PipingCalculationContext(PipingCalculation calculation, IEnumerable surfaceLines, IEnumerable stochasticSoilModels, PipingFailureMechanism pipingFailureMechanism, AssessmentSectionBase assessmentSection) + public PipingCalculationContext(PipingCalculation calculation, IEnumerable surfaceLines, IEnumerable stochasticSoilModels, PipingFailureMechanism pipingFailureMechanism, IAssessmentSection assessmentSection) : base(calculation, surfaceLines, stochasticSoilModels, assessmentSection) { if (pipingFailureMechanism == null) Index: Ringtoets/Piping/src/Ringtoets.Piping.Forms/PresentationObjects/PipingCalculationGroupContext.cs =================================================================== diff -u -r43fb77c51a8d1c0af128a2da0c3d51bbea6e25bb -r3434a272cc8bfb25dae4bd7bd50afedb377343c0 --- Ringtoets/Piping/src/Ringtoets.Piping.Forms/PresentationObjects/PipingCalculationGroupContext.cs (.../PipingCalculationGroupContext.cs) (revision 43fb77c51a8d1c0af128a2da0c3d51bbea6e25bb) +++ Ringtoets/Piping/src/Ringtoets.Piping.Forms/PresentationObjects/PipingCalculationGroupContext.cs (.../PipingCalculationGroupContext.cs) (revision 3434a272cc8bfb25dae4bd7bd50afedb377343c0) @@ -42,7 +42,7 @@ /// The stochastic soil models available within the piping context. /// The piping failure mechanism which the piping context belongs to. /// The assessment section which the piping context belongs to. - public PipingCalculationGroupContext(PipingCalculationGroup calculationGroup, IEnumerable surfaceLines, IEnumerable stochasticSoilModels, PipingFailureMechanism pipingFailureMechanism, AssessmentSectionBase assessmentSection) + public PipingCalculationGroupContext(PipingCalculationGroup calculationGroup, IEnumerable surfaceLines, IEnumerable stochasticSoilModels, PipingFailureMechanism pipingFailureMechanism, IAssessmentSection assessmentSection) : base(calculationGroup, surfaceLines, stochasticSoilModels, assessmentSection) { if (pipingFailureMechanism == null) Index: Ringtoets/Piping/src/Ringtoets.Piping.Forms/PresentationObjects/PipingContext.cs =================================================================== diff -u -r43fb77c51a8d1c0af128a2da0c3d51bbea6e25bb -r3434a272cc8bfb25dae4bd7bd50afedb377343c0 --- Ringtoets/Piping/src/Ringtoets.Piping.Forms/PresentationObjects/PipingContext.cs (.../PipingContext.cs) (revision 43fb77c51a8d1c0af128a2da0c3d51bbea6e25bb) +++ Ringtoets/Piping/src/Ringtoets.Piping.Forms/PresentationObjects/PipingContext.cs (.../PipingContext.cs) (revision 3434a272cc8bfb25dae4bd7bd50afedb377343c0) @@ -49,7 +49,7 @@ T wrappedData, IEnumerable surfaceLines, IEnumerable stochasticSoilModels, - AssessmentSectionBase assessmentSection) + IAssessmentSection assessmentSection) { AssertInputsAreNotNull(wrappedData, surfaceLines, stochasticSoilModels, assessmentSection); @@ -110,7 +110,7 @@ /// /// Gets the assessment section which the piping context belongs to. /// - public AssessmentSectionBase AssessmentSection { get; private set; } + public IAssessmentSection AssessmentSection { get; private set; } /// /// Asserts the inputs are not null. Index: Ringtoets/Piping/src/Ringtoets.Piping.Forms/PresentationObjects/PipingFailureMechanismContext.cs =================================================================== diff -u -rc9ef60f6ee1db12e78cd9471f754c345e8b8d07d -r3434a272cc8bfb25dae4bd7bd50afedb377343c0 --- Ringtoets/Piping/src/Ringtoets.Piping.Forms/PresentationObjects/PipingFailureMechanismContext.cs (.../PipingFailureMechanismContext.cs) (revision c9ef60f6ee1db12e78cd9471f754c345e8b8d07d) +++ Ringtoets/Piping/src/Ringtoets.Piping.Forms/PresentationObjects/PipingFailureMechanismContext.cs (.../PipingFailureMechanismContext.cs) (revision 3434a272cc8bfb25dae4bd7bd50afedb377343c0) @@ -37,7 +37,7 @@ /// The failure mechanism. /// The parent of . /// Thrown when or are null. - public PipingFailureMechanismContext(PipingFailureMechanism failureMechanism, AssessmentSectionBase assessmentSection) : + public PipingFailureMechanismContext(PipingFailureMechanism failureMechanism, IAssessmentSection assessmentSection) : base(failureMechanism, assessmentSection) { Index: Ringtoets/Piping/src/Ringtoets.Piping.Forms/PresentationObjects/PipingInputContext.cs =================================================================== diff -u -r43fb77c51a8d1c0af128a2da0c3d51bbea6e25bb -r3434a272cc8bfb25dae4bd7bd50afedb377343c0 --- Ringtoets/Piping/src/Ringtoets.Piping.Forms/PresentationObjects/PipingInputContext.cs (.../PipingInputContext.cs) (revision 43fb77c51a8d1c0af128a2da0c3d51bbea6e25bb) +++ Ringtoets/Piping/src/Ringtoets.Piping.Forms/PresentationObjects/PipingInputContext.cs (.../PipingInputContext.cs) (revision 3434a272cc8bfb25dae4bd7bd50afedb377343c0) @@ -41,7 +41,7 @@ /// The stochastic soil models available within the piping context. /// The assessment section which the piping context belongs to. /// When any input parameter is null. - public PipingInputContext(PipingInput pipingInput, IEnumerable surfaceLines, IEnumerable stochasticSoilModels, AssessmentSectionBase assessmentSection) + public PipingInputContext(PipingInput pipingInput, IEnumerable surfaceLines, IEnumerable stochasticSoilModels, IAssessmentSection assessmentSection) : base(pipingInput, surfaceLines, stochasticSoilModels, assessmentSection) { } Index: Ringtoets/Piping/src/Ringtoets.Piping.Forms/PresentationObjects/RingtoetsPipingSurfaceLinesContext.cs =================================================================== diff -u -rd36a95d2e88d98b7b92ff5d091abf711d1dd31d9 -r3434a272cc8bfb25dae4bd7bd50afedb377343c0 --- Ringtoets/Piping/src/Ringtoets.Piping.Forms/PresentationObjects/RingtoetsPipingSurfaceLinesContext.cs (.../RingtoetsPipingSurfaceLinesContext.cs) (revision d36a95d2e88d98b7b92ff5d091abf711d1dd31d9) +++ Ringtoets/Piping/src/Ringtoets.Piping.Forms/PresentationObjects/RingtoetsPipingSurfaceLinesContext.cs (.../RingtoetsPipingSurfaceLinesContext.cs) (revision 3434a272cc8bfb25dae4bd7bd50afedb377343c0) @@ -37,7 +37,7 @@ /// The failure mechanism to wrap. /// The assessment section. /// Thrown when or is null. - public RingtoetsPipingSurfaceLinesContext(PipingFailureMechanism failureMechanism, AssessmentSectionBase assessmentSection) + public RingtoetsPipingSurfaceLinesContext(PipingFailureMechanism failureMechanism, IAssessmentSection assessmentSection) { if (failureMechanism == null) { @@ -54,7 +54,7 @@ } public PipingFailureMechanism FailureMechanism { get; private set; } - public AssessmentSectionBase AssessmentSection { get; private set; } + public IAssessmentSection AssessmentSection { get; private set; } #region IObservable Index: Ringtoets/Piping/src/Ringtoets.Piping.Forms/PresentationObjects/StochasticSoilModelContext.cs =================================================================== diff -u -r7020fe5cfc5046cc92f9c9dc8566711b4e5fd6cc -r3434a272cc8bfb25dae4bd7bd50afedb377343c0 --- Ringtoets/Piping/src/Ringtoets.Piping.Forms/PresentationObjects/StochasticSoilModelContext.cs (.../StochasticSoilModelContext.cs) (revision 7020fe5cfc5046cc92f9c9dc8566711b4e5fd6cc) +++ Ringtoets/Piping/src/Ringtoets.Piping.Forms/PresentationObjects/StochasticSoilModelContext.cs (.../StochasticSoilModelContext.cs) (revision 3434a272cc8bfb25dae4bd7bd50afedb377343c0) @@ -37,7 +37,7 @@ /// The failure mechanism to wrap. /// The assessment section. /// Thrown when or is null. - public StochasticSoilModelContext(PipingFailureMechanism failureMechanism, AssessmentSectionBase assessmentSection) + public StochasticSoilModelContext(PipingFailureMechanism failureMechanism, IAssessmentSection assessmentSection) { if (failureMechanism == null) { @@ -54,7 +54,7 @@ } public PipingFailureMechanism FailureMechanism { get; private set; } - public AssessmentSectionBase AssessmentSection { get; private set; } + public IAssessmentSection AssessmentSection { get; private set; } #region IObservable Index: Ringtoets/Piping/src/Ringtoets.Piping.Forms/Views/PipingCalculationsView.cs =================================================================== diff -u -rc3195f7a1668f7479989ed59de1198b53bc80d8a -r3434a272cc8bfb25dae4bd7bd50afedb377343c0 --- Ringtoets/Piping/src/Ringtoets.Piping.Forms/Views/PipingCalculationsView.cs (.../PipingCalculationsView.cs) (revision c3195f7a1668f7479989ed59de1198b53bc80d8a) +++ Ringtoets/Piping/src/Ringtoets.Piping.Forms/Views/PipingCalculationsView.cs (.../PipingCalculationsView.cs) (revision 3434a272cc8bfb25dae4bd7bd50afedb377343c0) @@ -49,7 +49,7 @@ private readonly RecursiveObserver pipingInputObserver; private readonly RecursiveObserver pipingCalculationObserver; private readonly RecursiveObserver pipingCalculationGroupObserver; - private AssessmentSectionBase assessmentSection; + private IAssessmentSection assessmentSection; private PipingFailureMechanism pipingFailureMechanism; private PipingCalculationGroup pipingCalculationGroup; private DataGridViewComboBoxColumn soilProfileColumn; @@ -98,7 +98,7 @@ /// /// Gets or sets the assessment section. /// - public AssessmentSectionBase AssessmentSection + public IAssessmentSection AssessmentSection { get { Index: Ringtoets/Piping/src/Ringtoets.Piping.Plugin/PipingGuiPlugin.cs =================================================================== diff -u -r5066e0bd460a33f868c0d9766007ac1eb2a08fb5 -r3434a272cc8bfb25dae4bd7bd50afedb377343c0 --- Ringtoets/Piping/src/Ringtoets.Piping.Plugin/PipingGuiPlugin.cs (.../PipingGuiPlugin.cs) (revision 5066e0bd460a33f868c0d9766007ac1eb2a08fb5) +++ Ringtoets/Piping/src/Ringtoets.Piping.Plugin/PipingGuiPlugin.cs (.../PipingGuiPlugin.cs) (revision 3434a272cc8bfb25dae4bd7bd50afedb377343c0) @@ -248,7 +248,7 @@ private bool ClosePipingFailureMechanismViewForData(PipingFailureMechanismView view, object o) { - var assessmentSectionBase = o as AssessmentSectionBase; + var assessmentSectionBase = o as IAssessmentSection; return assessmentSectionBase != null && ((PipingFailureMechanismContext) view.Data).Parent == assessmentSectionBase; } @@ -258,7 +258,7 @@ private static bool ClosePipingCalculationsViewForData(PipingCalculationsView view, object o) { - var assessmentSectionBase = o as AssessmentSectionBase; + var assessmentSectionBase = o as IAssessmentSection; if (assessmentSectionBase != null) { var pipingFailureMechanism = assessmentSectionBase.GetFailureMechanisms() @@ -428,7 +428,7 @@ }; } - private static IList GetInputs(PipingFailureMechanism failureMechanism, AssessmentSectionBase assessmentSection) + private static IList GetInputs(PipingFailureMechanism failureMechanism, IAssessmentSection assessmentSection) { return new ArrayList { Index: Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/PresentationObjects/PipingCalculationContextTest.cs =================================================================== diff -u -r43fb77c51a8d1c0af128a2da0c3d51bbea6e25bb -r3434a272cc8bfb25dae4bd7bd50afedb377343c0 --- Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/PresentationObjects/PipingCalculationContextTest.cs (.../PipingCalculationContextTest.cs) (revision 43fb77c51a8d1c0af128a2da0c3d51bbea6e25bb) +++ Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/PresentationObjects/PipingCalculationContextTest.cs (.../PipingCalculationContextTest.cs) (revision 3434a272cc8bfb25dae4bd7bd50afedb377343c0) @@ -32,7 +32,7 @@ var mocks = new MockRepository(); var pipingFailureMechanismMock = mocks.StrictMock(); - var assessmentSectionMock = mocks.StrictMock(); + var assessmentSectionMock = mocks.StrictMock(); mocks.ReplayAll(); // Call @@ -62,7 +62,7 @@ }; var calculation = new PipingCalculation(new GeneralPipingInput(), new SemiProbabilisticPipingInput()); var mocks = new MockRepository(); - var assessmentSection = mocks.StrictMock(); + var assessmentSection = mocks.StrictMock(); mocks.ReplayAll(); // Call @@ -102,7 +102,7 @@ // Setup var mocks = new MockRepository(); var pipingFailureMechanismMock = mocks.StrictMock(); - var assessmentSectionBaseMock = mocks.StrictMock(); + var assessmentSectionBaseMock = mocks.StrictMock(); var observer = mocks.StrictMock(); observer.Expect(o => o.UpdateObserver()); mocks.ReplayAll(); @@ -133,7 +133,7 @@ // Setup var mocks = new MockRepository(); var pipingFailureMechanismMock = mocks.StrictMock(); - var assessmentSectionBaseMock = mocks.StrictMock(); + var assessmentSectionBaseMock = mocks.StrictMock(); var observer = mocks.StrictMock(); mocks.ReplayAll(); @@ -165,7 +165,7 @@ // Setup var mocks = new MockRepository(); var pipingFailureMechanismMock = mocks.StrictMock(); - var assessmentSectionBaseMock = mocks.StrictMock(); + var assessmentSectionBaseMock = mocks.StrictMock(); var observer = mocks.StrictMock(); observer.Expect(o => o.UpdateObserver()); mocks.ReplayAll(); Index: Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/PresentationObjects/PipingCalculationGroupContextTest.cs =================================================================== diff -u -r43fb77c51a8d1c0af128a2da0c3d51bbea6e25bb -r3434a272cc8bfb25dae4bd7bd50afedb377343c0 --- Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/PresentationObjects/PipingCalculationGroupContextTest.cs (.../PipingCalculationGroupContextTest.cs) (revision 43fb77c51a8d1c0af128a2da0c3d51bbea6e25bb) +++ Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/PresentationObjects/PipingCalculationGroupContextTest.cs (.../PipingCalculationGroupContextTest.cs) (revision 3434a272cc8bfb25dae4bd7bd50afedb377343c0) @@ -33,7 +33,7 @@ }; var mocks = new MockRepository(); - var assessmentSectionBase = mocks.StrictMock(); + var assessmentSectionBase = mocks.StrictMock(); var pipingFailureMechanismMock = mocks.StrictMock(); mocks.ReplayAll(); @@ -65,7 +65,7 @@ }; var mocks = new MockRepository(); - var assessmentSectionBase = mocks.StrictMock(); + var assessmentSectionBase = mocks.StrictMock(); mocks.ReplayAll(); // Call @@ -109,7 +109,7 @@ { // Setup var mocks = new MockRepository(); - var assessmentSectionBase = new MockRepository().StrictMock(); + var assessmentSectionBase = new MockRepository().StrictMock(); var pipingFailureMechanismMock = mocks.StrictMock(); var observer = mocks.StrictMock(); observer.Expect(o => o.UpdateObserver()); @@ -135,7 +135,7 @@ { // Setup var mocks = new MockRepository(); - var assessmentSectionBase = new MockRepository().StrictMock(); + var assessmentSectionBase = new MockRepository().StrictMock(); var pipingFailureMechanismMock = mocks.StrictMock(); var observer = mocks.StrictMock(); mocks.ReplayAll(); @@ -162,7 +162,7 @@ { // Setup var mocks = new MockRepository(); - var assessmentSectionBase = new MockRepository().StrictMock(); + var assessmentSectionBase = new MockRepository().StrictMock(); var pipingFailureMechanismMock = mocks.StrictMock(); var observer = mocks.StrictMock(); observer.Expect(o => o.UpdateObserver()); Index: Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/PresentationObjects/PipingContextTest.cs =================================================================== diff -u -r43fb77c51a8d1c0af128a2da0c3d51bbea6e25bb -r3434a272cc8bfb25dae4bd7bd50afedb377343c0 --- Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/PresentationObjects/PipingContextTest.cs (.../PipingContextTest.cs) (revision 43fb77c51a8d1c0af128a2da0c3d51bbea6e25bb) +++ Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/PresentationObjects/PipingContextTest.cs (.../PipingContextTest.cs) (revision 3434a272cc8bfb25dae4bd7bd50afedb377343c0) @@ -20,7 +20,7 @@ { // Setup var mocks = new MockRepository(); - var assessmentSection = mocks.StrictMock(); + var assessmentSection = mocks.StrictMock(); mocks.ReplayAll(); RingtoetsPipingSurfaceLine[] surfaceLines = @@ -55,7 +55,7 @@ { // Setup var mocks = new MockRepository(); - var assessmentSection = mocks.StrictMock(); + var assessmentSection = mocks.StrictMock(); mocks.ReplayAll(); // Call @@ -79,7 +79,7 @@ { // Setup var mocks = new MockRepository(); - var assessmentSection = mocks.StrictMock(); + var assessmentSection = mocks.StrictMock(); mocks.ReplayAll(); // Call @@ -103,7 +103,7 @@ { // Setup var mocks = new MockRepository(); - var assessmentSection = mocks.StrictMock(); + var assessmentSection = mocks.StrictMock(); mocks.ReplayAll(); // Call @@ -127,7 +127,7 @@ { // Setup var mocks = new MockRepository(); - var assessmentSection = mocks.StrictMock(); + var assessmentSection = mocks.StrictMock(); var observer = mocks.StrictMock(); observer.Expect(o => o.UpdateObserver()); mocks.ReplayAll(); @@ -152,7 +152,7 @@ { // Setup var mocks = new MockRepository(); - var assessmentSection = mocks.StrictMock(); + var assessmentSection = mocks.StrictMock(); var observer = mocks.StrictMock(); mocks.ReplayAll(); @@ -178,7 +178,7 @@ { // Setup var mocks = new MockRepository(); - var assessmentSection = mocks.StrictMock(); + var assessmentSection = mocks.StrictMock(); var observer = mocks.StrictMock(); observer.Expect(o => o.UpdateObserver()); mocks.ReplayAll(); @@ -204,7 +204,7 @@ { // Setup var mocks = new MockRepository(); - var assessmentSection = mocks.StrictMock(); + var assessmentSection = mocks.StrictMock(); mocks.ReplayAll(); var observableObject = new ObservableObject(); @@ -226,7 +226,7 @@ { // Setup var mocks = new MockRepository(); - var assessmentSection = mocks.StrictMock(); + var assessmentSection = mocks.StrictMock(); mocks.ReplayAll(); var observableObject = new ObservableObject(); @@ -248,7 +248,7 @@ { // Setup var mocks = new MockRepository(); - var assessmentSection = mocks.StrictMock(); + var assessmentSection = mocks.StrictMock(); mocks.ReplayAll(); var observableObject = new ObservableObject(); @@ -283,7 +283,7 @@ { // Setup var mocks = new MockRepository(); - var assessmentSection = mocks.StrictMock(); + var assessmentSection = mocks.StrictMock(); mocks.ReplayAll(); var observableObject = new ObservableObject(); @@ -319,7 +319,7 @@ { // Setup var mocks = new MockRepository(); - var assessmentSection = mocks.StrictMock(); + var assessmentSection = mocks.StrictMock(); var observableStub = mocks.Stub(); mocks.ReplayAll(); @@ -355,7 +355,7 @@ { // Setup var mocks = new MockRepository(); - var assessmentSection = mocks.StrictMock(); + var assessmentSection = mocks.StrictMock(); mocks.ReplayAll(); var observableObject = new ObservableObject(); @@ -388,7 +388,7 @@ private class SimplePipingContext : PipingContext where T : IObservable { - public SimplePipingContext(T target, IEnumerable surfaceLines, IEnumerable stochasticSoilModels, AssessmentSectionBase assessmentSection) + public SimplePipingContext(T target, IEnumerable surfaceLines, IEnumerable stochasticSoilModels, IAssessmentSection assessmentSection) : base(target, surfaceLines, stochasticSoilModels, assessmentSection) {} } Index: Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/PresentationObjects/PipingFailureMechanismContextTest.cs =================================================================== diff -u -r8a4c3e1dc7395a4b85340dc04992b65b5d9f5444 -r3434a272cc8bfb25dae4bd7bd50afedb377343c0 --- Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/PresentationObjects/PipingFailureMechanismContextTest.cs (.../PipingFailureMechanismContextTest.cs) (revision 8a4c3e1dc7395a4b85340dc04992b65b5d9f5444) +++ Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/PresentationObjects/PipingFailureMechanismContextTest.cs (.../PipingFailureMechanismContextTest.cs) (revision 3434a272cc8bfb25dae4bd7bd50afedb377343c0) @@ -19,7 +19,7 @@ { // Setup var mocks = new MockRepository(); - var assessmentSection = mocks.Stub(); + var assessmentSection = mocks.Stub(); mocks.ReplayAll(); var failureMechanism = new PipingFailureMechanism(); @@ -39,7 +39,7 @@ { // Setup var mocks = new MockRepository(); - var assessmentSection = mocks.Stub(); + var assessmentSection = mocks.Stub(); mocks.ReplayAll(); // Call Index: Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/PresentationObjects/PipingInputContextTest.cs =================================================================== diff -u -r16b01f208966fa77f73b7977db23da94786f08d1 -r3434a272cc8bfb25dae4bd7bd50afedb377343c0 --- Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/PresentationObjects/PipingInputContextTest.cs (.../PipingInputContextTest.cs) (revision 16b01f208966fa77f73b7977db23da94786f08d1) +++ Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/PresentationObjects/PipingInputContextTest.cs (.../PipingInputContextTest.cs) (revision 3434a272cc8bfb25dae4bd7bd50afedb377343c0) @@ -26,7 +26,7 @@ var stochasticSoilModels = new[] { new TestStochasticSoilModel() }; var mocks = new MockRepository(); - var assessmentSection = mocks.StrictMock(); + var assessmentSection = mocks.StrictMock(); mocks.ReplayAll(); @@ -69,7 +69,7 @@ { // Setup var mocks = new MockRepository(); - var assessmentSectionMock = mocks.StrictMock(); + var assessmentSectionMock = mocks.StrictMock(); var observer = mocks.StrictMock(); observer.Expect(o => o.UpdateObserver()); mocks.ReplayAll(); @@ -93,7 +93,7 @@ { // Setup var mocks = new MockRepository(); - var assessmentSectionMock = mocks.StrictMock(); + var assessmentSectionMock = mocks.StrictMock(); var observer = mocks.StrictMock(); mocks.ReplayAll(); @@ -118,7 +118,7 @@ { // Setup var mocks = new MockRepository(); - var assessmentSectionMock = mocks.StrictMock(); + var assessmentSectionMock = mocks.StrictMock(); var observer = mocks.StrictMock(); observer.Expect(o => o.UpdateObserver()); mocks.ReplayAll(); Index: Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/PresentationObjects/RingtoetsPipingSurfaceLinesContextTest.cs =================================================================== diff -u -r5e426c2c9fd73b2bab4be73f9e4b7f9b2feb0a49 -r3434a272cc8bfb25dae4bd7bd50afedb377343c0 --- Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/PresentationObjects/RingtoetsPipingSurfaceLinesContextTest.cs (.../RingtoetsPipingSurfaceLinesContextTest.cs) (revision 5e426c2c9fd73b2bab4be73f9e4b7f9b2feb0a49) +++ Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/PresentationObjects/RingtoetsPipingSurfaceLinesContextTest.cs (.../RingtoetsPipingSurfaceLinesContextTest.cs) (revision 3434a272cc8bfb25dae4bd7bd50afedb377343c0) @@ -17,7 +17,7 @@ // Setup var mocks = new MockRepository(); var failureMechanism = new PipingFailureMechanism(); - var assessmentSection = mocks.StrictMock(); + var assessmentSection = mocks.StrictMock(); mocks.ReplayAll(); // Call @@ -35,7 +35,7 @@ { // Setup var mocks = new MockRepository(); - var assessmentSection = mocks.StrictMock(); + var assessmentSection = mocks.StrictMock(); mocks.ReplayAll(); // Call @@ -66,7 +66,7 @@ { // Setup var mocks = new MockRepository(); - var assessmentSection = mocks.StrictMock(); + var assessmentSection = mocks.StrictMock(); var observer = mocks.StrictMock(); observer.Expect(o => o.UpdateObserver()); mocks.ReplayAll(); @@ -88,7 +88,7 @@ { // Setup var mocks = new MockRepository(); - var assessmentSection = mocks.StrictMock(); + var assessmentSection = mocks.StrictMock(); var observer = mocks.StrictMock(); mocks.ReplayAll(); @@ -111,7 +111,7 @@ { // Setup var mocks = new MockRepository(); - var assessmentSection = mocks.StrictMock(); + var assessmentSection = mocks.StrictMock(); var observer = mocks.StrictMock(); observer.Expect(o => o.UpdateObserver()); mocks.ReplayAll(); @@ -134,7 +134,7 @@ { // Setup var mocks = new MockRepository(); - var assessmentSection = mocks.StrictMock(); + var assessmentSection = mocks.StrictMock(); var failureMechanism = new PipingFailureMechanism(); mocks.ReplayAll(); @@ -153,7 +153,7 @@ { // Setup var mocks = new MockRepository(); - var assessmentSection = mocks.StrictMock(); + var assessmentSection = mocks.StrictMock(); var failureMechanism = new PipingFailureMechanism(); mocks.ReplayAll(); @@ -171,7 +171,7 @@ { // Setup var mocks = new MockRepository(); - var assessmentSection = mocks.StrictMock(); + var assessmentSection = mocks.StrictMock(); var failureMechanism = new PipingFailureMechanism(); mocks.ReplayAll(); @@ -194,7 +194,7 @@ { // Setup var mocks = new MockRepository(); - var assessmentSection = mocks.StrictMock(); + var assessmentSection = mocks.StrictMock(); var failureMechanism = new PipingFailureMechanism(); var otherFailureMechanism = new PipingFailureMechanism(); mocks.ReplayAll(); @@ -218,7 +218,7 @@ { // Setup var mocks = new MockRepository(); - var assessmentSection = mocks.StrictMock(); + var assessmentSection = mocks.StrictMock(); var failureMechanism = new PipingFailureMechanism(); mocks.ReplayAll(); Index: Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/PresentationObjects/StochasticSoilModelContextTest.cs =================================================================== diff -u -r5e426c2c9fd73b2bab4be73f9e4b7f9b2feb0a49 -r3434a272cc8bfb25dae4bd7bd50afedb377343c0 --- Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/PresentationObjects/StochasticSoilModelContextTest.cs (.../StochasticSoilModelContextTest.cs) (revision 5e426c2c9fd73b2bab4be73f9e4b7f9b2feb0a49) +++ Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/PresentationObjects/StochasticSoilModelContextTest.cs (.../StochasticSoilModelContextTest.cs) (revision 3434a272cc8bfb25dae4bd7bd50afedb377343c0) @@ -38,7 +38,7 @@ // Setup var mocks = new MockRepository(); var failureMechanism = new PipingFailureMechanism(); - var assessmentSection = mocks.StrictMock(); + var assessmentSection = mocks.StrictMock(); mocks.ReplayAll(); // Call @@ -56,7 +56,7 @@ { // Setup var mocks = new MockRepository(); - var assessmentSection = mocks.StrictMock(); + var assessmentSection = mocks.StrictMock(); mocks.ReplayAll(); // Call @@ -87,7 +87,7 @@ { // Setup var mocks = new MockRepository(); - var assessmentSection = mocks.StrictMock(); + var assessmentSection = mocks.StrictMock(); var observer = mocks.StrictMock(); observer.Expect(o => o.UpdateObserver()); mocks.ReplayAll(); @@ -109,7 +109,7 @@ { // Setup var mocks = new MockRepository(); - var assessmentSection = mocks.StrictMock(); + var assessmentSection = mocks.StrictMock(); var observer = mocks.StrictMock(); mocks.ReplayAll(); @@ -132,7 +132,7 @@ { // Setup var mocks = new MockRepository(); - var assessmentSection = mocks.StrictMock(); + var assessmentSection = mocks.StrictMock(); var observer = mocks.StrictMock(); observer.Expect(o => o.UpdateObserver()); mocks.ReplayAll(); @@ -155,7 +155,7 @@ { // Setup var mocks = new MockRepository(); - var assessmentSection = mocks.StrictMock(); + var assessmentSection = mocks.StrictMock(); var failureMechanism = new PipingFailureMechanism(); mocks.ReplayAll(); @@ -174,7 +174,7 @@ { // Setup var mocks = new MockRepository(); - var assessmentSection = mocks.StrictMock(); + var assessmentSection = mocks.StrictMock(); var failureMechanism = new PipingFailureMechanism(); mocks.ReplayAll(); @@ -192,7 +192,7 @@ { // Setup var mocks = new MockRepository(); - var assessmentSection = mocks.StrictMock(); + var assessmentSection = mocks.StrictMock(); var failureMechanism = new PipingFailureMechanism(); mocks.ReplayAll(); @@ -215,7 +215,7 @@ { // Setup var mocks = new MockRepository(); - var assessmentSection = mocks.StrictMock(); + var assessmentSection = mocks.StrictMock(); var failureMechanism = new PipingFailureMechanism(); var otherFailureMechanism = new PipingFailureMechanism(); mocks.ReplayAll(); @@ -239,7 +239,7 @@ { // Setup var mocks = new MockRepository(); - var assessmentSection = mocks.StrictMock(); + var assessmentSection = mocks.StrictMock(); var failureMechanism = new PipingFailureMechanism(); mocks.ReplayAll(); @@ -259,7 +259,7 @@ { // Setup var mocks = new MockRepository(); - var assessmentSection = mocks.StrictMock(); + var assessmentSection = mocks.StrictMock(); var failureMechanism = new PipingFailureMechanism(); mocks.ReplayAll(); Index: Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/PropertyClasses/PipingCalculationContextPropertiesTest.cs =================================================================== diff -u -r43fb77c51a8d1c0af128a2da0c3d51bbea6e25bb -r3434a272cc8bfb25dae4bd7bd50afedb377343c0 --- Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/PropertyClasses/PipingCalculationContextPropertiesTest.cs (.../PipingCalculationContextPropertiesTest.cs) (revision 43fb77c51a8d1c0af128a2da0c3d51bbea6e25bb) +++ Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/PropertyClasses/PipingCalculationContextPropertiesTest.cs (.../PipingCalculationContextPropertiesTest.cs) (revision 3434a272cc8bfb25dae4bd7bd50afedb377343c0) @@ -39,7 +39,7 @@ var mocks = new MockRepository(); var pipingFailureMechanismMock = mocks.StrictMock(); - var assessmentSectionBaseMock = mocks.StrictMock(); + var assessmentSectionBaseMock = mocks.StrictMock(); mocks.ReplayAll(); var properties = new PipingCalculationContextProperties @@ -63,7 +63,7 @@ var projectObserver = mocks.StrictMock(); projectObserver.Expect(o => o.UpdateObserver()); var pipingFailureMechanismMock = mocks.StrictMock(); - var assessmentSectionBaseMock = mocks.StrictMock(); + var assessmentSectionBaseMock = mocks.StrictMock(); mocks.ReplayAll(); var calculation = new PipingCalculation(new GeneralPipingInput(), new SemiProbabilisticPipingInput()); @@ -94,7 +94,7 @@ int numberProperties = 1; projectObserver.Expect(o => o.UpdateObserver()).Repeat.Times(numberProperties); var pipingFailureMechanismMock = mocks.StrictMock(); - var assessmentSectionBaseMock = mocks.StrictMock(); + var assessmentSectionBaseMock = mocks.StrictMock(); mocks.ReplayAll(); var calculation = new PipingCalculation(new GeneralPipingInput(), new SemiProbabilisticPipingInput()); Index: Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/PropertyClasses/PipingCalculationGroupContextPropertiesTest.cs =================================================================== diff -u -r43fb77c51a8d1c0af128a2da0c3d51bbea6e25bb -r3434a272cc8bfb25dae4bd7bd50afedb377343c0 --- Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/PropertyClasses/PipingCalculationGroupContextPropertiesTest.cs (.../PipingCalculationGroupContextPropertiesTest.cs) (revision 43fb77c51a8d1c0af128a2da0c3d51bbea6e25bb) +++ Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/PropertyClasses/PipingCalculationGroupContextPropertiesTest.cs (.../PipingCalculationGroupContextPropertiesTest.cs) (revision 3434a272cc8bfb25dae4bd7bd50afedb377343c0) @@ -36,7 +36,7 @@ var mocks = new MockRepository(); var pipingFailureMechanismMock = mocks.StrictMock(); - var assessmentSectionBaseMock = mocks.StrictMock(); + var assessmentSectionBaseMock = mocks.StrictMock(); mocks.ReplayAll(); var properties = new PipingCalculationGroupContextProperties @@ -59,7 +59,7 @@ var projectObserver = mocks.StrictMock(); projectObserver.Expect(o => o.UpdateObserver()); var pipingFailureMechanismMock = mocks.StrictMock(); - var assessmentSectionBaseMock = mocks.StrictMock(); + var assessmentSectionBaseMock = mocks.StrictMock(); mocks.ReplayAll(); var calculationGroup = new PipingCalculationGroup(); @@ -90,7 +90,7 @@ var mocks = new MockRepository(); var pipingFailureMechanismMock = mocks.StrictMock(); - var assessmentSectionBaseMock = mocks.StrictMock(); + var assessmentSectionBaseMock = mocks.StrictMock(); mocks.ReplayAll(); var properties = new PipingCalculationGroupContextProperties Index: Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/PropertyClasses/PipingFailureMechanismContextPropertiesTest.cs =================================================================== diff -u -rde18e9d8a0324e9345f412eb6c1ffeed4f86f2fb -r3434a272cc8bfb25dae4bd7bd50afedb377343c0 --- Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/PropertyClasses/PipingFailureMechanismContextPropertiesTest.cs (.../PipingFailureMechanismContextPropertiesTest.cs) (revision de18e9d8a0324e9345f412eb6c1ffeed4f86f2fb) +++ Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/PropertyClasses/PipingFailureMechanismContextPropertiesTest.cs (.../PipingFailureMechanismContextPropertiesTest.cs) (revision 3434a272cc8bfb25dae4bd7bd50afedb377343c0) @@ -32,7 +32,7 @@ var properties = new PipingFailureMechanismContextProperties(); // Call - properties.Data = new PipingFailureMechanismContext(failureMechanism, new MockRepository().StrictMock()); + properties.Data = new PipingFailureMechanismContext(failureMechanism, new MockRepository().StrictMock()); // Assert Assert.AreEqual(failureMechanism.GeneralInput.UpliftModelFactor, properties.UpliftModelFactor); Index: Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/PropertyClasses/PipingInputContextPropertiesTest.cs =================================================================== diff -u -rbf334f50530164badedba45a78f3aab857ae1bf6 -r3434a272cc8bfb25dae4bd7bd50afedb377343c0 --- Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/PropertyClasses/PipingInputContextPropertiesTest.cs (.../PipingInputContextPropertiesTest.cs) (revision bf334f50530164badedba45a78f3aab857ae1bf6) +++ Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/PropertyClasses/PipingInputContextPropertiesTest.cs (.../PipingInputContextPropertiesTest.cs) (revision 3434a272cc8bfb25dae4bd7bd50afedb377343c0) @@ -39,7 +39,7 @@ { // Setup var mocks = new MockRepository(); - var assessmentSectionMock = mocks.StrictMock(); + var assessmentSectionMock = mocks.StrictMock(); mocks.ReplayAll(); var random = new Random(22); @@ -100,7 +100,7 @@ { // Setup var mocks = new MockRepository(); - var assessmentSectionMock = mocks.StrictMock(); + var assessmentSectionMock = mocks.StrictMock(); var projectObserver = mocks.StrictMock(); projectObserver.Expect(o => o.UpdateObserver()); mocks.ReplayAll(); @@ -131,7 +131,7 @@ { // Setup var mocks = new MockRepository(); - var assessmentSectionMock = mocks.StrictMock(); + var assessmentSectionMock = mocks.StrictMock(); var projectObserver = mocks.StrictMock(); int numberProperties = 8; projectObserver.Expect(o => o.UpdateObserver()).Repeat.Times(numberProperties); @@ -216,7 +216,7 @@ { // Setup var mocks = new MockRepository(); - var assessmentSectionMock = mocks.StrictMock(); + var assessmentSectionMock = mocks.StrictMock(); var inputObserver = mocks.StrictMock(); int numberProperties = 2; inputObserver.Expect(o => o.UpdateObserver()).Repeat.Times(numberProperties); @@ -252,7 +252,7 @@ { // Setup var mocks = new MockRepository(); - var assessmentSectionMock = mocks.StrictMock(); + var assessmentSectionMock = mocks.StrictMock(); var inputObserver = mocks.StrictMock(); int numberProperties = 2; inputObserver.Expect(o => o.UpdateObserver()).Repeat.Times(numberProperties); @@ -286,7 +286,7 @@ { // Setup var mocks = new MockRepository(); - var assessmentSectionMock = mocks.StrictMock(); + var assessmentSectionMock = mocks.StrictMock(); var inputObserver = mocks.StrictMock(); inputObserver.Expect(o => o.UpdateObserver()); mocks.ReplayAll(); @@ -324,7 +324,7 @@ { // Setup var mocks = new MockRepository(); - var assessmentSectionMock = mocks.StrictMock(); + var assessmentSectionMock = mocks.StrictMock(); var inputObserver = mocks.StrictMock(); inputObserver.Expect(o => o.UpdateObserver()); mocks.ReplayAll(); @@ -360,7 +360,7 @@ { // Setup var mocks = new MockRepository(); - var assessmentSectionMock = mocks.StrictMock(); + var assessmentSectionMock = mocks.StrictMock(); var projectObserver = mocks.StrictMock(); projectObserver.Expect(o => o.UpdateObserver()); mocks.ReplayAll(); @@ -403,7 +403,7 @@ { // Setup var mocks = new MockRepository(); - var assessmentSectionMock = mocks.StrictMock(); + var assessmentSectionMock = mocks.StrictMock(); var projectObserver = mocks.StrictMock(); projectObserver.Expect(o => o.UpdateObserver()).Repeat.Times(1); mocks.ReplayAll(); @@ -439,7 +439,7 @@ { // Setup var mocks = new MockRepository(); - var assessmentSectionMock = mocks.StrictMock(); + var assessmentSectionMock = mocks.StrictMock(); mocks.ReplayAll(); var inputParameters = new PipingInput(new GeneralPipingInput()); @@ -464,7 +464,7 @@ { // Setup var mocks = new MockRepository(); - var assessmentSectionMock = mocks.StrictMock(); + var assessmentSectionMock = mocks.StrictMock(); mocks.ReplayAll(); var testSurfaceLine = ValidSurfaceLine(0, 2); @@ -495,7 +495,7 @@ { // Setup var mocks = new MockRepository(); - var assessmentSectionMock = mocks.StrictMock(); + var assessmentSectionMock = mocks.StrictMock(); mocks.ReplayAll(); var testPipingSoilProfile = new TestPipingSoilProfile(); @@ -528,7 +528,7 @@ // Given var mocks = new MockRepository(); var typeDescriptorContextMock = mocks.StrictMock(); - var assessmentSectionMock = mocks.StrictMock(); + var assessmentSectionMock = mocks.StrictMock(); var inputParameters = new PipingInput(new GeneralPipingInput()); var contextProperties = new PipingInputContextProperties Index: Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/TreeNodeInfos/PipingCalculationContextTreeNodeInfoTest.cs =================================================================== diff -u -r43fb77c51a8d1c0af128a2da0c3d51bbea6e25bb -r3434a272cc8bfb25dae4bd7bd50afedb377343c0 --- Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/TreeNodeInfos/PipingCalculationContextTreeNodeInfoTest.cs (.../PipingCalculationContextTreeNodeInfoTest.cs) (revision 43fb77c51a8d1c0af128a2da0c3d51bbea6e25bb) +++ Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/TreeNodeInfos/PipingCalculationContextTreeNodeInfoTest.cs (.../PipingCalculationContextTreeNodeInfoTest.cs) (revision 3434a272cc8bfb25dae4bd7bd50afedb377343c0) @@ -65,7 +65,7 @@ }; var pipingFailureMechanismMock = mocks.StrictMock(); - var assessmentSectionBaseMock = mocks.StrictMock(); + var assessmentSectionBaseMock = mocks.StrictMock(); mocks.ReplayAll(); var pipingCalculationContext = new PipingCalculationContext(calculation, @@ -108,7 +108,7 @@ }; var pipingFailureMechanismMock = mocks.StrictMock(); - var assessmentSectionBaseMock = mocks.StrictMock(); + var assessmentSectionBaseMock = mocks.StrictMock(); mocks.ReplayAll(); var pipingCalculationContext = new PipingCalculationContext(calculation, @@ -144,7 +144,7 @@ }; var pipingFailureMechanismMock = mocks.StrictMock(); - var assessmentSectionBaseMock = mocks.StrictMock(); + var assessmentSectionBaseMock = mocks.StrictMock(); mocks.ReplayAll(); var pipingCalculationContext = new PipingCalculationContext(calculation, @@ -178,7 +178,7 @@ { // Setup var pipingFailureMechanismMock = mocks.StrictMock(); - var assessmentSectionBaseMock = mocks.StrictMock(); + var assessmentSectionBaseMock = mocks.StrictMock(); mocks.ReplayAll(); var pipingCalculationContext = new PipingCalculationContext(new PipingCalculation(new GeneralPipingInput(), new SemiProbabilisticPipingInput()), @@ -228,7 +228,7 @@ }; var pipingFailureMechanismMock = mocks.StrictMock(); - var assessmentSectionBaseMock = mocks.StrictMock(); + var assessmentSectionBaseMock = mocks.StrictMock(); mocks.ReplayAll(); var pipingCalculationsInputs = new PipingCalculationContext(calculation, @@ -265,7 +265,7 @@ var treeViewControlMock = mocks.StrictMock(); var calculation = new PipingCalculation(new GeneralPipingInput(), new SemiProbabilisticPipingInput()); var pipingFailureMechanismMock = mocks.StrictMock(); - var assessmentSectionBaseMock = mocks.StrictMock(); + var assessmentSectionBaseMock = mocks.StrictMock(); var nodeData = new PipingCalculationContext(calculation, Enumerable.Empty(), Enumerable.Empty(), @@ -299,7 +299,7 @@ Output = new TestPipingOutput() }; var pipingFailureMechanismMock = mocks.StrictMock(); - var assessmentSectionBaseMock = mocks.StrictMock(); + var assessmentSectionBaseMock = mocks.StrictMock(); var nodeData = new PipingCalculationContext(calculation, Enumerable.Empty(), Enumerable.Empty(), @@ -331,7 +331,7 @@ var menuBuilderMock = mocks.Stub(); var treeViewControlMock = mocks.StrictMock(); var pipingFailureMechanismMock = mocks.StrictMock(); - var assessmentSectionBaseMock = mocks.StrictMock(); + var assessmentSectionBaseMock = mocks.StrictMock(); var nodeData = new PipingCalculationContext(new PipingCalculation(new GeneralPipingInput(), new SemiProbabilisticPipingInput()), Enumerable.Empty(), Enumerable.Empty(), @@ -378,7 +378,7 @@ group.Children.Add(calculationToBeRemoved); var pipingFailureMechanismMock = mocks.StrictMock(); - var assessmentSectionMock = mocks.StrictMock(); + var assessmentSectionMock = mocks.StrictMock(); mocks.ReplayAll(); var calculationContext = new PipingCalculationContext(calculationToBeRemoved, @@ -409,7 +409,7 @@ var group = new PipingCalculationGroup("", groupNameEditable); var pipingFailureMechanismMock = mocks.StrictMock(); - var assessmentSectionMock = mocks.StrictMock(); + var assessmentSectionMock = mocks.StrictMock(); mocks.ReplayAll(); var calculationContext = new PipingCalculationContext(calculationToBeRemoved, @@ -436,7 +436,7 @@ // Setup var dataMock = mocks.StrictMock(); var pipingFailureMechanismMock = mocks.StrictMock(); - var assessmentSectionBaseMock = mocks.StrictMock(); + var assessmentSectionBaseMock = mocks.StrictMock(); mocks.ReplayAll(); var nodeMock = new PipingCalculationContext(new PipingCalculation(new GeneralPipingInput(), new SemiProbabilisticPipingInput()), @@ -470,7 +470,7 @@ group.Attach(observer); var pipingFailureMechanismMock = mocks.StrictMock(); - var assessmentSectionMock = mocks.StrictMock(); + var assessmentSectionMock = mocks.StrictMock(); mocks.ReplayAll(); var calculationContext = new PipingCalculationContext(elementToBeRemoved, @@ -508,7 +508,7 @@ var treeViewControlMock = mocks.StrictMock(); var calculation = new PipingCalculation(new GeneralPipingInput(), new SemiProbabilisticPipingInput()); var pipingFailureMechanismMock = mocks.StrictMock(); - var assessmentSectionBaseMock = mocks.StrictMock(); + var assessmentSectionBaseMock = mocks.StrictMock(); var pipingCalculationContext = new PipingCalculationContext(calculation, Enumerable.Empty(), Enumerable.Empty(), @@ -567,7 +567,7 @@ var treeViewControlMock = mocks.StrictMock(); var calculation = new PipingCalculation(new GeneralPipingInput(), new SemiProbabilisticPipingInput()); var pipingFailureMechanismMock = mocks.StrictMock(); - var assessmentSectionBaseMock = mocks.StrictMock(); + var assessmentSectionBaseMock = mocks.StrictMock(); var pipingCalculationContext = new PipingCalculationContext(calculation, Enumerable.Empty(), Enumerable.Empty(), @@ -611,7 +611,7 @@ var calculateContextMenuItemIndex = 1; var calculation = PipingCalculationFactory.CreateCalculationWithValidInput(); var pipingFailureMechanismMock = mocks.StrictMock(); - var assessmentSectionBaseMock = mocks.StrictMock(); + var assessmentSectionBaseMock = mocks.StrictMock(); var pipingCalculationContext = new PipingCalculationContext(calculation, Enumerable.Empty(), Enumerable.Empty(), @@ -669,7 +669,7 @@ var treeViewControlMock = mocks.StrictMock(); var calculation = new PipingCalculation(new GeneralPipingInput(), new SemiProbabilisticPipingInput()); var pipingFailureMechanismMock = mocks.StrictMock(); - var assessmentSectionBaseMock = mocks.StrictMock(); + var assessmentSectionBaseMock = mocks.StrictMock(); var pipingCalculationContext = new PipingCalculationContext(calculation, Enumerable.Empty(), Enumerable.Empty(), Index: Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/TreeNodeInfos/PipingCalculationGroupContextTreeNodeInfoTest.cs =================================================================== diff -u -r7b59ab6aaa9f81445151848d8b3aa651062ee6b7 -r3434a272cc8bfb25dae4bd7bd50afedb377343c0 --- Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/TreeNodeInfos/PipingCalculationGroupContextTreeNodeInfoTest.cs (.../PipingCalculationGroupContextTreeNodeInfoTest.cs) (revision 7b59ab6aaa9f81445151848d8b3aa651062ee6b7) +++ Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/TreeNodeInfos/PipingCalculationGroupContextTreeNodeInfoTest.cs (.../PipingCalculationGroupContextTreeNodeInfoTest.cs) (revision 3434a272cc8bfb25dae4bd7bd50afedb377343c0) @@ -66,7 +66,7 @@ var testname = "testName"; var group = new PipingCalculationGroup { Name = testname }; var pipingFailureMechanismMock = mocks.StrictMock(); - var assessmentSectionMock = mocks.StrictMock(); + var assessmentSectionMock = mocks.StrictMock(); mocks.ReplayAll(); @@ -99,7 +99,7 @@ // Setup var group = new PipingCalculationGroup(); var pipingFailureMechanismMock = mocks.StrictMock(); - var assessmentSectionMock = mocks.StrictMock(); + var assessmentSectionMock = mocks.StrictMock(); mocks.ReplayAll(); var groupContext = new PipingCalculationGroupContext(group, @@ -125,7 +125,7 @@ // Setup var group = new PipingCalculationGroup(); var pipingFailureMechanismMock = mocks.StrictMock(); - var assessmentSectionMock = mocks.StrictMock(); + var assessmentSectionMock = mocks.StrictMock(); mocks.ReplayAll(); var groupContext = new PipingCalculationGroupContext(group, @@ -157,7 +157,7 @@ group.Children.Add(childGroup); var pipingFailureMechanismMock = mocks.StrictMock(); - var assessmentSectionMock = mocks.StrictMock(); + var assessmentSectionMock = mocks.StrictMock(); mocks.ReplayAll(); @@ -199,7 +199,7 @@ }); var pipingFailureMechanismMock = mocks.StrictMock(); - var assessmentSectionMock = mocks.StrictMock(); + var assessmentSectionMock = mocks.StrictMock(); var parentData = new PipingCalculationGroupContext(parentGroup, Enumerable.Empty(), @@ -317,7 +317,7 @@ }); var pipingFailureMechanismMock = mocks.StrictMock(); - var assessmentSectionMock = mocks.StrictMock(); + var assessmentSectionMock = mocks.StrictMock(); var parentData = new object(); var nodeData = new PipingCalculationGroupContext(group, @@ -424,7 +424,7 @@ }); var pipingFailureMechanismMock = mocks.StrictMock(); - var assessmentSectionMock = mocks.StrictMock(); + var assessmentSectionMock = mocks.StrictMock(); var parentData = new PipingFailureMechanismContext(pipingFailureMechanismMock, assessmentSectionMock); var nodeData = new PipingCalculationGroupContext(group, @@ -524,7 +524,7 @@ var group = new PipingCalculationGroup(); var pipingFailureMechanismMock = mocks.StrictMock(); - var assessmentSectionMock = mocks.StrictMock(); + var assessmentSectionMock = mocks.StrictMock(); var parentData = new PipingFailureMechanismContext(pipingFailureMechanismMock, assessmentSectionMock); var nodeData = new PipingCalculationGroupContext(group, @@ -564,7 +564,7 @@ var group = new PipingCalculationGroup(); var pipingFailureMechanismMock = mocks.StrictMock(); - var assessmentSectionMock = mocks.StrictMock(); + var assessmentSectionMock = mocks.StrictMock(); var parentData = new PipingFailureMechanismContext(pipingFailureMechanismMock, assessmentSectionMock); var nodeData = new PipingCalculationGroupContext(group, @@ -604,7 +604,7 @@ var group = new PipingCalculationGroup(); var pipingFailureMechanismMock = mocks.StrictMock(); - var assessmentSectionMock = mocks.StrictMock(); + var assessmentSectionMock = mocks.StrictMock(); var parentData = new PipingFailureMechanismContext(pipingFailureMechanismMock, assessmentSectionMock); var nodeData = new PipingCalculationGroupContext(group, @@ -648,7 +648,7 @@ var group = new PipingCalculationGroup(); var parentData = new PipingFailureMechanism(); var pipingFailureMechanismMock = mocks.StrictMock(); - var assessmentSectionMock = mocks.StrictMock(); + var assessmentSectionMock = mocks.StrictMock(); var nodeData = new PipingCalculationGroupContext(group, Enumerable.Empty(), Enumerable.Empty(), @@ -683,7 +683,7 @@ var menuBuilder = new CustomItemsOnlyContextMenuBuilder(); var group = new PipingCalculationGroup(); var pipingFailureMechanismMock = mocks.StrictMock(); - var assessmentSectionMock = mocks.StrictMock(); + var assessmentSectionMock = mocks.StrictMock(); var nodeData = new PipingCalculationGroupContext(group, Enumerable.Empty(), Enumerable.Empty(), @@ -734,7 +734,7 @@ var menuBuilder = new CustomItemsOnlyContextMenuBuilder(); var group = new PipingCalculationGroup(); var pipingFailureMechanismMock = mocks.StrictMock(); - var assessmentSectionMock = mocks.StrictMock(); + var assessmentSectionMock = mocks.StrictMock(); var nodeData = new PipingCalculationGroupContext(group, Enumerable.Empty(), Enumerable.Empty(), @@ -801,7 +801,7 @@ group.Children.Add(invalidCalculation); var pipingFailureMechanismMock = mocks.StrictMock(); - var assessmentSectionMock = mocks.StrictMock(); + var assessmentSectionMock = mocks.StrictMock(); var nodeData = new PipingCalculationGroupContext(group, Enumerable.Empty(), @@ -860,7 +860,7 @@ group.Children.Add(invalidCalculation); var pipingFailureMechanismMock = mocks.StrictMock(); - var assessmentSectionMock = mocks.StrictMock(); + var assessmentSectionMock = mocks.StrictMock(); var nodeData = new PipingCalculationGroupContext(group, Enumerable.Empty(), @@ -928,7 +928,7 @@ group.Children.Add(calculation2); var pipingFailureMechanismMock = mocks.StrictMock(); - var assessmentSectionMock = mocks.StrictMock(); + var assessmentSectionMock = mocks.StrictMock(); var nodeData = new PipingCalculationGroupContext(group, Enumerable.Empty(), @@ -989,7 +989,7 @@ var group = new PipingCalculationGroup(); var pipingFailureMechanismMock = mocks.StrictMock(); - var assessmentSectionMock = mocks.StrictMock(); + var assessmentSectionMock = mocks.StrictMock(); var mainWindow = mocks.Stub(); @@ -1049,7 +1049,7 @@ { // Setup var pipingFailureMechanismMock = mocks.StrictMock(); - var assessmentSectionMock = mocks.StrictMock(); + var assessmentSectionMock = mocks.StrictMock(); var pipingFailureMechanismContextMock = mocks.StrictMock(pipingFailureMechanismMock, assessmentSectionMock); mocks.ReplayAll(); @@ -1081,7 +1081,7 @@ observer.Expect(o => o.UpdateObserver()); var group = new PipingCalculationGroup(); var pipingFailureMechanismMock = mocks.StrictMock(); - var assessmentSectionMock = mocks.StrictMock(); + var assessmentSectionMock = mocks.StrictMock(); mocks.ReplayAll(); var nodeData = new PipingCalculationGroupContext(group, @@ -1106,7 +1106,7 @@ // Setup var group = new PipingCalculationGroup(); var pipingFailureMechanismMock = mocks.StrictMock(); - var assessmentSectionMock = mocks.StrictMock(); + var assessmentSectionMock = mocks.StrictMock(); mocks.ReplayAll(); var nodeData = new PipingCalculationGroupContext(group, @@ -1134,7 +1134,7 @@ // Setup var group = new PipingCalculationGroup(); var pipingFailureMechanismMock = mocks.StrictMock(); - var assessmentSectionMock = mocks.StrictMock(); + var assessmentSectionMock = mocks.StrictMock(); mocks.ReplayAll(); var nodeData = new PipingCalculationGroupContext(group, @@ -1167,7 +1167,7 @@ // Setup var group = new PipingCalculationGroup(); var pipingFailureMechanismMock = mocks.StrictMock(); - var assessmentSectionMock = mocks.StrictMock(); + var assessmentSectionMock = mocks.StrictMock(); mocks.ReplayAll(); var nodeData = new PipingCalculationGroupContext(group, @@ -1201,7 +1201,7 @@ observer.Expect(o => o.UpdateObserver()); var group = new PipingCalculationGroup(); var pipingFailureMechanismMock = mocks.StrictMock(); - var assessmentSectionMock = mocks.StrictMock(); + var assessmentSectionMock = mocks.StrictMock(); mocks.ReplayAll(); var nodeData = new PipingCalculationGroupContext(group, @@ -1236,7 +1236,7 @@ // Setup var group = new PipingCalculationGroup(); var pipingFailureMechanismMock = mocks.StrictMock(); - var assessmentSectionMock = mocks.StrictMock(); + var assessmentSectionMock = mocks.StrictMock(); mocks.ReplayAll(); var groupContext = new PipingCalculationGroupContext(group, @@ -1258,7 +1258,7 @@ // Setup var group = new PipingCalculationGroup(); var pipingFailureMechanismMock = mocks.StrictMock(); - var assessmentSectionMock = mocks.StrictMock(); + var assessmentSectionMock = mocks.StrictMock(); var pipingFailureMechanismContextMock = mocks.StrictMock(pipingFailureMechanismMock, assessmentSectionMock); mocks.ReplayAll(); @@ -1287,7 +1287,7 @@ object draggedItemContext; var failureMechanism = new PipingFailureMechanism(); - var assessmentSection = mocks.StrictMock(); + var assessmentSection = mocks.StrictMock(); mocks.ReplayAll(); @@ -1334,7 +1334,7 @@ object draggedItemContext; var targetFailureMechanism = new PipingFailureMechanism(); - var assessmentSection = mocks.StrictMock(); + var assessmentSection = mocks.StrictMock(); mocks.ReplayAll(); @@ -1380,7 +1380,7 @@ // Setup var treeViewControlMock = mocks.StrictMock(); var pipingFailureMechanismMock = mocks.StrictMock(); - var assessmentSection = mocks.StrictMock(); + var assessmentSection = mocks.StrictMock(); IPipingCalculationItem draggedItem; object draggedItemContext; @@ -1431,7 +1431,7 @@ // Setup var treeViewControlMock = mocks.StrictMock(); var pipingFailureMechanismMock = mocks.StrictMock(); - var assessmentSection = mocks.StrictMock(); + var assessmentSection = mocks.StrictMock(); const string name = "Very cool name"; IPipingCalculationItem draggedItem; @@ -1481,7 +1481,7 @@ // Setup var treeViewControlMock = mocks.StrictMock(); var pipingFailureMechanismMock = mocks.StrictMock(); - var assessmentSection = mocks.StrictMock(); + var assessmentSection = mocks.StrictMock(); IPipingCalculationItem draggedItem; object draggedItemContext; @@ -1549,7 +1549,7 @@ /// The context object for , without any other data. /// The piping failure mechanism the item and context belong to. /// The assessment section the item and context belong to. - private void CreatePipingCalculationGroupAndContext(out PipingCalculationGroup data, out PipingCalculationGroupContext dataContext, PipingFailureMechanism pipingFailureMechanism, AssessmentSectionBase assessmentSection) + private void CreatePipingCalculationGroupAndContext(out PipingCalculationGroup data, out PipingCalculationGroupContext dataContext, PipingFailureMechanism pipingFailureMechanism, IAssessmentSection assessmentSection) { data = new PipingCalculationGroup(); @@ -1570,7 +1570,7 @@ /// The assessment section the item and context belong to. /// Optional: The name of . /// - private void CreatePipingCalculationItemAndContext(PipingCalculationItemType type, out IPipingCalculationItem data, out object dataContext, PipingFailureMechanism pipingFailureMechanism, AssessmentSectionBase assessmentSection, string initialName = null) + private void CreatePipingCalculationItemAndContext(PipingCalculationItemType type, out IPipingCalculationItem data, out object dataContext, PipingFailureMechanism pipingFailureMechanism, IAssessmentSection assessmentSection, string initialName = null) { switch (type) { Index: Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/TreeNodeInfos/PipingFailureMechanismTreeNodeInfoTest.cs =================================================================== diff -u -r267be1d4fd22c83ba0ed078df17922adab0658ac -r3434a272cc8bfb25dae4bd7bd50afedb377343c0 --- Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/TreeNodeInfos/PipingFailureMechanismTreeNodeInfoTest.cs (.../PipingFailureMechanismTreeNodeInfoTest.cs) (revision 267be1d4fd22c83ba0ed078df17922adab0658ac) +++ Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/TreeNodeInfos/PipingFailureMechanismTreeNodeInfoTest.cs (.../PipingFailureMechanismTreeNodeInfoTest.cs) (revision 3434a272cc8bfb25dae4bd7bd50afedb377343c0) @@ -91,7 +91,7 @@ public void Text_Always_ReturnsName() { // Setup - var assessmentSection = mocks.Stub(); + var assessmentSection = mocks.Stub(); mocks.ReplayAll(); var mechanism = new PipingFailureMechanism(); @@ -119,7 +119,7 @@ public void ChildNodeObjects_Always_ReturnChildDataNodes() { // Setup - var assessmentSection = mocks.Stub(); + var assessmentSection = mocks.Stub(); mocks.ReplayAll(); var pipingFailureMechanism = new PipingFailureMechanism(); @@ -202,7 +202,7 @@ pipingCalculation2 }); - var assessmentSection = mocks.Stub(); + var assessmentSection = mocks.Stub(); var failureMechanismContext = new PipingFailureMechanismContext(dataMock, assessmentSection); gui.Expect(cmp => cmp.Get(failureMechanismContext, treeViewControl)).Return(menuBuilder); @@ -260,7 +260,7 @@ }; failureMechanism.CalculationsGroup.Children.Add(pipingCalculation); - var assessmentSection = mocks.Stub(); + var assessmentSection = mocks.Stub(); var failureMechanismContext = new PipingFailureMechanismContext(failureMechanism, assessmentSection); var applicationFeatureCommandHandler = mocks.Stub(); @@ -319,7 +319,7 @@ var dataMock = mocks.StrictMock(); dataMock.Stub(dm => dm.CalculationItems).Return(new ICalculationItem[0]); - var assessmentSection = mocks.Stub(); + var assessmentSection = mocks.Stub(); var failureMechanismContext = new PipingFailureMechanismContext(dataMock, assessmentSection); var gui = mocks.StrictMock(); @@ -357,7 +357,7 @@ pipingCalculation }); - var assessmentSection = mocks.Stub(); + var assessmentSection = mocks.Stub(); var failureMechanismContext = new PipingFailureMechanismContext(dataMock, assessmentSection); var gui = mocks.StrictMock(); @@ -389,7 +389,7 @@ var dataMock = new PipingFailureMechanism(); - var assessmentSection = mocks.Stub(); + var assessmentSection = mocks.Stub(); var failureMechanismContext = new PipingFailureMechanismContext(dataMock, assessmentSection); var gui = mocks.StrictMock(); @@ -420,7 +420,7 @@ { // Setup var pipingFailureMechanism = new PipingFailureMechanism(); - var assessmentSection = mocks.Stub(); + var assessmentSection = mocks.Stub(); var pipingFailureMechanismContext = new PipingFailureMechanismContext(pipingFailureMechanism, assessmentSection); var gui = mocks.StrictMock(); @@ -467,7 +467,7 @@ failureMechanism.CalculationsGroup.Children.Clear(); failureMechanism.CalculationsGroup.Children.Add(new PipingCalculation(new GeneralPipingInput(), new SemiProbabilisticPipingInput())); - var assessmentSection = mocks.Stub(); + var assessmentSection = mocks.Stub(); var failureMechanismContext = new PipingFailureMechanismContext(failureMechanism, assessmentSection); var menuBuilder = new CustomItemsOnlyContextMenuBuilder(); @@ -513,7 +513,7 @@ failureMechanism.CalculationsGroup.Children.Clear(); failureMechanism.CalculationsGroup.Children.Add(new PipingCalculationGroup()); - var assessmentSection = mocks.Stub(); + var assessmentSection = mocks.Stub(); var failureMechanismContext = new PipingFailureMechanismContext(failureMechanism, assessmentSection); var menuBuilder = new CustomItemsOnlyContextMenuBuilder(); @@ -566,7 +566,7 @@ failureMechanism.CalculationsGroup.Children.Add(validCalculation); failureMechanism.CalculationsGroup.Children.Add(invalidCalculation); - var assessmentSection = mocks.Stub(); + var assessmentSection = mocks.Stub(); var failureMechanismContext = new PipingFailureMechanismContext(failureMechanism, assessmentSection); gui.Expect(g => g.Get(failureMechanismContext, treeViewControl)).Return(menuBuilder); @@ -615,7 +615,7 @@ failureMechanism.CalculationsGroup.Children.Add(validCalculation); failureMechanism.CalculationsGroup.Children.Add(invalidCalculation); - var assessmentSection = mocks.Stub(); + var assessmentSection = mocks.Stub(); var failureMechanismContext = new PipingFailureMechanismContext(failureMechanism, assessmentSection); gui.Expect(g => g.Get(failureMechanismContext, treeViewControl)).Return(menuBuilder); Index: Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/TreeNodeInfos/PipingInputContextTreeNodeInfoTest.cs =================================================================== diff -u -r43fb77c51a8d1c0af128a2da0c3d51bbea6e25bb -r3434a272cc8bfb25dae4bd7bd50afedb377343c0 --- Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/TreeNodeInfos/PipingInputContextTreeNodeInfoTest.cs (.../PipingInputContextTreeNodeInfoTest.cs) (revision 43fb77c51a8d1c0af128a2da0c3d51bbea6e25bb) +++ Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/TreeNodeInfos/PipingInputContextTreeNodeInfoTest.cs (.../PipingInputContextTreeNodeInfoTest.cs) (revision 3434a272cc8bfb25dae4bd7bd50afedb377343c0) @@ -54,7 +54,7 @@ public void Text_Always_ReturnsTextFromResource() { // Setup - var assessmentSection = mocks.StrictMock(); + var assessmentSection = mocks.StrictMock(); var pipingInputContext = mocks.StrictMock(new PipingInput(new GeneralPipingInput()), Enumerable.Empty(), Enumerable.Empty(), assessmentSection); mocks.ReplayAll(); @@ -72,7 +72,7 @@ public void Image_Always_ReturnsSetImage() { // Setup - var assessmentSection = mocks.StrictMock(); + var assessmentSection = mocks.StrictMock(); var pipingInputContext = mocks.StrictMock(new PipingInput(new GeneralPipingInput()), Enumerable.Empty(), Enumerable.Empty(), assessmentSection); mocks.ReplayAll(); Index: Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/TreeNodeInfos/RingtoetsPipingSurfaceLineCollectionTreeNodeInfoTest.cs =================================================================== diff -u -r10779bb6a6db2d00f4627b2bc190e7e35e1fee3e -r3434a272cc8bfb25dae4bd7bd50afedb377343c0 --- Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/TreeNodeInfos/RingtoetsPipingSurfaceLineCollectionTreeNodeInfoTest.cs (.../RingtoetsPipingSurfaceLineCollectionTreeNodeInfoTest.cs) (revision 10779bb6a6db2d00f4627b2bc190e7e35e1fee3e) +++ Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/TreeNodeInfos/RingtoetsPipingSurfaceLineCollectionTreeNodeInfoTest.cs (.../RingtoetsPipingSurfaceLineCollectionTreeNodeInfoTest.cs) (revision 3434a272cc8bfb25dae4bd7bd50afedb377343c0) @@ -55,7 +55,7 @@ { // Setup var failureMechanism = new PipingFailureMechanism(); - var assessmentSection = mocks.StrictMock(); + var assessmentSection = mocks.StrictMock(); var ringtoetsPipingSurfaceLines = mocks.StrictMock(failureMechanism, assessmentSection); mocks.ReplayAll(); @@ -74,7 +74,7 @@ { // Setup var failureMechanism = new PipingFailureMechanism(); - var assessmentSection = mocks.StrictMock(); + var assessmentSection = mocks.StrictMock(); var ringtoetsPipingSurfaceLines = mocks.StrictMock(failureMechanism, assessmentSection); mocks.ReplayAll(); @@ -93,7 +93,7 @@ { // Setup var failureMechanism = new PipingFailureMechanism(); - var assessmentSection = mocks.StrictMock(); + var assessmentSection = mocks.StrictMock(); var ringtoetsPipingSurfaceLines = mocks.StrictMock(failureMechanism, assessmentSection); mocks.ReplayAll(); @@ -111,7 +111,7 @@ public void ForeColor_CollectionWithSurfaceLines_ReturnsControlText() { // Setup - var assessmentSection = mocks.StrictMock(); + var assessmentSection = mocks.StrictMock(); var ringtoetsPipingSurfaceLine1 = new RingtoetsPipingSurfaceLine(); var ringtoetsPipingSurfaceLine2 = new RingtoetsPipingSurfaceLine(); @@ -136,7 +136,7 @@ public void ChildNodeObjects_Always_ReturnsChildsOnData() { // Setup - var assessmentSection = mocks.StrictMock(); + var assessmentSection = mocks.StrictMock(); var ringtoetsPipingSurfaceLine1 = new RingtoetsPipingSurfaceLine(); var ringtoetsPipingSurfaceLine2 = new RingtoetsPipingSurfaceLine(); Index: Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/TreeNodeInfos/StochasticSoilModelContextTreeNodeInfoTest.cs =================================================================== diff -u -rbf334f50530164badedba45a78f3aab857ae1bf6 -r3434a272cc8bfb25dae4bd7bd50afedb377343c0 --- Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/TreeNodeInfos/StochasticSoilModelContextTreeNodeInfoTest.cs (.../StochasticSoilModelContextTreeNodeInfoTest.cs) (revision bf334f50530164badedba45a78f3aab857ae1bf6) +++ Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/TreeNodeInfos/StochasticSoilModelContextTreeNodeInfoTest.cs (.../StochasticSoilModelContextTreeNodeInfoTest.cs) (revision 3434a272cc8bfb25dae4bd7bd50afedb377343c0) @@ -76,7 +76,7 @@ { // Setup var failureMechanismMock = mocks.StrictMock(); - var assessmentSectionMock = mocks.StrictMock(); + var assessmentSectionMock = mocks.StrictMock(); var stochasticSoilModelContextMock = mocks.StrictMock(failureMechanismMock, assessmentSectionMock); mocks.ReplayAll(); @@ -94,7 +94,7 @@ { // Setup var failureMechanismMock = mocks.StrictMock(); - var assessmentSectionMock = mocks.StrictMock(); + var assessmentSectionMock = mocks.StrictMock(); var stochasticSoilModelContextMock = mocks.StrictMock(failureMechanismMock, assessmentSectionMock); mocks.ReplayAll(); @@ -112,7 +112,7 @@ { // Setup var failureMechanismMock = mocks.StrictMock(); - var assessmentSectionMock = mocks.StrictMock(); + var assessmentSectionMock = mocks.StrictMock(); var stochasticSoilModelContextMock = mocks.StrictMock(failureMechanismMock, assessmentSectionMock); mocks.ReplayAll(); @@ -130,7 +130,7 @@ { // Setup var failureMechanismMock = mocks.StrictMock(); - var assessmentSectionMock = mocks.StrictMock(); + var assessmentSectionMock = mocks.StrictMock(); var stochasticSoilModelContextMock = mocks.StrictMock(failureMechanismMock, assessmentSectionMock); failureMechanismMock.StochasticSoilModels.Add(new StochasticSoilModel(0, "Name", "Name")); mocks.ReplayAll(); @@ -170,7 +170,7 @@ stochasticSoilModel.StochasticSoilProfiles.Add(stochasticSoilProfile2); var failureMechanismMock = mocks.StrictMock(); - var assessmentSectionMock = mocks.StrictMock(); + var assessmentSectionMock = mocks.StrictMock(); var stochasticSoilModelContextMock = mocks.StrictMock(failureMechanismMock, assessmentSectionMock); failureMechanismMock.StochasticSoilModels.Add(stochasticSoilModel); Index: Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/TypeConverters/LognormalDistributionDesignVariableTypeConverterTest.cs =================================================================== diff -u -r43fb77c51a8d1c0af128a2da0c3d51bbea6e25bb -r3434a272cc8bfb25dae4bd7bd50afedb377343c0 --- Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/TypeConverters/LognormalDistributionDesignVariableTypeConverterTest.cs (.../LognormalDistributionDesignVariableTypeConverterTest.cs) (revision 43fb77c51a8d1c0af128a2da0c3d51bbea6e25bb) +++ Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/TypeConverters/LognormalDistributionDesignVariableTypeConverterTest.cs (.../LognormalDistributionDesignVariableTypeConverterTest.cs) (revision 3434a272cc8bfb25dae4bd7bd50afedb377343c0) @@ -191,7 +191,7 @@ { // Scenario var mocks = new MockRepository(); - var assessmentSectionMock = mocks.StrictMock(); + var assessmentSectionMock = mocks.StrictMock(); var typeDescriptorContextMock = mocks.StrictMock(); var observer = mocks.StrictMock(); Index: Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/TypeConverters/NormalDistributionDesignVariableTypeConverterTest.cs =================================================================== diff -u -r43fb77c51a8d1c0af128a2da0c3d51bbea6e25bb -r3434a272cc8bfb25dae4bd7bd50afedb377343c0 --- Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/TypeConverters/NormalDistributionDesignVariableTypeConverterTest.cs (.../NormalDistributionDesignVariableTypeConverterTest.cs) (revision 43fb77c51a8d1c0af128a2da0c3d51bbea6e25bb) +++ Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/TypeConverters/NormalDistributionDesignVariableTypeConverterTest.cs (.../NormalDistributionDesignVariableTypeConverterTest.cs) (revision 3434a272cc8bfb25dae4bd7bd50afedb377343c0) @@ -191,7 +191,7 @@ // Scenario var mocks = new MockRepository(); var typeDescriptorContextMock = mocks.StrictMock(); - var assessmentSectionMock = mocks.StrictMock(); + var assessmentSectionMock = mocks.StrictMock(); var observer = mocks.StrictMock(); observer.Expect(o => o.UpdateObserver()); Index: Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/UITypeEditors/PipingInputContextHydraulicBoundaryLocationEditorTest.cs =================================================================== diff -u -r43fb77c51a8d1c0af128a2da0c3d51bbea6e25bb -r3434a272cc8bfb25dae4bd7bd50afedb377343c0 --- Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/UITypeEditors/PipingInputContextHydraulicBoundaryLocationEditorTest.cs (.../PipingInputContextHydraulicBoundaryLocationEditorTest.cs) (revision 43fb77c51a8d1c0af128a2da0c3d51bbea6e25bb) +++ Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/UITypeEditors/PipingInputContextHydraulicBoundaryLocationEditorTest.cs (.../PipingInputContextHydraulicBoundaryLocationEditorTest.cs) (revision 3434a272cc8bfb25dae4bd7bd50afedb377343c0) @@ -26,9 +26,11 @@ var provider = mockRepository.DynamicMock(); var service = mockRepository.DynamicMock(); var context = mockRepository.DynamicMock(); - var assessmentSectionMock = mockRepository.StrictMock(); + var assessmentSectionMock = mockRepository.StrictMock(); var hydraulicBoundaryDatabase = new HydraulicBoundaryDatabase(); - assessmentSectionMock.HydraulicBoundaryDatabase = hydraulicBoundaryDatabase; + assessmentSectionMock.Expect(asm => asm.HydraulicBoundaryDatabase) + .Return(hydraulicBoundaryDatabase) + .Repeat.AtLeastOnce(); var hydraulicBoundaryLocation = new TestHydraulicBoundaryLocation(); hydraulicBoundaryDatabase.Locations.Add(hydraulicBoundaryLocation); @@ -74,10 +76,11 @@ var provider = mockRepository.DynamicMock(); var service = mockRepository.DynamicMock(); var context = mockRepository.DynamicMock(); - var assessmentSectionMock = mockRepository.StrictMock(); + var assessmentSectionMock = mockRepository.StrictMock(); var hydraulicBoundaryDatabase = new HydraulicBoundaryDatabase(); - - assessmentSectionMock.HydraulicBoundaryDatabase = hydraulicBoundaryDatabase; + assessmentSectionMock.Expect(asm => asm.HydraulicBoundaryDatabase) + .Return(hydraulicBoundaryDatabase) + .Repeat.AtLeastOnce(); var hydraulicBoundaryLocation = new TestHydraulicBoundaryLocation(); var pipingInput = new PipingInput(new GeneralPipingInput()) Index: Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/UITypeEditors/PipingInputContextSoilProfileSelectionEditorTest.cs =================================================================== diff -u -r43fb77c51a8d1c0af128a2da0c3d51bbea6e25bb -r3434a272cc8bfb25dae4bd7bd50afedb377343c0 --- Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/UITypeEditors/PipingInputContextSoilProfileSelectionEditorTest.cs (.../PipingInputContextSoilProfileSelectionEditorTest.cs) (revision 43fb77c51a8d1c0af128a2da0c3d51bbea6e25bb) +++ Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/UITypeEditors/PipingInputContextSoilProfileSelectionEditorTest.cs (.../PipingInputContextSoilProfileSelectionEditorTest.cs) (revision 3434a272cc8bfb25dae4bd7bd50afedb377343c0) @@ -31,7 +31,7 @@ var provider = mockRepository.DynamicMock(); var service = mockRepository.DynamicMock(); var context = mockRepository.DynamicMock(); - var assessmentSectionMock = mockRepository.StrictMock(); + var assessmentSectionMock = mockRepository.StrictMock(); var pipingInput = new PipingInput(new GeneralPipingInput()) { @@ -77,7 +77,7 @@ var provider = mockRepository.DynamicMock(); var service = mockRepository.DynamicMock(); var context = mockRepository.DynamicMock(); - var assessmentSectionMock = mockRepository.StrictMock(); + var assessmentSectionMock = mockRepository.StrictMock(); var soilProfile = new TestPipingSoilProfile(); var stochasticSoilModel = new StochasticSoilModel(0, string.Empty, string.Empty) Index: Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/UITypeEditors/PipingInputContextSurfaceLineSelectionEditorTest.cs =================================================================== diff -u -r43fb77c51a8d1c0af128a2da0c3d51bbea6e25bb -r3434a272cc8bfb25dae4bd7bd50afedb377343c0 --- Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/UITypeEditors/PipingInputContextSurfaceLineSelectionEditorTest.cs (.../PipingInputContextSurfaceLineSelectionEditorTest.cs) (revision 43fb77c51a8d1c0af128a2da0c3d51bbea6e25bb) +++ Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/UITypeEditors/PipingInputContextSurfaceLineSelectionEditorTest.cs (.../PipingInputContextSurfaceLineSelectionEditorTest.cs) (revision 3434a272cc8bfb25dae4bd7bd50afedb377343c0) @@ -26,7 +26,7 @@ var provider = mockRepository.DynamicMock(); var service = mockRepository.DynamicMock(); var context = mockRepository.DynamicMock(); - var assessmentSectionMock = mockRepository.StrictMock(); + var assessmentSectionMock = mockRepository.StrictMock(); var pipingInput = new PipingInput(new GeneralPipingInput()) { @@ -72,7 +72,7 @@ var provider = mockRepository.DynamicMock(); var service = mockRepository.DynamicMock(); var context = mockRepository.DynamicMock(); - var assessmentSectionMock = mockRepository.StrictMock(); + var assessmentSectionMock = mockRepository.StrictMock(); var surfaceLine = new RingtoetsPipingSurfaceLine(); surfaceLine.SetGeometry(new[] Index: Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/Views/PipingCalculationsViewTest.cs =================================================================== diff -u -r5066e0bd460a33f868c0d9766007ac1eb2a08fb5 -r3434a272cc8bfb25dae4bd7bd50afedb377343c0 --- Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/Views/PipingCalculationsViewTest.cs (.../PipingCalculationsViewTest.cs) (revision 5066e0bd460a33f868c0d9766007ac1eb2a08fb5) +++ Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/Views/PipingCalculationsViewTest.cs (.../PipingCalculationsViewTest.cs) (revision 3434a272cc8bfb25dae4bd7bd50afedb377343c0) @@ -138,7 +138,7 @@ // Setup var mocks = new MockRepository(); var pipingFailureMechanism = mocks.StrictMock(); - var assessmentSection = mocks.StrictMock(); + var assessmentSection = mocks.Stub(); var applicationSelection = mocks.StrictMock(); mocks.ReplayAll(); @@ -169,7 +169,7 @@ { // Setup var mocks = new MockRepository(); - var assessmentSection = mocks.StrictMock(); + var assessmentSection = mocks.Stub(); var pipingCalculationsView = ShowPipingCalculationsView(); mocks.ReplayAll(); @@ -190,7 +190,7 @@ { // Setup var mocks = new MockRepository(); - var assessmentSection = mocks.StrictMock(); + var assessmentSection = mocks.Stub(); var hydraulicBoundaryDatabase = mocks.StrictMock(); mocks.ReplayAll(); @@ -550,7 +550,7 @@ private PipingCalculationsView ShowFullyConfiguredPipingCalculationsView() { var mocks = new MockRepository(); - var assessmentSection = mocks.StrictMock(); + var assessmentSection = mocks.Stub(); var hydraulicBoundaryDatabase = mocks.StrictMock(); var hydraulicBoundaryLocation1 = new HydraulicBoundaryLocation(1, "Location 1", 1.1, 2.2); var hydraulicBoundaryLocation2 = new HydraulicBoundaryLocation(2, "Location 2", 3.3, 4.4); Index: Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/Views/PipingFailureMechanismViewTest.cs =================================================================== diff -u -r4e8d24a03bda23a2c393b76c95da11f3c8df5e4d -r3434a272cc8bfb25dae4bd7bd50afedb377343c0 --- Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/Views/PipingFailureMechanismViewTest.cs (.../PipingFailureMechanismViewTest.cs) (revision 4e8d24a03bda23a2c393b76c95da11f3c8df5e4d) +++ Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/Views/PipingFailureMechanismViewTest.cs (.../PipingFailureMechanismViewTest.cs) (revision 3434a272cc8bfb25dae4bd7bd50afedb377343c0) @@ -10,6 +10,7 @@ using NUnit.Framework; using Rhino.Mocks; using Ringtoets.Common.Data; +using Ringtoets.Common.Data.Contribution; using Ringtoets.HydraRing.Data; using Ringtoets.Piping.Data; using Ringtoets.Piping.Forms.PresentationObjects; @@ -57,7 +58,9 @@ var view = new PipingFailureMechanismView(); var map = (MapControl)view.Controls[0]; - var assessmentSectionBase = new TestAssessmentSectionBase(); + var mocks = new MockRepository(); + var assessmentSectionBase = mocks.Stub(); + mocks.ReplayAll(); var pipingFailureMechanism = new PipingFailureMechanism(); @@ -76,6 +79,8 @@ AssertFailureMechanismSectionsEndPointMapData(pipingFailureMechanism.Sections, mapData.List[3]); AssertHydraulicBoundaryLocationsMapData(assessmentSectionBase.HydraulicBoundaryDatabase, mapData.List[4]); AssertReferenceMapData(assessmentSectionBase.ReferenceLine, mapData.List[5]); + + mocks.VerifyAll(); } [Test] @@ -92,21 +97,23 @@ new Point2D(4.0, 4.0), new Point2D(6.0, 4.0) }; - var referenceLine = new ReferenceLine(); - referenceLine.SetGeometry(refereceGeometryPoints); - var assessmentSectionBase = new TestAssessmentSectionBase + var hydraulicBoundaryDatabase = new HydraulicBoundaryDatabase(); + hydraulicBoundaryDatabase.Locations.Add(new HydraulicBoundaryLocation(1, "test", 1.0, 2.0)); + + var referenceLine = new ReferenceLine(); + referenceLine.SetGeometry(new[] { - HydraulicBoundaryDatabase = new HydraulicBoundaryDatabase(), - ReferenceLine = referenceLine - }; - assessmentSectionBase.HydraulicBoundaryDatabase.Locations.Add(new HydraulicBoundaryLocation(1, "test", 1.0, 2.0)); - assessmentSectionBase.ReferenceLine.SetGeometry(new List - { new Point2D(1.0, 2.0), new Point2D(2.0, 1.0) }); + var mocks = new MockRepository(); + var assessmentSectionBase = mocks.Stub(); + assessmentSectionBase.HydraulicBoundaryDatabase = hydraulicBoundaryDatabase; + assessmentSectionBase.ReferenceLine = referenceLine; + mocks.ReplayAll(); + var pipingFailureMechanism = new PipingFailureMechanism(); pipingFailureMechanism.SurfaceLines.Add(new RingtoetsPipingSurfaceLine()); pipingFailureMechanism.AddSection(new FailureMechanismSection("A", refereceGeometryPoints.Take(2))); @@ -131,6 +138,8 @@ AssertFailureMechanismSectionsEndPointMapData(pipingFailureMechanism.Sections, mapData.List[3]); AssertHydraulicBoundaryLocationsMapData(assessmentSectionBase.HydraulicBoundaryDatabase, mapData.List[4]); AssertReferenceMapData(assessmentSectionBase.ReferenceLine, mapData.List[5]); + + mocks.VerifyAll(); } [Test] @@ -140,11 +149,13 @@ var view = new PipingFailureMechanismView(); var map = (MapControl)view.Controls[0]; + var hydraulicBoundaryDatabase1 = new HydraulicBoundaryDatabase(); + hydraulicBoundaryDatabase1.Locations.Add(new HydraulicBoundaryLocation(1, "test", 1.0, 2.0)); + var assessmentSectionBase = new TestAssessmentSectionBase { - HydraulicBoundaryDatabase = new HydraulicBoundaryDatabase() + HydraulicBoundaryDatabase = hydraulicBoundaryDatabase1 }; - assessmentSectionBase.HydraulicBoundaryDatabase.Locations.Add(new HydraulicBoundaryLocation(1, "test", 1.0, 2.0)); var pipingFailureMechanism = new PipingFailureMechanism(); var pipingContext = new PipingFailureMechanismContext(pipingFailureMechanism, assessmentSectionBase); @@ -158,9 +169,11 @@ // Precondition Assert.AreEqual(geometryBeforeUpdate, new Point2D(1.0, 2.0)); - assessmentSectionBase.HydraulicBoundaryDatabase = new HydraulicBoundaryDatabase(); - assessmentSectionBase.HydraulicBoundaryDatabase.Locations.Add(new HydraulicBoundaryLocation(2, "test2", 2.0, 3.0)); + var hydraulicBoundaryDatabase2 = new HydraulicBoundaryDatabase(); + hydraulicBoundaryDatabase2.Locations.Add(new HydraulicBoundaryLocation(2, "test2", 2.0, 3.0)); + assessmentSectionBase.HydraulicBoundaryDatabase = hydraulicBoundaryDatabase2; + // Call assessmentSectionBase.NotifyObservers(); @@ -235,7 +248,10 @@ var view = new PipingFailureMechanismView(); var map = (MapControl)view.Controls[0]; - var assessmentSectionBase = new TestAssessmentSectionBase(); + var mocks = new MockRepository(); + var assessmentSectionBase = mocks.Stub(); + mocks.ReplayAll(); + var pipingFailureMechanism = new PipingFailureMechanism(); var pipingContext = new PipingFailureMechanismContext(pipingFailureMechanism, assessmentSectionBase); @@ -257,6 +273,8 @@ // Assert Assert.AreEqual(mapData, map.Data); Assert.IsInstanceOf(map.Data); + + mocks.VerifyAll(); } [Test] @@ -348,10 +366,8 @@ public void NotifyObservers_DataUpdatedNotifyObserversOnOldData_NoUpdateInViewData() { // Setup - var mocks = new MockRepository(); - AssessmentSectionBase oldAssessmentSectionMock = mocks.Stub(); - AssessmentSectionBase newAssessmentSectionMock = mocks.Stub(); - mocks.ReplayAll(); + IAssessmentSection oldAssessmentSectionMock = new TestAssessmentSectionBase(); + IAssessmentSection newAssessmentSectionMock = new TestAssessmentSectionBase(); newAssessmentSectionMock.ReferenceLine = new ReferenceLine(); newAssessmentSectionMock.ReferenceLine.SetGeometry(new[] @@ -376,8 +392,6 @@ // Assert Assert.AreEqual(dataBeforeUpdate, map.Data); - - mocks.VerifyAll(); } private void AssertReferenceMapData(ReferenceLine referenceLine, MapData mapData) @@ -464,12 +478,19 @@ Assert.AreEqual("Profielschematisaties", mapData.Name); } - private class TestAssessmentSectionBase : AssessmentSectionBase + private class TestAssessmentSectionBase : Observable, IAssessmentSection { - public override IEnumerable GetFailureMechanisms() + public string Name { get; set; } + public ReferenceLine ReferenceLine { get; set; } + public FailureMechanismContribution FailureMechanismContribution { get; private set; } + public HydraulicBoundaryDatabase HydraulicBoundaryDatabase { get; set; } + + public IEnumerable GetFailureMechanisms() { yield break; } + + public long StorageId { get; set; } } } } Index: Ringtoets/Piping/test/Ringtoets.Piping.Integration.Test/ImportSoilProfileFromDatabaseTest.cs =================================================================== diff -u -r43fb77c51a8d1c0af128a2da0c3d51bbea6e25bb -r3434a272cc8bfb25dae4bd7bd50afedb377343c0 --- Ringtoets/Piping/test/Ringtoets.Piping.Integration.Test/ImportSoilProfileFromDatabaseTest.cs (.../ImportSoilProfileFromDatabaseTest.cs) (revision 43fb77c51a8d1c0af128a2da0c3d51bbea6e25bb) +++ Ringtoets/Piping/test/Ringtoets.Piping.Integration.Test/ImportSoilProfileFromDatabaseTest.cs (.../ImportSoilProfileFromDatabaseTest.cs) (revision 3434a272cc8bfb25dae4bd7bd50afedb377343c0) @@ -27,7 +27,7 @@ var mocks = new MockRepository(); var observer = mocks.StrictMock(); - var assessmentSection = mocks.Stub(); + var assessmentSection = mocks.Stub(); assessmentSection.ReferenceLine = new ReferenceLine(); mocks.ReplayAll(); @@ -90,7 +90,7 @@ var mocks = new MockRepository(); var observer = mocks.StrictMock(); - var assessmentSection = mocks.Stub(); + var assessmentSection = mocks.Stub(); assessmentSection.ReferenceLine = new ReferenceLine(); mocks.ReplayAll(); @@ -152,7 +152,7 @@ var mocks = new MockRepository(); var observer = mocks.StrictMock(); - var assessmentSection = mocks.Stub(); + var assessmentSection = mocks.Stub(); assessmentSection.ReferenceLine = new ReferenceLine(); mocks.ReplayAll(); Index: Ringtoets/Piping/test/Ringtoets.Piping.Plugin.Test/FileImporter/PipingSoilProfilesImporterTest.cs =================================================================== diff -u -rbf334f50530164badedba45a78f3aab857ae1bf6 -r3434a272cc8bfb25dae4bd7bd50afedb377343c0 --- Ringtoets/Piping/test/Ringtoets.Piping.Plugin.Test/FileImporter/PipingSoilProfilesImporterTest.cs (.../PipingSoilProfilesImporterTest.cs) (revision bf334f50530164badedba45a78f3aab857ae1bf6) +++ Ringtoets/Piping/test/Ringtoets.Piping.Plugin.Test/FileImporter/PipingSoilProfilesImporterTest.cs (.../PipingSoilProfilesImporterTest.cs) (revision 3434a272cc8bfb25dae4bd7bd50afedb377343c0) @@ -57,7 +57,7 @@ { // Setup var mocks = new MockRepository(); - var assessmentSection = mocks.Stub(); + var assessmentSection = mocks.Stub(); assessmentSection.ReferenceLine = new ReferenceLine(); var failureMechanism = new PipingFailureMechanism(); mocks.ReplayAll(); @@ -79,7 +79,7 @@ { // Setup var mocks = new MockRepository(); - var assessmentSection = mocks.Stub(); + var assessmentSection = mocks.Stub(); assessmentSection.ReferenceLine = null; var failureMechanism = new PipingFailureMechanism(); mocks.ReplayAll(); @@ -104,7 +104,7 @@ string validFilePath = Path.Combine(testDataPath, file); var observer = mockRepository.StrictMock(); - var assessmentSection = mockRepository.Stub(); + var assessmentSection = mockRepository.Stub(); assessmentSection.ReferenceLine = new ReferenceLine(); var failureMechanism = new PipingFailureMechanism(); mockRepository.ReplayAll(); @@ -147,7 +147,7 @@ string invalidFilePath = Path.Combine(testDataPath, file); var observer = mockRepository.StrictMock(); - var assessmentSection = mockRepository.Stub(); + var assessmentSection = mockRepository.Stub(); assessmentSection.ReferenceLine = new ReferenceLine(); var failureMechanism = new PipingFailureMechanism(); mockRepository.ReplayAll(); @@ -190,7 +190,7 @@ string invalidFilePath = Path.Combine(testDataPath, file); var observer = mockRepository.StrictMock(); - var assessmentSection = mockRepository.Stub(); + var assessmentSection = mockRepository.Stub(); var failureMechanism = new PipingFailureMechanism(); mockRepository.ReplayAll(); @@ -227,7 +227,7 @@ var observer = mockRepository.StrictMock(); var pipingFailureMechanism = new PipingFailureMechanism(); - var assessmentSection = mockRepository.Stub(); + var assessmentSection = mockRepository.Stub(); assessmentSection.ReferenceLine = new ReferenceLine(); mockRepository.ReplayAll(); @@ -287,7 +287,7 @@ var observer = mockRepository.StrictMock(); var pipingFailureMechanism = new PipingFailureMechanism(); - var assessmentSection = mockRepository.Stub(); + var assessmentSection = mockRepository.Stub(); assessmentSection.ReferenceLine = new ReferenceLine(); mockRepository.ReplayAll(); @@ -324,7 +324,7 @@ string validFilePath = Path.Combine(testDataPath, "complete.soil"); var observer = mockRepository.StrictMock(); - var assessmentSection = mockRepository.Stub(); + var assessmentSection = mockRepository.Stub(); assessmentSection.ReferenceLine = new ReferenceLine(); var failureMechanism = new PipingFailureMechanism(); mockRepository.ReplayAll(); @@ -366,7 +366,7 @@ var observer = mockRepository.StrictMock(); observer.Expect(o => o.UpdateObserver()); - var assessmentSection = mockRepository.Stub(); + var assessmentSection = mockRepository.Stub(); assessmentSection.ReferenceLine = new ReferenceLine(); var failureMechanism = new PipingFailureMechanism(); mockRepository.ReplayAll(); @@ -403,7 +403,7 @@ string corruptPath = Path.Combine(testDataPath, "empty.soil"); var observer = mockRepository.StrictMock(); - var assessmentSection = mockRepository.Stub(); + var assessmentSection = mockRepository.Stub(); assessmentSection.ReferenceLine = new ReferenceLine(); var failureMechanism = new PipingFailureMechanism(); mockRepository.ReplayAll(); @@ -441,7 +441,7 @@ string corruptPath = Path.Combine(testDataPath, "invalidAtX2dProperty.soil"); var observer = mockRepository.StrictMock(); - var assessmentSection = mockRepository.Stub(); + var assessmentSection = mockRepository.Stub(); assessmentSection.ReferenceLine = new ReferenceLine(); var failureMechanism = new PipingFailureMechanism(); mockRepository.ReplayAll(); @@ -486,7 +486,7 @@ string corruptPath = Path.Combine(testDataPath, "incorrectValue2dProperty.soil"); var observer = mockRepository.StrictMock(); - var assessmentSection = mockRepository.Stub(); + var assessmentSection = mockRepository.Stub(); assessmentSection.ReferenceLine = new ReferenceLine(); var failureMechanism = new PipingFailureMechanism(); mockRepository.ReplayAll(); @@ -515,7 +515,7 @@ string validFilePath = Path.Combine(testDataPath, "invalidStochasticSoilProfiles.soil"); var observer = mockRepository.StrictMock(); - var assessmentSection = mockRepository.Stub(); + var assessmentSection = mockRepository.Stub(); assessmentSection.ReferenceLine = new ReferenceLine(); var failureMechanism = new PipingFailureMechanism(); mockRepository.ReplayAll(); @@ -550,7 +550,7 @@ string validFilePath = Path.Combine(testDataPath, "incorrectProbability.soil"); var observer = mockRepository.StrictMock(); - var assessmentSection = mockRepository.Stub(); + var assessmentSection = mockRepository.Stub(); assessmentSection.ReferenceLine = new ReferenceLine(); var failureMechanism = new PipingFailureMechanism(); mockRepository.ReplayAll(); Index: Ringtoets/Piping/test/Ringtoets.Piping.Plugin.Test/FileImporter/PipingSurfaceLinesCsvImporterTest.cs =================================================================== diff -u -re68cf27e96c240c8da274e299080f1a79f605122 -r3434a272cc8bfb25dae4bd7bd50afedb377343c0 --- Ringtoets/Piping/test/Ringtoets.Piping.Plugin.Test/FileImporter/PipingSurfaceLinesCsvImporterTest.cs (.../PipingSurfaceLinesCsvImporterTest.cs) (revision e68cf27e96c240c8da274e299080f1a79f605122) +++ Ringtoets/Piping/test/Ringtoets.Piping.Plugin.Test/FileImporter/PipingSurfaceLinesCsvImporterTest.cs (.../PipingSurfaceLinesCsvImporterTest.cs) (revision 3434a272cc8bfb25dae4bd7bd50afedb377343c0) @@ -55,7 +55,7 @@ { // Setup var mocks = new MockRepository(); - var assessmentSection = mocks.Stub(); + var assessmentSection = mocks.Stub(); assessmentSection.ReferenceLine = new ReferenceLine(); var failureMechanism = new PipingFailureMechanism(); mocks.ReplayAll(); @@ -77,7 +77,7 @@ { // Setup var mocks = new MockRepository(); - var assessmentSection = mocks.Stub(); + var assessmentSection = mocks.Stub(); assessmentSection.ReferenceLine = null; var failureMechanism = new PipingFailureMechanism(); mocks.ReplayAll(); @@ -102,7 +102,7 @@ string validFilePath = Path.Combine(ioTestDataPath, twovalidsurfacelinesCsv); var mocks = new MockRepository(); - var assessmentSection = mocks.Stub(); + var assessmentSection = mocks.Stub(); var failureMechanism = new PipingFailureMechanism(); mocks.ReplayAll(); @@ -132,7 +132,7 @@ var mocks = new MockRepository(); var observer = mocks.StrictMock(); - var assessmentSection = mocks.Stub(); + var assessmentSection = mocks.Stub(); var referenceLine = new ReferenceLine(); referenceLine.SetGeometry(new[] { @@ -225,7 +225,7 @@ var mocks = new MockRepository(); var observer = mocks.StrictMock(); - var assessmentSection = mocks.Stub(); + var assessmentSection = mocks.Stub(); var referenceLine = new ReferenceLine(); referenceLine.SetGeometry(new[] { @@ -295,7 +295,7 @@ var mocks = new MockRepository(); var observer = mocks.StrictMock(); - var assessmentSection = mocks.Stub(); + var assessmentSection = mocks.Stub(); assessmentSection.ReferenceLine = new ReferenceLine(); var failureMechanism = new PipingFailureMechanism(); mocks.ReplayAll(); @@ -333,7 +333,7 @@ var mocks = new MockRepository(); var observer = mocks.StrictMock(); - var assessmentSection = mocks.Stub(); + var assessmentSection = mocks.Stub(); var referenceLine = new ReferenceLine(); referenceLine.SetGeometry(new[] { @@ -379,7 +379,7 @@ var mocks = new MockRepository(); var observer = mocks.StrictMock(); - var assessmentSection = mocks.Stub(); + var assessmentSection = mocks.Stub(); assessmentSection.ReferenceLine = new ReferenceLine(); var failureMechanism = new PipingFailureMechanism(); mocks.ReplayAll(); @@ -414,7 +414,7 @@ var mocks = new MockRepository(); var observer = mocks.StrictMock(); - var assessmentSection = mocks.Stub(); + var assessmentSection = mocks.Stub(); assessmentSection.ReferenceLine = new ReferenceLine(); var failureMechanism = new PipingFailureMechanism(); mocks.ReplayAll(); @@ -455,7 +455,7 @@ var mocks = new MockRepository(); var observer = mocks.StrictMock(); - var assessmentSection = mocks.Stub(); + var assessmentSection = mocks.Stub(); assessmentSection.ReferenceLine = new ReferenceLine(); var failureMechanism = new PipingFailureMechanism(); mocks.ReplayAll(); @@ -498,7 +498,7 @@ var mocks = new MockRepository(); var observer = mocks.StrictMock(); - var assessmentSection = mocks.Stub(); + var assessmentSection = mocks.Stub(); assessmentSection.ReferenceLine = new ReferenceLine(); var failureMechanism = new PipingFailureMechanism(); mocks.ReplayAll(); @@ -545,7 +545,7 @@ { var mocks = new MockRepository(); var observer = mocks.StrictMock(); - var assessmentSection = mocks.Stub(); + var assessmentSection = mocks.Stub(); assessmentSection.ReferenceLine = new ReferenceLine(); var failureMechanism = new PipingFailureMechanism(); mocks.ReplayAll(); @@ -602,7 +602,7 @@ var mocks = new MockRepository(); var observer = mocks.StrictMock(); - var assessmentSection = mocks.Stub(); + var assessmentSection = mocks.Stub(); var referenceLine = new ReferenceLine(); referenceLine.SetGeometry(new[] { @@ -656,7 +656,7 @@ var mocks = new MockRepository(); var observer = mocks.StrictMock(); - var assessmentSection = mocks.Stub(); + var assessmentSection = mocks.Stub(); var referenceLine = new ReferenceLine(); referenceLine.SetGeometry(new[] { @@ -731,7 +731,7 @@ var mocks = new MockRepository(); var observer = mocks.StrictMock(); - var assessmentSection = mocks.Stub(); + var assessmentSection = mocks.Stub(); assessmentSection.ReferenceLine = new ReferenceLine(); var failureMechanism = new PipingFailureMechanism(); mocks.ReplayAll(); @@ -786,7 +786,7 @@ var mocks = new MockRepository(); var observer = mocks.StrictMock(); - var assessmentSection = mocks.Stub(); + var assessmentSection = mocks.Stub(); assessmentSection.ReferenceLine = new ReferenceLine(); var failureMechanism = new PipingFailureMechanism(); mocks.ReplayAll(); @@ -840,7 +840,7 @@ var mocks = new MockRepository(); var observer = mocks.StrictMock(); - var assessmentSection = mocks.Stub(); + var assessmentSection = mocks.Stub(); assessmentSection.ReferenceLine = new ReferenceLine(); var failureMechanism = new PipingFailureMechanism(); mocks.ReplayAll(); @@ -879,7 +879,7 @@ var mocks = new MockRepository(); var observer = mocks.StrictMock(); - var assessmentSection = mocks.Stub(); + var assessmentSection = mocks.Stub(); var referenceLine = new ReferenceLine(); referenceLine.SetGeometry(new[] { @@ -925,7 +925,7 @@ var mocks = new MockRepository(); var observer = mocks.StrictMock(); - var assessmentSection = mocks.Stub(); + var assessmentSection = mocks.Stub(); assessmentSection.ReferenceLine = new ReferenceLine(); var failureMechanism = new PipingFailureMechanism(); mocks.ReplayAll(); @@ -975,7 +975,7 @@ var mocks = new MockRepository(); var observer = mocks.StrictMock(); - var assessmentSection = mocks.Stub(); + var assessmentSection = mocks.Stub(); assessmentSection.ReferenceLine = new ReferenceLine(); var failureMechanism = new PipingFailureMechanism(); mocks.ReplayAll(); @@ -1034,7 +1034,7 @@ { var mocks = new MockRepository(); var observer = mocks.StrictMock(); - var assessmentSection = mocks.Stub(); + var assessmentSection = mocks.Stub(); assessmentSection.ReferenceLine = new ReferenceLine(); var failureMechanism = new PipingFailureMechanism(); mocks.ReplayAll(); @@ -1104,7 +1104,7 @@ var mocks = new MockRepository(); var observer = mocks.StrictMock(); - var assessmentSection = mocks.Stub(); + var assessmentSection = mocks.Stub(); var referenceLine = new ReferenceLine(); referenceLine.SetGeometry(new[] { @@ -1165,7 +1165,7 @@ var mocks = new MockRepository(); var observer = mocks.StrictMock(); - var assessmentSection = mocks.Stub(); + var assessmentSection = mocks.Stub(); var referenceLine = new ReferenceLine(); referenceLine.SetGeometry(new[] { @@ -1245,7 +1245,7 @@ var mocks = new MockRepository(); var observer = mocks.StrictMock(); - var assessmentSection = mocks.Stub(); + var assessmentSection = mocks.Stub(); var referenceLine = new ReferenceLine(); referenceLine.SetGeometry(new[] { @@ -1319,7 +1319,7 @@ var mocks = new MockRepository(); var observer = mocks.StrictMock(); - var assessmentSection = mocks.Stub(); + var assessmentSection = mocks.Stub(); var referenceLine = new ReferenceLine(); referenceLine.SetGeometry(new[] { @@ -1398,7 +1398,7 @@ var mocks = new MockRepository(); var observer = mocks.StrictMock(); - var assessmentSection = mocks.Stub(); + var assessmentSection = mocks.Stub(); var referenceLine = new ReferenceLine(); referenceLine.SetGeometry(new[] { @@ -1482,7 +1482,7 @@ var mocks = new MockRepository(); var observer = mocks.StrictMock(); - var assessmentSection = mocks.Stub(); + var assessmentSection = mocks.Stub(); var referenceLine = new ReferenceLine(); referenceLine.SetGeometry(new[] { @@ -1592,7 +1592,7 @@ var mocks = new MockRepository(); var observer = mocks.StrictMock(); - var assessmentSection = mocks.Stub(); + var assessmentSection = mocks.Stub(); var referenceLine = new ReferenceLine(); referenceLine.SetGeometry(new[] { @@ -1645,7 +1645,7 @@ var mocks = new MockRepository(); var observer = mocks.StrictMock(); - var assessmentSection = mocks.Stub(); + var assessmentSection = mocks.Stub(); var referenceLine = new ReferenceLine(); referenceLine.SetGeometry(new[] { Index: Ringtoets/Piping/test/Ringtoets.Piping.Plugin.Test/ViewInfos/PipingCalculationsViewInfoTest.cs =================================================================== diff -u -r43fb77c51a8d1c0af128a2da0c3d51bbea6e25bb -r3434a272cc8bfb25dae4bd7bd50afedb377343c0 --- Ringtoets/Piping/test/Ringtoets.Piping.Plugin.Test/ViewInfos/PipingCalculationsViewInfoTest.cs (.../PipingCalculationsViewInfoTest.cs) (revision 43fb77c51a8d1c0af128a2da0c3d51bbea6e25bb) +++ Ringtoets/Piping/test/Ringtoets.Piping.Plugin.Test/ViewInfos/PipingCalculationsViewInfoTest.cs (.../PipingCalculationsViewInfoTest.cs) (revision 3434a272cc8bfb25dae4bd7bd50afedb377343c0) @@ -46,7 +46,7 @@ public void GetViewData_Always_ReturnsWrappedCalculationGroup() { // Setup - var assessmentSectionMock = mocks.StrictMock(); + var assessmentSectionMock = mocks.StrictMock(); var pipingFailureMechanismMock = mocks.StrictMock(); var pipingCalculationsGroupMock = mocks.StrictMock(); var pipingCalculationGroupContext = new PipingCalculationGroupContext(pipingCalculationsGroupMock, Enumerable.Empty(), Enumerable.Empty(), pipingFailureMechanismMock, assessmentSectionMock); @@ -76,7 +76,7 @@ public void AdditionalDataCheck_PipingCalculationGroupContextWithPipingFailureMechanimsParent_ReturnsTrue() { // Setup - var assessmentSectionMock = mocks.StrictMock(); + var assessmentSectionMock = mocks.StrictMock(); var pipingFailureMechanismMock = mocks.StrictMock(); var pipingCalculationGroupContext = new PipingCalculationGroupContext(pipingFailureMechanismMock.CalculationsGroup, Enumerable.Empty(), Enumerable.Empty(), pipingFailureMechanismMock, assessmentSectionMock); @@ -90,7 +90,7 @@ public void AdditionalDataCheck_PipingCalculationGroupContextWithoutPipingFailureMechanimsParent_ReturnsFalse() { // Setup - var assessmentSectionMock = mocks.StrictMock(); + var assessmentSectionMock = mocks.StrictMock(); var pipingFailureMechanismMock = mocks.StrictMock(); var pipingCalculationsGroupMock = mocks.StrictMock(); var pipingCalculationGroupContext = new PipingCalculationGroupContext(pipingCalculationsGroupMock, Enumerable.Empty(), Enumerable.Empty(), pipingFailureMechanismMock, assessmentSectionMock); @@ -106,7 +106,7 @@ { // Setup var viewMock = mocks.StrictMock(); - var assessmentSectionMock = mocks.StrictMock(); + var assessmentSectionMock = mocks.StrictMock(); var pipingCalculationsGroupMock = mocks.StrictMock(); viewMock.Expect(vm => vm.Data).Return(pipingCalculationsGroupMock); @@ -123,7 +123,7 @@ { // Setup var viewMock = mocks.StrictMock(); - var assessmentSectionMock = mocks.StrictMock(); + var assessmentSectionMock = mocks.StrictMock(); var pipingFailureMechanismMock = mocks.StrictMock(); var pipingCalculationsGroupMock = mocks.StrictMock(); @@ -144,7 +144,7 @@ { // Setup var viewMock = mocks.StrictMock(); - var assessmentSectionMock = mocks.StrictMock(); + var assessmentSectionMock = mocks.StrictMock(); var pipingFailureMechanismMock = mocks.StrictMock(); viewMock.Expect(vm => vm.Data).Return(pipingFailureMechanismMock.CalculationsGroup); @@ -164,7 +164,7 @@ { // Setup var viewMock = mocks.StrictMock(); - var assessmentSectionMock = mocks.StrictMock(); + var assessmentSectionMock = mocks.StrictMock(); var pipingFailureMechanismMock = mocks.StrictMock(); var pipingCalculationsGroupMock = mocks.StrictMock(); var pipingCalculationGroupContext = new PipingCalculationGroupContext(pipingCalculationsGroupMock, Enumerable.Empty(), Enumerable.Empty(), pipingFailureMechanismMock, assessmentSectionMock); Index: Ringtoets/Piping/test/Ringtoets.Piping.Plugin.Test/ViewInfos/PipingFailureMechanismViewInfoTest.cs =================================================================== diff -u -r39acd9de68e455ba8877ee8657bb54697be8b289 -r3434a272cc8bfb25dae4bd7bd50afedb377343c0 --- Ringtoets/Piping/test/Ringtoets.Piping.Plugin.Test/ViewInfos/PipingFailureMechanismViewInfoTest.cs (.../PipingFailureMechanismViewInfoTest.cs) (revision 39acd9de68e455ba8877ee8657bb54697be8b289) +++ Ringtoets/Piping/test/Ringtoets.Piping.Plugin.Test/ViewInfos/PipingFailureMechanismViewInfoTest.cs (.../PipingFailureMechanismViewInfoTest.cs) (revision 3434a272cc8bfb25dae4bd7bd50afedb377343c0) @@ -59,8 +59,8 @@ { // Setup var viewMock = mocks.StrictMock(); - var assessmentSectionMock = mocks.StrictMock(); - var otherAssessmentSectionMock = mocks.StrictMock(); + var assessmentSectionMock = mocks.StrictMock(); + var otherAssessmentSectionMock = mocks.StrictMock(); var pipingFailureMechanismMock = mocks.StrictMock(); var pipingFailureMechanismContextMock = mocks.StrictMock(pipingFailureMechanismMock, assessmentSectionMock); @@ -77,7 +77,7 @@ { // Setup var viewMock = mocks.StrictMock(); - var assessmentSectionMock = mocks.StrictMock(); + var assessmentSectionMock = mocks.StrictMock(); var pipingFailureMechanismMock = mocks.StrictMock(); var pipingFailureMechanismContextMock = mocks.StrictMock(pipingFailureMechanismMock, assessmentSectionMock);