Index: Application/Ringtoets/src/Application.Ringtoets.Storage/Read/FailureMechanismEntityReadExtensions.cs =================================================================== diff -u -r209bfd7b71ef53a57e1a52337f1333d38122282f -r20bb156dfc129b1602ddbcddc73c0806807f19ab --- Application/Ringtoets/src/Application.Ringtoets.Storage/Read/FailureMechanismEntityReadExtensions.cs (.../FailureMechanismEntityReadExtensions.cs) (revision 209bfd7b71ef53a57e1a52337f1333d38122282f) +++ Application/Ringtoets/src/Application.Ringtoets.Storage/Read/FailureMechanismEntityReadExtensions.cs (.../FailureMechanismEntityReadExtensions.cs) (revision 20bb156dfc129b1602ddbcddc73c0806807f19ab) @@ -82,12 +82,12 @@ } /// - /// Read the and use the information to construct a . + /// Read the and use the information to construct a . /// - /// A new . - internal static MacroStabilityInwardsFailureMechanism ReadAsMacroStabilityInwardsFailureMechanism(this FailureMechanismEntity entity) + /// A new . + internal static MacrostabilityInwardsFailureMechanism ReadAsMacroStabilityInwardsFailureMechanism(this FailureMechanismEntity entity) { - var failureMechanism = new MacroStabilityInwardsFailureMechanism() + var failureMechanism = new MacrostabilityInwardsFailureMechanism() { StorageId = entity.FailureMechanismEntityId, IsRelevant = entity.IsRelevant == 1 Index: Application/Ringtoets/src/Application.Ringtoets.Storage/Update/StandAloneFailureMechanismUpdateExtensions.cs =================================================================== diff -u -r209bfd7b71ef53a57e1a52337f1333d38122282f -r20bb156dfc129b1602ddbcddc73c0806807f19ab --- Application/Ringtoets/src/Application.Ringtoets.Storage/Update/StandAloneFailureMechanismUpdateExtensions.cs (.../StandAloneFailureMechanismUpdateExtensions.cs) (revision 209bfd7b71ef53a57e1a52337f1333d38122282f) +++ Application/Ringtoets/src/Application.Ringtoets.Storage/Update/StandAloneFailureMechanismUpdateExtensions.cs (.../StandAloneFailureMechanismUpdateExtensions.cs) (revision 20bb156dfc129b1602ddbcddc73c0806807f19ab) @@ -30,13 +30,13 @@ namespace Application.Ringtoets.Storage.Update { /// - /// Extension methods for related to updating a . + /// Extension methods for related to updating a . /// internal static class StandAloneFailureMechanismUpdateExtensions { /// /// Updates a in the database based on the information of the - /// . + /// . /// /// The mechanism to update the database entity for. /// The object keeping track of update operations. Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/CreateConversionCollectorTest.cs =================================================================== diff -u -r8a2d2653ceff765beecfcedab41a6be91df7d16e -r20bb156dfc129b1602ddbcddc73c0806807f19ab --- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/CreateConversionCollectorTest.cs (.../CreateConversionCollectorTest.cs) (revision 8a2d2653ceff765beecfcedab41a6be91df7d16e) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/CreateConversionCollectorTest.cs (.../CreateConversionCollectorTest.cs) (revision 20bb156dfc129b1602ddbcddc73c0806807f19ab) @@ -524,7 +524,7 @@ { FailureMechanismEntityId = storageId }; - var model = new MacroStabilityInwardsFailureMechanism(); + var model = new MacrostabilityInwardsFailureMechanism(); collector.Create(entity, model); // Call Index: Ringtoets/Common/src/Ringtoets.Common.Data/Contribution/OtherFailureMechanism.cs =================================================================== diff -u -r41fac7fff0a505c08945108d795dcb877f10b816 -r20bb156dfc129b1602ddbcddc73c0806807f19ab --- Ringtoets/Common/src/Ringtoets.Common.Data/Contribution/OtherFailureMechanism.cs (.../OtherFailureMechanism.cs) (revision 41fac7fff0a505c08945108d795dcb877f10b816) +++ Ringtoets/Common/src/Ringtoets.Common.Data/Contribution/OtherFailureMechanism.cs (.../OtherFailureMechanism.cs) (revision 20bb156dfc129b1602ddbcddc73c0806807f19ab) @@ -35,7 +35,7 @@ /// /// Creates a new instance of . /// - public OtherFailureMechanism() : base(Resources.OtherFailureMechanism_DisplayName, Resources.OtherFailureMechanism_DisplayCode) {} + public OtherFailureMechanism() : base(Resources.OtherFailureMechanism_DisplayName, Resources.OtherFailureMechanism_Code) {} public override IEnumerable Calculations { Index: Ringtoets/Common/src/Ringtoets.Common.Data/Properties/Resources.Designer.cs =================================================================== diff -u -r41fac7fff0a505c08945108d795dcb877f10b816 -r20bb156dfc129b1602ddbcddc73c0806807f19ab --- Ringtoets/Common/src/Ringtoets.Common.Data/Properties/Resources.Designer.cs (.../Resources.Designer.cs) (revision 41fac7fff0a505c08945108d795dcb877f10b816) +++ Ringtoets/Common/src/Ringtoets.Common.Data/Properties/Resources.Designer.cs (.../Resources.Designer.cs) (revision 20bb156dfc129b1602ddbcddc73c0806807f19ab) @@ -288,11 +288,11 @@ } /// - /// Looks up a localized string similar to NWOoc. + /// Looks up a localized string similar to -. /// - public static string OtherFailureMechanism_DisplayCode { + public static string OtherFailureMechanism_Code { get { - return ResourceManager.GetString("OtherFailureMechanism_DisplayCode", resourceCulture); + return ResourceManager.GetString("OtherFailureMechanism_Code", resourceCulture); } } Index: Ringtoets/Common/src/Ringtoets.Common.Data/Properties/Resources.resx =================================================================== diff -u -r41fac7fff0a505c08945108d795dcb877f10b816 -r20bb156dfc129b1602ddbcddc73c0806807f19ab --- Ringtoets/Common/src/Ringtoets.Common.Data/Properties/Resources.resx (.../Resources.resx) (revision 41fac7fff0a505c08945108d795dcb877f10b816) +++ Ringtoets/Common/src/Ringtoets.Common.Data/Properties/Resources.resx (.../Resources.resx) (revision 20bb156dfc129b1602ddbcddc73c0806807f19ab) @@ -177,8 +177,8 @@ Kan de naam van deze groep niet aanpassen, omdat 'IsNameEditable' op 'false' staat. - - NWOoc + + - Het label van het toetsspoor. Index: Ringtoets/Common/test/Ringtoets.Common.Data.Test/Contribution/FailureMechanismContributionTest.cs =================================================================== diff -u -r06069298b641698f3a5b617dbfa5ace095448de4 -r20bb156dfc129b1602ddbcddc73c0806807f19ab --- Ringtoets/Common/test/Ringtoets.Common.Data.Test/Contribution/FailureMechanismContributionTest.cs (.../FailureMechanismContributionTest.cs) (revision 06069298b641698f3a5b617dbfa5ace095448de4) +++ Ringtoets/Common/test/Ringtoets.Common.Data.Test/Contribution/FailureMechanismContributionTest.cs (.../FailureMechanismContributionTest.cs) (revision 20bb156dfc129b1602ddbcddc73c0806807f19ab) @@ -130,8 +130,10 @@ // Assert Assert.AreEqual(1, result.Distribution.Count()); FailureMechanismContributionItem otherFailureMechanismItem = result.Distribution.ElementAt(0); - Assert.AreEqual(contribution, otherFailureMechanismItem.Contribution); AssertFailureProbabilitySpace(contribution, norm, otherFailureMechanismItem.ProbabilitySpace); + Assert.AreEqual(Resources.OtherFailureMechanism_DisplayName, otherFailureMechanismItem.Assessment); + Assert.AreEqual(Resources.OtherFailureMechanism_Code, otherFailureMechanismItem.AssessmentCode); + Assert.AreEqual(contribution, otherFailureMechanismItem.Contribution); Assert.IsTrue(otherFailureMechanismItem.IsAlwaysRelevant); Assert.IsTrue(otherFailureMechanismItem.IsRelevant); Assert.AreEqual(norm, result.Norm); Index: Ringtoets/Common/test/Ringtoets.Common.Data.Test/Contribution/OtherFailureMechanismTest.cs =================================================================== diff -u -r41fac7fff0a505c08945108d795dcb877f10b816 -r20bb156dfc129b1602ddbcddc73c0806807f19ab --- Ringtoets/Common/test/Ringtoets.Common.Data.Test/Contribution/OtherFailureMechanismTest.cs (.../OtherFailureMechanismTest.cs) (revision 41fac7fff0a505c08945108d795dcb877f10b816) +++ Ringtoets/Common/test/Ringtoets.Common.Data.Test/Contribution/OtherFailureMechanismTest.cs (.../OtherFailureMechanismTest.cs) (revision 20bb156dfc129b1602ddbcddc73c0806807f19ab) @@ -36,7 +36,7 @@ // Assert Assert.AreEqual("Overig", result.Name); - Assert.AreEqual("NWOoc", result.Code); + Assert.AreEqual("-", result.Code); Assert.IsInstanceOf(result); CollectionAssert.IsEmpty(result.Calculations); } Index: Ringtoets/Integration/src/Ringtoets.Integration.Data/AssessmentSection.cs =================================================================== diff -u -r8047e7fd59525ed424105aaefc4ee88b9ae8def6 -r20bb156dfc129b1602ddbcddc73c0806807f19ab --- Ringtoets/Integration/src/Ringtoets.Integration.Data/AssessmentSection.cs (.../AssessmentSection.cs) (revision 8047e7fd59525ed424105aaefc4ee88b9ae8def6) +++ Ringtoets/Integration/src/Ringtoets.Integration.Data/AssessmentSection.cs (.../AssessmentSection.cs) (revision 20bb156dfc129b1602ddbcddc73c0806807f19ab) @@ -56,18 +56,24 @@ PipingFailureMechanism = new PipingFailureMechanism(); GrassCoverErosionInwards = new GrassCoverErosionInwardsFailureMechanism(); - MacrostabilityInwards = new MacroStabilityInwardsFailureMechanism(); + MacrostabilityInwards = new MacrostabilityInwardsFailureMechanism(); + MacrostabilityOutwards = new MacrostabilityOutwardsFailureMechanism(); + Microstability = new MicrostabilityFailureMechanism(); StabilityStoneCover = new StabilityStoneCoverFailureMechanism(); WaveImpactAsphaltCover = new WaveImpactAsphaltCoverFailureMechanism(); + WaterPressureAsphaltCover = new WaterPressureAsphaltCoverFailureMechanism(); GrassCoverErosionOutwards = new GrassCoverErosionOutwardsFailureMechanism(); GrassCoverSlipOffOutwards = new GrassCoverSlipOffOutwardsFailureMechanism(); + GrassCoverSlipOffInwards = new GrassCoverSlipOffInwardsFailureMechanism(); HeightStructures = new HeightStructuresFailureMechanism(); ClosingStructure = new ClosingStructureFailureMechanism(); StrengthStabilityPointConstruction = new StrengthStabilityPointConstructionFailureMechanism(); + StrengthStabilityLengthwiseConstruction = new StrengthStabilityLengthwiseConstructionFailureMechanism(); PipingStructure = new PipingStructureFailureMechanism(); DuneErosion = new DuneErosionFailureMechanism(); + TechnicalInnovation = new TechnicalInnovationFailureMechanism(); - FailureMechanismContribution = new FailureMechanismContribution(GetFailureMechanisms(), 30, 30000); + FailureMechanismContribution = new FailureMechanismContribution(GetContributingFailureMechanisms(), 30, 30000); ChangeComposition(composition); } @@ -84,9 +90,19 @@ /// /// Gets the "Dijken en dammen - Macrostabiliteit binnenwaarts" failure mechanism. /// - public MacroStabilityInwardsFailureMechanism MacrostabilityInwards { get; private set; } + public MacrostabilityInwardsFailureMechanism MacrostabilityInwards { get; private set; } /// + /// Gets the "Dijken en dammen - Macrostabiliteit buitenwaarts" failure mechanism. + /// + public MacrostabilityOutwardsFailureMechanism MacrostabilityOutwards { get; private set; } + + /// + /// Gets the "Dijken en dammen - Microstabiliteit" failure mechanism. + /// + public MicrostabilityFailureMechanism Microstability { get; private set; } + + /// /// Gets the "Dijken en dammen - Stabiliteit steenzetting" failure mechanism. /// public StabilityStoneCoverFailureMechanism StabilityStoneCover { get; private set; } @@ -97,16 +113,26 @@ public WaveImpactAsphaltCoverFailureMechanism WaveImpactAsphaltCover { get; private set; } /// + /// Gets the "Dijken en dammen - Wateroverdruk bij asfaltbekleding" failure mechanism. + /// + public WaterPressureAsphaltCoverFailureMechanism WaterPressureAsphaltCover { get; private set; } + + /// /// Gets the "Dijken en dammen - Grasbekleding erosie buitentalud" failure mechanism. /// public GrassCoverErosionOutwardsFailureMechanism GrassCoverErosionOutwards { get; private set; } /// /// Gets the "Dijken en dammen - Grasbekleding afschuiven buitentalud" failure mechanism. /// - public GrassCoverSlipOffOutwardsFailureMechanism GrassCoverSlipOffOutwards { get; set; } + public GrassCoverSlipOffOutwardsFailureMechanism GrassCoverSlipOffOutwards { get; private set; } /// + /// Gets the "Dijken en dammen - Grasbekleding afschuiven binnentalud" failure mechanism. + /// + public GrassCoverSlipOffInwardsFailureMechanism GrassCoverSlipOffInwards { get; private set; } + + /// /// Gets the "Kunstwerken - Hoogte kunstwerk" failure mechanism. /// public HeightStructuresFailureMechanism HeightStructures { get; private set; } @@ -119,18 +145,28 @@ /// /// Gets the "Kunstwerken - Piping bij kunstwerk" failure mechanism. /// - public PipingStructureFailureMechanism PipingStructure { get; set; } + public PipingStructureFailureMechanism PipingStructure { get; private set; } /// /// Gets the "Kunstwerken - Sterkte en stabiliteit puntconstructies" failure mechanism. /// public StrengthStabilityPointConstructionFailureMechanism StrengthStabilityPointConstruction { get; private set; } /// + /// Gets the "Kunstwerken - Sterkte en stabiliteit langsconstructies" failure mechanism. + /// + public StrengthStabilityLengthwiseConstructionFailureMechanism StrengthStabilityLengthwiseConstruction { get; private set; } + + /// /// Gets the "Duinwaterkering - Duinafslag" failure mechanism. /// public DuneErosionFailureMechanism DuneErosion { get; private set; } + /// + /// Gets the "Technische innovaties - Technische innovaties" failure mechanism. + /// + public TechnicalInnovationFailureMechanism TechnicalInnovation { get; private set; } + public string Name { get; set; } public string Comments { get; set; } @@ -173,17 +209,40 @@ yield return PipingFailureMechanism; yield return GrassCoverErosionInwards; yield return MacrostabilityInwards; + yield return MacrostabilityOutwards; + yield return Microstability; yield return StabilityStoneCover; yield return WaveImpactAsphaltCover; + yield return WaterPressureAsphaltCover; yield return GrassCoverErosionOutwards; yield return GrassCoverSlipOffOutwards; + yield return GrassCoverSlipOffInwards; yield return HeightStructures; yield return ClosingStructure; yield return PipingStructure; yield return StrengthStabilityPointConstruction; + yield return StrengthStabilityLengthwiseConstruction; yield return DuneErosion; + yield return TechnicalInnovation; } + private IEnumerable GetContributingFailureMechanisms() + { + yield return PipingFailureMechanism; + yield return GrassCoverErosionInwards; + yield return MacrostabilityInwards; + yield return StabilityStoneCover; + yield return WaveImpactAsphaltCover; + yield return GrassCoverErosionOutwards; + yield return GrassCoverSlipOffOutwards; + yield return HeightStructures; + yield return ClosingStructure; + yield return PipingStructure; + yield return StrengthStabilityPointConstruction; + yield return DuneErosion; + } + + public void ChangeComposition(AssessmentSectionComposition newComposition) { switch (newComposition) @@ -201,7 +260,7 @@ PipingStructure.Contribution = 2; StrengthStabilityPointConstruction.Contribution = 2; DuneErosion.Contribution = 0; - FailureMechanismContribution.UpdateContributions(GetFailureMechanisms(), 30); + FailureMechanismContribution.UpdateContributions(GetContributingFailureMechanisms(), 30); break; case AssessmentSectionComposition.Dune: PipingFailureMechanism.Contribution = 0; @@ -216,7 +275,7 @@ PipingStructure.Contribution = 0; StrengthStabilityPointConstruction.Contribution = 0; DuneErosion.Contribution = 70; - FailureMechanismContribution.UpdateContributions(GetFailureMechanisms(), 30); + FailureMechanismContribution.UpdateContributions(GetContributingFailureMechanisms(), 30); break; case AssessmentSectionComposition.DikeAndDune: PipingFailureMechanism.Contribution = 24; @@ -231,7 +290,7 @@ PipingStructure.Contribution = 2; StrengthStabilityPointConstruction.Contribution = 2; DuneErosion.Contribution = 10; - FailureMechanismContribution.UpdateContributions(GetFailureMechanisms(), 20); + FailureMechanismContribution.UpdateContributions(GetContributingFailureMechanisms(), 20); break; default: throw new NotImplementedException(); Index: Ringtoets/Integration/src/Ringtoets.Integration.Data/Properties/Resources.Designer.cs =================================================================== diff -u -r213b20e92891887167ab4b031ca4a4b6250a4c2a -r20bb156dfc129b1602ddbcddc73c0806807f19ab --- Ringtoets/Integration/src/Ringtoets.Integration.Data/Properties/Resources.Designer.cs (.../Resources.Designer.cs) (revision 213b20e92891887167ab4b031ca4a4b6250a4c2a) +++ Ringtoets/Integration/src/Ringtoets.Integration.Data/Properties/Resources.Designer.cs (.../Resources.Designer.cs) (revision 20bb156dfc129b1602ddbcddc73c0806807f19ab) @@ -1,7 +1,7 @@ //------------------------------------------------------------------------------ // // This code was generated by a tool. -// Runtime Version:4.0.30319.17929 +// Runtime Version:4.0.30319.34209 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. @@ -133,6 +133,24 @@ } /// + /// Looks up a localized string similar to GABI. + /// + public static string GrassCoverSlipOffInwardsFailureMechanism_Code { + get { + return ResourceManager.GetString("GrassCoverSlipOffInwardsFailureMechanism_Code", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Dijken en dammen - Grasbekleding afschuiven binnentalud. + /// + public static string GrassCoverSlipOffInwardsFailureMechanism_DisplayName { + get { + return ResourceManager.GetString("GrassCoverSlipOffInwardsFailureMechanism_DisplayName", resourceCulture); + } + } + + /// /// Looks up a localized string similar to GABU. /// public static string GrassCoverSlipOffOutwardsFailureMechanism_Code { @@ -178,6 +196,42 @@ } /// + /// Looks up a localized string similar to STBU. + /// + public static string MacrostabilityOutwardFailureMechanism_Code { + get { + return ResourceManager.GetString("MacrostabilityOutwardFailureMechanism_Code", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Dijken en dammen - Macrostabiliteit buitenwaarts. + /// + public static string MacrostabilityOutwardFailureMechanism_DisplayName { + get { + return ResourceManager.GetString("MacrostabilityOutwardFailureMechanism_DisplayName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to STMI. + /// + public static string MicrostabilityFailureMechanism_Code { + get { + return ResourceManager.GetString("MicrostabilityFailureMechanism_Code", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Dijken en dammen - Microstabiliteit. + /// + public static string MicrostabilityFailureMechanism_DisplayName { + get { + return ResourceManager.GetString("MicrostabilityFailureMechanism_DisplayName", resourceCulture); + } + } + + /// /// Looks up a localized string similar to PKW. /// public static string PipingStructureFailureMechanism_Code { @@ -214,6 +268,24 @@ } /// + /// Looks up a localized string similar to STKWl. + /// + public static string StrengthStabilityLengthwiseConstructionFailureMechanism_Code { + get { + return ResourceManager.GetString("StrengthStabilityLengthwiseConstructionFailureMechanism_Code", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Kunstwerken - Sterkte en stabiliteit langsconstructies. + /// + public static string StrengthStabilityLengthwiseConstructionFailureMechanism_DisplayName { + get { + return ResourceManager.GetString("StrengthStabilityLengthwiseConstructionFailureMechanism_DisplayName", resourceCulture); + } + } + + /// /// Looks up a localized string similar to STKWp. /// public static string StrengthStabilityPointConstructionFailureMechanism_Code { @@ -232,6 +304,42 @@ } /// + /// Looks up a localized string similar to INN. + /// + public static string TechnicalInnovationFailureMechanismFailureMechanism_Code { + get { + return ResourceManager.GetString("TechnicalInnovationFailureMechanismFailureMechanism_Code", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Technische innovaties - Technische innovaties. + /// + public static string TechnicalInnovationFailureMechanismFailureMechanism_DisplayName { + get { + return ResourceManager.GetString("TechnicalInnovationFailureMechanismFailureMechanism_DisplayName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to AWO. + /// + public static string WaterPressureAsphaltCoverFailureMechanism_Code { + get { + return ResourceManager.GetString("WaterPressureAsphaltCoverFailureMechanism_Code", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Dijken en dammen - Wateroverdruk bij asfaltbekleding. + /// + public static string WaterPressureAsphaltCoverFailureMechanism_DisplayName { + get { + return ResourceManager.GetString("WaterPressureAsphaltCoverFailureMechanism_DisplayName", resourceCulture); + } + } + + /// /// Looks up a localized string similar to AGK. /// public static string WaveImpactAsphaltCoverFailureMechanism_Code { Index: Ringtoets/Integration/src/Ringtoets.Integration.Data/Properties/Resources.resx =================================================================== diff -u -r213b20e92891887167ab4b031ca4a4b6250a4c2a -r20bb156dfc129b1602ddbcddc73c0806807f19ab --- Ringtoets/Integration/src/Ringtoets.Integration.Data/Properties/Resources.resx (.../Resources.resx) (revision 213b20e92891887167ab4b031ca4a4b6250a4c2a) +++ Ringtoets/Integration/src/Ringtoets.Integration.Data/Properties/Resources.resx (.../Resources.resx) (revision 20bb156dfc129b1602ddbcddc73c0806807f19ab) @@ -180,4 +180,40 @@ DA + + GABI + + + Dijken en dammen - Grasbekleding afschuiven binnentalud + + + STBU + + + Dijken en dammen - Macrostabiliteit buitenwaarts + + + STMI + + + Dijken en dammen - Microstabiliteit + + + STKWl + + + Kunstwerken - Sterkte en stabiliteit langsconstructies + + + INN + + + Technische innovaties - Technische innovaties + + + AWO + + + Dijken en dammen - Wateroverdruk bij asfaltbekleding + \ No newline at end of file Index: Ringtoets/Integration/src/Ringtoets.Integration.Data/Ringtoets.Integration.Data.csproj =================================================================== diff -u -r41fac7fff0a505c08945108d795dcb877f10b816 -r20bb156dfc129b1602ddbcddc73c0806807f19ab --- Ringtoets/Integration/src/Ringtoets.Integration.Data/Ringtoets.Integration.Data.csproj (.../Ringtoets.Integration.Data.csproj) (revision 41fac7fff0a505c08945108d795dcb877f10b816) +++ Ringtoets/Integration/src/Ringtoets.Integration.Data/Ringtoets.Integration.Data.csproj (.../Ringtoets.Integration.Data.csproj) (revision 20bb156dfc129b1602ddbcddc73c0806807f19ab) @@ -41,6 +41,12 @@ Properties\GlobalAssembly.cs + + + + + + Index: Ringtoets/Integration/src/Ringtoets.Integration.Data/StandAlone/GrassCoverSlipOffInwardsFailureMechanism.cs =================================================================== diff -u --- Ringtoets/Integration/src/Ringtoets.Integration.Data/StandAlone/GrassCoverSlipOffInwardsFailureMechanism.cs (revision 0) +++ Ringtoets/Integration/src/Ringtoets.Integration.Data/StandAlone/GrassCoverSlipOffInwardsFailureMechanism.cs (revision 20bb156dfc129b1602ddbcddc73c0806807f19ab) @@ -0,0 +1,75 @@ +// 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 Ringtoets.Common.Data.Calculation; +using Ringtoets.Common.Data.FailureMechanism; +using Ringtoets.Integration.Data.Properties; +using RingtoetsCommonDataResources = Ringtoets.Common.Data.Properties.Resources; + +namespace Ringtoets.Integration.Data.StandAlone +{ + /// + /// Defines a stand alone failure mechanisms objects + /// + public class GrassCoverSlipOffInwardsFailureMechanism : FailureMechanismBase, IHasSectionResults + { + private readonly IList sectionResults; + + /// + /// Initializes a new instance of the class. + /// + public GrassCoverSlipOffInwardsFailureMechanism() + : base(Resources.GrassCoverSlipOffInwardsFailureMechanism_DisplayName, Resources.GrassCoverSlipOffInwardsFailureMechanism_Code) + { + sectionResults = new List(); + } + + public override IEnumerable Calculations + { + get + { + yield break; + } + } + + public override void AddSection(FailureMechanismSection section) + { + base.AddSection(section); + + sectionResults.Add(new SimpleFailureMechanismSectionResult(section)); + } + + public override void ClearAllSections() + { + base.ClearAllSections(); + sectionResults.Clear(); + } + + public IEnumerable SectionResults + { + get + { + return sectionResults; + } + } + } +} \ No newline at end of file Index: Ringtoets/Integration/src/Ringtoets.Integration.Data/StandAlone/MacroStabilityInwardsFailureMechanism.cs =================================================================== diff -u -r41fac7fff0a505c08945108d795dcb877f10b816 -r20bb156dfc129b1602ddbcddc73c0806807f19ab --- Ringtoets/Integration/src/Ringtoets.Integration.Data/StandAlone/MacroStabilityInwardsFailureMechanism.cs (.../MacroStabilityInwardsFailureMechanism.cs) (revision 41fac7fff0a505c08945108d795dcb877f10b816) +++ Ringtoets/Integration/src/Ringtoets.Integration.Data/StandAlone/MacroStabilityInwardsFailureMechanism.cs (.../MacroStabilityInwardsFailureMechanism.cs) (revision 20bb156dfc129b1602ddbcddc73c0806807f19ab) @@ -30,14 +30,14 @@ /// /// Defines a stand alone failure mechanisms objects /// - public class MacroStabilityInwardsFailureMechanism : FailureMechanismBase, IHasSectionResults + public class MacrostabilityInwardsFailureMechanism : FailureMechanismBase, IHasSectionResults { private readonly IList sectionResults; /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// - public MacroStabilityInwardsFailureMechanism() + public MacrostabilityInwardsFailureMechanism() : base(Resources.MacrostabilityInwardFailureMechanism_DisplayName, Resources.MacrostabilityInwardFailureMechanism_Code) { sectionResults = new List(); Index: Ringtoets/Integration/src/Ringtoets.Integration.Data/StandAlone/MacrostabilityOutwardsFailureMechanism.cs =================================================================== diff -u --- Ringtoets/Integration/src/Ringtoets.Integration.Data/StandAlone/MacrostabilityOutwardsFailureMechanism.cs (revision 0) +++ Ringtoets/Integration/src/Ringtoets.Integration.Data/StandAlone/MacrostabilityOutwardsFailureMechanism.cs (revision 20bb156dfc129b1602ddbcddc73c0806807f19ab) @@ -0,0 +1,75 @@ +// 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 Ringtoets.Common.Data.Calculation; +using Ringtoets.Common.Data.FailureMechanism; +using Ringtoets.Integration.Data.Properties; +using RingtoetsCommonDataResources = Ringtoets.Common.Data.Properties.Resources; + +namespace Ringtoets.Integration.Data.StandAlone +{ + /// + /// Defines a stand alone failure mechanisms objects + /// + public class MacrostabilityOutwardsFailureMechanism : FailureMechanismBase, IHasSectionResults + { + private readonly IList sectionResults; + + /// + /// Initializes a new instance of the class. + /// + public MacrostabilityOutwardsFailureMechanism() + : base(Resources.MacrostabilityOutwardFailureMechanism_DisplayName, Resources.MacrostabilityOutwardFailureMechanism_Code) + { + sectionResults = new List(); + } + + public override IEnumerable Calculations + { + get + { + yield break; + } + } + + public override void AddSection(FailureMechanismSection section) + { + base.AddSection(section); + + sectionResults.Add(new CustomFailureMechanismSectionResult(section)); + } + + public override void ClearAllSections() + { + base.ClearAllSections(); + sectionResults.Clear(); + } + + public IEnumerable SectionResults + { + get + { + return sectionResults; + } + } + } +} \ No newline at end of file Index: Ringtoets/Integration/src/Ringtoets.Integration.Data/StandAlone/MicrostabilityFailureMechanism.cs =================================================================== diff -u --- Ringtoets/Integration/src/Ringtoets.Integration.Data/StandAlone/MicrostabilityFailureMechanism.cs (revision 0) +++ Ringtoets/Integration/src/Ringtoets.Integration.Data/StandAlone/MicrostabilityFailureMechanism.cs (revision 20bb156dfc129b1602ddbcddc73c0806807f19ab) @@ -0,0 +1,75 @@ +// 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 Ringtoets.Common.Data.Calculation; +using Ringtoets.Common.Data.FailureMechanism; +using Ringtoets.Integration.Data.Properties; +using RingtoetsCommonDataResources = Ringtoets.Common.Data.Properties.Resources; + +namespace Ringtoets.Integration.Data.StandAlone +{ + /// + /// Defines a stand alone failure mechanisms objects + /// + public class MicrostabilityFailureMechanism : FailureMechanismBase, IHasSectionResults + { + private readonly IList sectionResults; + + /// + /// Initializes a new instance of the class. + /// + public MicrostabilityFailureMechanism() + : base(Resources.MicrostabilityFailureMechanism_DisplayName, Resources.MicrostabilityFailureMechanism_Code) + { + sectionResults = new List(); + } + + public override IEnumerable Calculations + { + get + { + yield break; + } + } + + public override void AddSection(FailureMechanismSection section) + { + base.AddSection(section); + + sectionResults.Add(new SimpleFailureMechanismSectionResult(section)); + } + + public override void ClearAllSections() + { + base.ClearAllSections(); + sectionResults.Clear(); + } + + public IEnumerable SectionResults + { + get + { + return sectionResults; + } + } + } +} \ No newline at end of file Index: Ringtoets/Integration/src/Ringtoets.Integration.Data/StandAlone/StrengthStabilityLengthwiseConstructionFailureMechanism.cs =================================================================== diff -u --- Ringtoets/Integration/src/Ringtoets.Integration.Data/StandAlone/StrengthStabilityLengthwiseConstructionFailureMechanism.cs (revision 0) +++ Ringtoets/Integration/src/Ringtoets.Integration.Data/StandAlone/StrengthStabilityLengthwiseConstructionFailureMechanism.cs (revision 20bb156dfc129b1602ddbcddc73c0806807f19ab) @@ -0,0 +1,75 @@ +// 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 Ringtoets.Common.Data.Calculation; +using Ringtoets.Common.Data.FailureMechanism; +using Ringtoets.Integration.Data.Properties; +using RingtoetsCommonDataResources = Ringtoets.Common.Data.Properties.Resources; + +namespace Ringtoets.Integration.Data.StandAlone +{ + /// + /// Defines a stand alone failure mechanisms objects + /// + public class StrengthStabilityLengthwiseConstructionFailureMechanism : FailureMechanismBase, IHasSectionResults + { + private readonly IList sectionResults; + + /// + /// Initializes a new instance of the class. + /// + public StrengthStabilityLengthwiseConstructionFailureMechanism() + : base(Resources.StrengthStabilityLengthwiseConstructionFailureMechanism_DisplayName, Resources.StrengthStabilityLengthwiseConstructionFailureMechanism_Code) + { + sectionResults = new List(); + } + + public override IEnumerable Calculations + { + get + { + yield break; + } + } + + public override void AddSection(FailureMechanismSection section) + { + base.AddSection(section); + + sectionResults.Add(new CustomFailureMechanismSectionResult(section)); + } + + public override void ClearAllSections() + { + base.ClearAllSections(); + sectionResults.Clear(); + } + + public IEnumerable SectionResults + { + get + { + return sectionResults; + } + } + } +} \ No newline at end of file Index: Ringtoets/Integration/src/Ringtoets.Integration.Data/StandAlone/TechnicalInnovationFailureMechanism.cs =================================================================== diff -u --- Ringtoets/Integration/src/Ringtoets.Integration.Data/StandAlone/TechnicalInnovationFailureMechanism.cs (revision 0) +++ Ringtoets/Integration/src/Ringtoets.Integration.Data/StandAlone/TechnicalInnovationFailureMechanism.cs (revision 20bb156dfc129b1602ddbcddc73c0806807f19ab) @@ -0,0 +1,75 @@ +// 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 Ringtoets.Common.Data.Calculation; +using Ringtoets.Common.Data.FailureMechanism; +using Ringtoets.Integration.Data.Properties; +using RingtoetsCommonDataResources = Ringtoets.Common.Data.Properties.Resources; + +namespace Ringtoets.Integration.Data.StandAlone +{ + /// + /// Defines a stand alone failure mechanisms objects + /// + public class TechnicalInnovationFailureMechanism : FailureMechanismBase, IHasSectionResults + { + private readonly IList sectionResults; + + /// + /// Initializes a new instance of the class. + /// + public TechnicalInnovationFailureMechanism() + : base(Resources.TechnicalInnovationFailureMechanismFailureMechanism_DisplayName, Resources.TechnicalInnovationFailureMechanismFailureMechanism_Code) + { + sectionResults = new List(); + } + + public override IEnumerable Calculations + { + get + { + yield break; + } + } + + public override void AddSection(FailureMechanismSection section) + { + base.AddSection(section); + + sectionResults.Add(new SimpleFailureMechanismSectionResult(section)); + } + + public override void ClearAllSections() + { + base.ClearAllSections(); + sectionResults.Clear(); + } + + public IEnumerable SectionResults + { + get + { + return sectionResults; + } + } + } +} \ No newline at end of file Index: Ringtoets/Integration/src/Ringtoets.Integration.Data/StandAlone/WaterPressureAsphaltCoverFailureMechanism.cs =================================================================== diff -u --- Ringtoets/Integration/src/Ringtoets.Integration.Data/StandAlone/WaterPressureAsphaltCoverFailureMechanism.cs (revision 0) +++ Ringtoets/Integration/src/Ringtoets.Integration.Data/StandAlone/WaterPressureAsphaltCoverFailureMechanism.cs (revision 20bb156dfc129b1602ddbcddc73c0806807f19ab) @@ -0,0 +1,75 @@ +// 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 Ringtoets.Common.Data.Calculation; +using Ringtoets.Common.Data.FailureMechanism; +using Ringtoets.Integration.Data.Properties; +using RingtoetsCommonDataResources = Ringtoets.Common.Data.Properties.Resources; + +namespace Ringtoets.Integration.Data.StandAlone +{ + /// + /// Defines a stand alone failure mechanisms objects + /// + public class WaterPressureAsphaltCoverFailureMechanism : FailureMechanismBase, IHasSectionResults + { + private readonly IList sectionResults; + + /// + /// Initializes a new instance of the class. + /// + public WaterPressureAsphaltCoverFailureMechanism() + : base(Resources.WaterPressureAsphaltCoverFailureMechanism_DisplayName, Resources.WaterPressureAsphaltCoverFailureMechanism_Code) + { + sectionResults = new List(); + } + + public override IEnumerable Calculations + { + get + { + yield break; + } + } + + public override void AddSection(FailureMechanismSection section) + { + base.AddSection(section); + + sectionResults.Add(new CustomFailureMechanismSectionResult(section)); + } + + public override void ClearAllSections() + { + base.ClearAllSections(); + sectionResults.Clear(); + } + + public IEnumerable SectionResults + { + get + { + return sectionResults; + } + } + } +} \ No newline at end of file Index: Ringtoets/Integration/src/Ringtoets.Integration.Forms/PresentationObjects/CustomFailureMechanismContext.cs =================================================================== diff -u -r41fac7fff0a505c08945108d795dcb877f10b816 -r20bb156dfc129b1602ddbcddc73c0806807f19ab --- Ringtoets/Integration/src/Ringtoets.Integration.Forms/PresentationObjects/CustomFailureMechanismContext.cs (.../CustomFailureMechanismContext.cs) (revision 41fac7fff0a505c08945108d795dcb877f10b816) +++ Ringtoets/Integration/src/Ringtoets.Integration.Forms/PresentationObjects/CustomFailureMechanismContext.cs (.../CustomFailureMechanismContext.cs) (revision 20bb156dfc129b1602ddbcddc73c0806807f19ab) @@ -23,22 +23,22 @@ using Ringtoets.Common.Data.AssessmentSection; using Ringtoets.Common.Data.FailureMechanism; using Ringtoets.Common.Forms.PresentationObjects; -using Ringtoets.Integration.Data.StandAlone; namespace Ringtoets.Integration.Forms.PresentationObjects { /// - /// This class is a presentation object for an instance of . + /// This class is a presentation object for an instance of , + /// which has . /// public class CustomFailureMechanismContext : FailureMechanismContext { /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// /// The failure mechanism. /// The parent of . /// Thrown when or are null. - public CustomFailureMechanismContext(FailureMechanismBase wrappedFailureMechanism, IAssessmentSection parent) : + public CustomFailureMechanismContext(IFailureMechanism wrappedFailureMechanism, IAssessmentSection parent) : base(wrappedFailureMechanism, parent) { Index: Ringtoets/Integration/src/Ringtoets.Integration.Forms/PresentationObjects/SimpleFailureMechanismContext.cs =================================================================== diff -u -r209bfd7b71ef53a57e1a52337f1333d38122282f -r20bb156dfc129b1602ddbcddc73c0806807f19ab --- Ringtoets/Integration/src/Ringtoets.Integration.Forms/PresentationObjects/SimpleFailureMechanismContext.cs (.../SimpleFailureMechanismContext.cs) (revision 209bfd7b71ef53a57e1a52337f1333d38122282f) +++ Ringtoets/Integration/src/Ringtoets.Integration.Forms/PresentationObjects/SimpleFailureMechanismContext.cs (.../SimpleFailureMechanismContext.cs) (revision 20bb156dfc129b1602ddbcddc73c0806807f19ab) @@ -23,12 +23,12 @@ using Ringtoets.Common.Data.AssessmentSection; using Ringtoets.Common.Data.FailureMechanism; using Ringtoets.Common.Forms.PresentationObjects; -using Ringtoets.Integration.Data.StandAlone; namespace Ringtoets.Integration.Forms.PresentationObjects { /// - /// This class is a presentation object for an instance of . + /// This class is a presentation object for an instance of , + /// which has . /// public class SimpleFailureMechanismContext : FailureMechanismContext { Index: Ringtoets/Integration/src/Ringtoets.Integration.Plugin/RingtoetsGuiPlugin.cs =================================================================== diff -u -r261bbc6b1f16b951a12123626a914fe764ac31d0 -r20bb156dfc129b1602ddbcddc73c0806807f19ab --- Ringtoets/Integration/src/Ringtoets.Integration.Plugin/RingtoetsGuiPlugin.cs (.../RingtoetsGuiPlugin.cs) (revision 261bbc6b1f16b951a12123626a914fe764ac31d0) +++ Ringtoets/Integration/src/Ringtoets.Integration.Plugin/RingtoetsGuiPlugin.cs (.../RingtoetsGuiPlugin.cs) (revision 20bb156dfc129b1602ddbcddc73c0806807f19ab) @@ -53,6 +53,7 @@ using Ringtoets.HydraRing.Calculation.Data.Output; using Ringtoets.HydraRing.Data; using Ringtoets.HydraRing.IO; +using Ringtoets.Integration.Data; using Ringtoets.Integration.Data.StandAlone; using Ringtoets.Integration.Forms.PresentationObjects; using Ringtoets.Integration.Forms.PropertyClasses; @@ -455,58 +456,15 @@ { foreach (IFailureMechanism failureMechanism in nodeData.GetFailureMechanisms()) { - var closingStructureFailureMechanism = failureMechanism as ClosingStructureFailureMechanism; - var duneErosionFailureMechanism = failureMechanism as DuneErosionFailureMechanism; - var grassCoverErosionOutwardsFailureMechanism = failureMechanism as GrassCoverErosionOutwardsFailureMechanism; - var grassCoverSlipOffOutwardsFailureMechanism = failureMechanism as GrassCoverSlipOffOutwardsFailureMechanism; - var macroStabilityInwardsFailureMechanism = failureMechanism as MacroStabilityInwardsFailureMechanism; - var pipingStructureFailureMechanism = failureMechanism as PipingStructureFailureMechanism; - var stabilityStoneCoverFailureMechanism = failureMechanism as StabilityStoneCoverFailureMechanism; - var strengthStabilityPointConstructionFailureMechanism = failureMechanism as StrengthStabilityPointConstructionFailureMechanism; - var waveImpactAsphaltCoverFailureMechanism = failureMechanism as WaveImpactAsphaltCoverFailureMechanism; - var piping = failureMechanism as PipingFailureMechanism; var grassCoverErosionInwards = failureMechanism as GrassCoverErosionInwardsFailureMechanism; var heightStructuresFailureMechanism = failureMechanism as HeightStructuresFailureMechanism; - if (closingStructureFailureMechanism != null) + var customFailureMechanism = failureMechanism as IHasSectionResults; + var simpleFailureMechanism = failureMechanism as IHasSectionResults; + + if (piping != null) { - yield return new CustomFailureMechanismContext(closingStructureFailureMechanism, nodeData); - } - else if (duneErosionFailureMechanism != null) - { - yield return new SimpleFailureMechanismContext(duneErosionFailureMechanism, nodeData); - } - else if (grassCoverErosionOutwardsFailureMechanism != null) - { - yield return new SimpleFailureMechanismContext(grassCoverErosionOutwardsFailureMechanism, nodeData); - } - else if (grassCoverSlipOffOutwardsFailureMechanism != null) - { - yield return new SimpleFailureMechanismContext(grassCoverSlipOffOutwardsFailureMechanism, nodeData); - } - else if (macroStabilityInwardsFailureMechanism != null) - { - yield return new CustomFailureMechanismContext(macroStabilityInwardsFailureMechanism, nodeData); - } - else if (pipingStructureFailureMechanism != null) - { - yield return new SimpleFailureMechanismContext(pipingStructureFailureMechanism, nodeData); - } - else if (stabilityStoneCoverFailureMechanism != null) - { - yield return new CustomFailureMechanismContext(stabilityStoneCoverFailureMechanism, nodeData); - } - else if (strengthStabilityPointConstructionFailureMechanism != null) - { - yield return new CustomFailureMechanismContext(strengthStabilityPointConstructionFailureMechanism, nodeData); - } - else if (waveImpactAsphaltCoverFailureMechanism != null) - { - yield return new CustomFailureMechanismContext(waveImpactAsphaltCoverFailureMechanism, nodeData); - } - else if (piping != null) - { yield return new PipingFailureMechanismContext(piping, nodeData); } else if (grassCoverErosionInwards != null) @@ -517,6 +475,14 @@ { yield return new HeightStructuresFailureMechanismContext(heightStructuresFailureMechanism, nodeData); } + else if (customFailureMechanism != null) + { + yield return new CustomFailureMechanismContext(customFailureMechanism as IFailureMechanism, nodeData); + } + else if (simpleFailureMechanism != null) + { + yield return new SimpleFailureMechanismContext(simpleFailureMechanism as IFailureMechanism, nodeData); + } else { throw new NotImplementedException(); Index: Ringtoets/Integration/test/Ringtoets.Integration.Data.Test/AssessmentSectionTest.cs =================================================================== diff -u -r213b20e92891887167ab4b031ca4a4b6250a4c2a -r20bb156dfc129b1602ddbcddc73c0806807f19ab --- Ringtoets/Integration/test/Ringtoets.Integration.Data.Test/AssessmentSectionTest.cs (.../AssessmentSectionTest.cs) (revision 213b20e92891887167ab4b031ca4a4b6250a4c2a) +++ Ringtoets/Integration/test/Ringtoets.Integration.Data.Test/AssessmentSectionTest.cs (.../AssessmentSectionTest.cs) (revision 20bb156dfc129b1602ddbcddc73c0806807f19ab) @@ -27,7 +27,9 @@ using Ringtoets.Common.Data; using Ringtoets.Common.Data.AssessmentSection; using Ringtoets.Common.Data.Contribution; +using Ringtoets.Common.Data.FailureMechanism; using Ringtoets.GrassCoverErosionInwards.Data; +using Ringtoets.Integration.Data.StandAlone; using Ringtoets.Piping.Data; using RingtoetsIntegrationResources = Ringtoets.Integration.Data.Properties.Resources; @@ -71,7 +73,7 @@ var pipingStructureCode = "PKW"; var strengthStabilityPointConstructionCode = "STKWp"; var duneErosionCode = "DA"; - var otherCode = "NWOoc"; + var otherCode = "-"; var names = new[] { @@ -121,18 +123,24 @@ CollectionAssert.IsEmpty(section.PipingFailureMechanism.StochasticSoilModels); CollectionAssert.IsEmpty(section.PipingFailureMechanism.SurfaceLines); - Assert.IsInstanceOf(section.PipingFailureMechanism); - Assert.IsInstanceOf(section.GrassCoverErosionInwards); - Assert.AreEqual(macrostabilityInwardName, section.MacrostabilityInwards.Name); - Assert.AreEqual(stoneRevetmentName, section.StabilityStoneCover.Name); - Assert.AreEqual(waveImpactAsphaltName, section.WaveImpactAsphaltCover.Name); - Assert.AreEqual(grassCoverErosionOutwardsName, section.GrassCoverErosionOutwards.Name); - Assert.AreEqual(grassCoverSlipOffOutsideName, section.GrassCoverSlipOffOutwards.Name); - Assert.AreEqual(heightStructureName, section.HeightStructures.Name); - Assert.AreEqual(closingStructureName, section.ClosingStructure.Name); - Assert.AreEqual(pipingStructureName, section.PipingStructure.Name); - Assert.AreEqual(strengthStabilityPointConstructionName, section.StrengthStabilityPointConstruction.Name); - Assert.AreEqual(duneErosionName, section.DuneErosion.Name); + Assert.NotNull(section.PipingFailureMechanism); + Assert.NotNull(section.GrassCoverErosionInwards); + Assert.NotNull(section.MacrostabilityInwards); + Assert.NotNull(section.MacrostabilityOutwards); + Assert.NotNull(section.Microstability); + Assert.NotNull(section.StabilityStoneCover); + Assert.NotNull(section.WaveImpactAsphaltCover); + Assert.NotNull(section.WaterPressureAsphaltCover); + Assert.NotNull(section.GrassCoverErosionOutwards); + Assert.NotNull(section.GrassCoverSlipOffOutwards); + Assert.NotNull(section.GrassCoverSlipOffInwards); + Assert.NotNull(section.HeightStructures); + Assert.NotNull(section.ClosingStructure); + Assert.NotNull(section.PipingStructure); + Assert.NotNull(section.StrengthStabilityPointConstruction); + Assert.NotNull(section.StrengthStabilityLengthwiseConstruction); + Assert.NotNull(section.DuneErosion); + Assert.NotNull(section.TechnicalInnovation); AssertExpectedContributions(composition, section); @@ -187,19 +195,28 @@ var failureMechanisms = assessmentSection.GetFailureMechanisms().ToArray(); // Assert - Assert.AreEqual(12, failureMechanisms.Length); - Assert.AreSame(assessmentSection.PipingFailureMechanism, failureMechanisms[0]); - Assert.AreSame(assessmentSection.GrassCoverErosionInwards, failureMechanisms[1]); - Assert.AreSame(assessmentSection.MacrostabilityInwards, failureMechanisms[2]); - Assert.AreSame(assessmentSection.StabilityStoneCover, failureMechanisms[3]); - Assert.AreSame(assessmentSection.WaveImpactAsphaltCover, failureMechanisms[4]); - Assert.AreSame(assessmentSection.GrassCoverErosionOutwards, failureMechanisms[5]); - Assert.AreSame(assessmentSection.GrassCoverSlipOffOutwards, failureMechanisms[6]); - Assert.AreSame(assessmentSection.HeightStructures, failureMechanisms[7]); - Assert.AreSame(assessmentSection.ClosingStructure, failureMechanisms[8]); - Assert.AreSame(assessmentSection.PipingStructure, failureMechanisms[9]); - Assert.AreSame(assessmentSection.StrengthStabilityPointConstruction, failureMechanisms[10]); - Assert.AreSame(assessmentSection.DuneErosion, failureMechanisms[11]); + Assert.AreEqual(18, failureMechanisms.Length); + CollectionAssert.AreEqual(new IFailureMechanism[] + { + assessmentSection.PipingFailureMechanism, + assessmentSection.GrassCoverErosionInwards, + assessmentSection.MacrostabilityInwards, + assessmentSection.MacrostabilityOutwards, + assessmentSection.Microstability, + assessmentSection.StabilityStoneCover, + assessmentSection.WaveImpactAsphaltCover, + assessmentSection.WaterPressureAsphaltCover, + assessmentSection.GrassCoverErosionOutwards, + assessmentSection.GrassCoverSlipOffOutwards, + assessmentSection.GrassCoverSlipOffInwards, + assessmentSection.HeightStructures, + assessmentSection.ClosingStructure, + assessmentSection.PipingStructure, + assessmentSection.StrengthStabilityPointConstruction, + assessmentSection.StrengthStabilityLengthwiseConstruction, + assessmentSection.DuneErosion, + assessmentSection.TechnicalInnovation + }, failureMechanisms); } [Test] @@ -217,7 +234,7 @@ var contribution = assessmentSection.FailureMechanismContribution.Distribution.ToArray(); // Assert - var failureMechanisms = assessmentSection.GetFailureMechanisms().ToArray(); + var failureMechanisms = GetExpectedContributingFailureMechanisms(assessmentSection); Assert.AreEqual(13, contribution.Length); @@ -237,6 +254,25 @@ Assert.AreEqual(expectedNorm, otherContributionItem.ProbabilitySpace); } + private IFailureMechanism[] GetExpectedContributingFailureMechanisms(AssessmentSection section) + { + return new IFailureMechanism[] + { + section.PipingFailureMechanism, + section.GrassCoverErosionInwards, + section.MacrostabilityInwards, + section.StabilityStoneCover, + section.WaveImpactAsphaltCover, + section.GrassCoverErosionOutwards, + section.GrassCoverSlipOffOutwards, + section.HeightStructures, + section.ClosingStructure, + section.PipingStructure, + section.StrengthStabilityPointConstruction, + section.DuneErosion, + }; + } + [Test] [TestCase(AssessmentSectionComposition.Dike)] [TestCase(AssessmentSectionComposition.Dune)] Index: Ringtoets/Integration/test/Ringtoets.Integration.Data.Test/Ringtoets.Integration.Data.Test.csproj =================================================================== diff -u -r213b20e92891887167ab4b031ca4a4b6250a4c2a -r20bb156dfc129b1602ddbcddc73c0806807f19ab --- Ringtoets/Integration/test/Ringtoets.Integration.Data.Test/Ringtoets.Integration.Data.Test.csproj (.../Ringtoets.Integration.Data.Test.csproj) (revision 213b20e92891887167ab4b031ca4a4b6250a4c2a) +++ Ringtoets/Integration/test/Ringtoets.Integration.Data.Test/Ringtoets.Integration.Data.Test.csproj (.../Ringtoets.Integration.Data.Test.csproj) (revision 20bb156dfc129b1602ddbcddc73c0806807f19ab) @@ -54,14 +54,20 @@ + + + + + + - + - + Index: Ringtoets/Integration/test/Ringtoets.Integration.Data.Test/StandAlone/GrassCoverSlipOffInwardsFailureMechanismTest.cs =================================================================== diff -u --- Ringtoets/Integration/test/Ringtoets.Integration.Data.Test/StandAlone/GrassCoverSlipOffInwardsFailureMechanismTest.cs (revision 0) +++ Ringtoets/Integration/test/Ringtoets.Integration.Data.Test/StandAlone/GrassCoverSlipOffInwardsFailureMechanismTest.cs (revision 20bb156dfc129b1602ddbcddc73c0806807f19ab) @@ -0,0 +1,63 @@ +// 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.Linq; +using Core.Common.Base.Geometry; +using NUnit.Framework; +using Ringtoets.Common.Data.FailureMechanism; +using Ringtoets.Integration.Data.StandAlone; + +namespace Ringtoets.Integration.Data.Test.StandAlone +{ + [TestFixture] + public class GrassCoverSlipOffInwardsFailureMechanismTest + { + [Test] + public void DefaultConstructor_Always_PropertiesSet() + { + // Call + var failureMechanism = new GrassCoverSlipOffInwardsFailureMechanism(); + + // Assert + Assert.IsInstanceOf(failureMechanism); + Assert.AreEqual("Dijken en dammen - Grasbekleding afschuiven binnentalud", failureMechanism.Name); + Assert.AreEqual("GABI", failureMechanism.Code); + CollectionAssert.IsEmpty(failureMechanism.Sections); + } + + [Test] + public void AddSection_WithSection_AddedCustomFailureMechanismResult() + { + // Setup + var failureMechanism = new GrassCoverSlipOffInwardsFailureMechanism(); + + // Call + failureMechanism.AddSection(new FailureMechanismSection("", new[] + { + new Point2D(2, 1) + })); + + // Assert + Assert.AreEqual(1, failureMechanism.SectionResults.Count()); + Assert.IsInstanceOf(failureMechanism.SectionResults.ElementAt(0)); + } + } +} \ No newline at end of file Fisheye: Tag 20bb156dfc129b1602ddbcddc73c0806807f19ab refers to a dead (removed) revision in file `Ringtoets/Integration/test/Ringtoets.Integration.Data.Test/StandAlone/MacroStabilityInwardsFailureMechanismTest.cs'. Fisheye: No comparison available. Pass `N' to diff? Index: Ringtoets/Integration/test/Ringtoets.Integration.Data.Test/StandAlone/MacrostabilityInwardsFailureMechanismTest.cs =================================================================== diff -u --- Ringtoets/Integration/test/Ringtoets.Integration.Data.Test/StandAlone/MacrostabilityInwardsFailureMechanismTest.cs (revision 0) +++ Ringtoets/Integration/test/Ringtoets.Integration.Data.Test/StandAlone/MacrostabilityInwardsFailureMechanismTest.cs (revision 20bb156dfc129b1602ddbcddc73c0806807f19ab) @@ -0,0 +1,63 @@ +// 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.Linq; +using Core.Common.Base.Geometry; +using NUnit.Framework; +using Ringtoets.Common.Data.FailureMechanism; +using Ringtoets.Integration.Data.StandAlone; + +namespace Ringtoets.Integration.Data.Test.StandAlone +{ + [TestFixture] + public class MacrostabilityInwardsFailureMechanismTest + { + [Test] + public void DefaultConstructor_Always_PropertiesSet() + { + // Call + var failureMechanism = new MacrostabilityInwardsFailureMechanism(); + + // Assert + Assert.IsInstanceOf(failureMechanism); + Assert.AreEqual("Dijken en dammen - Macrostabiliteit binnenwaarts", failureMechanism.Name); + Assert.AreEqual("STBI", failureMechanism.Code); + CollectionAssert.IsEmpty(failureMechanism.Sections); + } + + [Test] + public void AddSection_WithSection_AddedCustomFailureMechanismResult() + { + // Setup + var failureMechanism = new MacrostabilityInwardsFailureMechanism(); + + // Call + failureMechanism.AddSection(new FailureMechanismSection("", new[] + { + new Point2D(2, 1) + })); + + // Assert + Assert.AreEqual(1, failureMechanism.SectionResults.Count()); + Assert.IsInstanceOf(failureMechanism.SectionResults.ElementAt(0)); + } + } +} \ No newline at end of file Index: Ringtoets/Integration/test/Ringtoets.Integration.Data.Test/StandAlone/MacrostabilityOutwardsFailureMechanismTest.cs =================================================================== diff -u --- Ringtoets/Integration/test/Ringtoets.Integration.Data.Test/StandAlone/MacrostabilityOutwardsFailureMechanismTest.cs (revision 0) +++ Ringtoets/Integration/test/Ringtoets.Integration.Data.Test/StandAlone/MacrostabilityOutwardsFailureMechanismTest.cs (revision 20bb156dfc129b1602ddbcddc73c0806807f19ab) @@ -0,0 +1,63 @@ +// 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.Linq; +using Core.Common.Base.Geometry; +using NUnit.Framework; +using Ringtoets.Common.Data.FailureMechanism; +using Ringtoets.Integration.Data.StandAlone; + +namespace Ringtoets.Integration.Data.Test.StandAlone +{ + [TestFixture] + public class MacrostabilityOutwardsFailureMechanismTest + { + [Test] + public void DefaultConstructor_Always_PropertiesSet() + { + // Call + var failureMechanism = new MacrostabilityOutwardsFailureMechanism(); + + // Assert + Assert.IsInstanceOf(failureMechanism); + Assert.AreEqual("Dijken en dammen - Macrostabiliteit buitenwaarts", failureMechanism.Name); + Assert.AreEqual("STBU", failureMechanism.Code); + CollectionAssert.IsEmpty(failureMechanism.Sections); + } + + [Test] + public void AddSection_WithSection_AddedCustomFailureMechanismResult() + { + // Setup + var failureMechanism = new MacrostabilityOutwardsFailureMechanism(); + + // Call + failureMechanism.AddSection(new FailureMechanismSection("", new[] + { + new Point2D(2, 1) + })); + + // Assert + Assert.AreEqual(1, failureMechanism.SectionResults.Count()); + Assert.IsInstanceOf(failureMechanism.SectionResults.ElementAt(0)); + } + } +} \ No newline at end of file Index: Ringtoets/Integration/test/Ringtoets.Integration.Data.Test/StandAlone/MicrostabilityFailureMechanismTest.cs =================================================================== diff -u --- Ringtoets/Integration/test/Ringtoets.Integration.Data.Test/StandAlone/MicrostabilityFailureMechanismTest.cs (revision 0) +++ Ringtoets/Integration/test/Ringtoets.Integration.Data.Test/StandAlone/MicrostabilityFailureMechanismTest.cs (revision 20bb156dfc129b1602ddbcddc73c0806807f19ab) @@ -0,0 +1,63 @@ +// 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.Linq; +using Core.Common.Base.Geometry; +using NUnit.Framework; +using Ringtoets.Common.Data.FailureMechanism; +using Ringtoets.Integration.Data.StandAlone; + +namespace Ringtoets.Integration.Data.Test.StandAlone +{ + [TestFixture] + public class MicrostabilityFailureMechanismTest + { + [Test] + public void DefaultConstructor_Always_PropertiesSet() + { + // Call + var failureMechanism = new MicrostabilityFailureMechanism(); + + // Assert + Assert.IsInstanceOf(failureMechanism); + Assert.AreEqual("Dijken en dammen - Microstabiliteit", failureMechanism.Name); + Assert.AreEqual("STMI", failureMechanism.Code); + CollectionAssert.IsEmpty(failureMechanism.Sections); + } + + [Test] + public void AddSection_WithSection_AddedCustomFailureMechanismResult() + { + // Setup + var failureMechanism = new MicrostabilityFailureMechanism(); + + // Call + failureMechanism.AddSection(new FailureMechanismSection("", new[] + { + new Point2D(2, 1) + })); + + // Assert + Assert.AreEqual(1, failureMechanism.SectionResults.Count()); + Assert.IsInstanceOf(failureMechanism.SectionResults.ElementAt(0)); + } + } +} \ No newline at end of file Index: Ringtoets/Integration/test/Ringtoets.Integration.Data.Test/StandAlone/StrengthStabilityLengthwiseConstructionFailureMechanismTest.cs =================================================================== diff -u --- Ringtoets/Integration/test/Ringtoets.Integration.Data.Test/StandAlone/StrengthStabilityLengthwiseConstructionFailureMechanismTest.cs (revision 0) +++ Ringtoets/Integration/test/Ringtoets.Integration.Data.Test/StandAlone/StrengthStabilityLengthwiseConstructionFailureMechanismTest.cs (revision 20bb156dfc129b1602ddbcddc73c0806807f19ab) @@ -0,0 +1,63 @@ +// 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.Linq; +using Core.Common.Base.Geometry; +using NUnit.Framework; +using Ringtoets.Common.Data.FailureMechanism; +using Ringtoets.Integration.Data.StandAlone; + +namespace Ringtoets.Integration.Data.Test.StandAlone +{ + [TestFixture] + public class StrengthStabilityLengthwiseConstructionFailureMechanismTest + { + [Test] + public void DefaultConstructor_Always_PropertiesSet() + { + // Call + var failureMechanism = new StrengthStabilityLengthwiseConstructionFailureMechanism(); + + // Assert + Assert.IsInstanceOf(failureMechanism); + Assert.AreEqual("Kunstwerken - Sterkte en stabiliteit langsconstructies", failureMechanism.Name); + Assert.AreEqual("STKWl", failureMechanism.Code); + CollectionAssert.IsEmpty(failureMechanism.Sections); + } + + [Test] + public void AddSection_WithSection_AddedCustomFailureMechanismResult() + { + // Setup + var failureMechanism = new StrengthStabilityLengthwiseConstructionFailureMechanism(); + + // Call + failureMechanism.AddSection(new FailureMechanismSection("", new[] + { + new Point2D(2, 1) + })); + + // Assert + Assert.AreEqual(1, failureMechanism.SectionResults.Count()); + Assert.IsInstanceOf(failureMechanism.SectionResults.ElementAt(0)); + } + } +} \ No newline at end of file Index: Ringtoets/Integration/test/Ringtoets.Integration.Data.Test/StandAlone/TechnicalInnovationFailureMechanismTest.cs =================================================================== diff -u --- Ringtoets/Integration/test/Ringtoets.Integration.Data.Test/StandAlone/TechnicalInnovationFailureMechanismTest.cs (revision 0) +++ Ringtoets/Integration/test/Ringtoets.Integration.Data.Test/StandAlone/TechnicalInnovationFailureMechanismTest.cs (revision 20bb156dfc129b1602ddbcddc73c0806807f19ab) @@ -0,0 +1,63 @@ +// 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.Linq; +using Core.Common.Base.Geometry; +using NUnit.Framework; +using Ringtoets.Common.Data.FailureMechanism; +using Ringtoets.Integration.Data.StandAlone; + +namespace Ringtoets.Integration.Data.Test.StandAlone +{ + [TestFixture] + public class TechnicalInnovationFailureMechanismTest + { + [Test] + public void DefaultConstructor_Always_PropertiesSet() + { + // Call + var failureMechanism = new TechnicalInnovationFailureMechanism(); + + // Assert + Assert.IsInstanceOf(failureMechanism); + Assert.AreEqual("Technische innovaties - Technische innovaties", failureMechanism.Name); + Assert.AreEqual("INN", failureMechanism.Code); + CollectionAssert.IsEmpty(failureMechanism.Sections); + } + + [Test] + public void AddSection_WithSection_AddedCustomFailureMechanismResult() + { + // Setup + var failureMechanism = new TechnicalInnovationFailureMechanism(); + + // Call + failureMechanism.AddSection(new FailureMechanismSection("", new[] + { + new Point2D(2, 1) + })); + + // Assert + Assert.AreEqual(1, failureMechanism.SectionResults.Count()); + Assert.IsInstanceOf(failureMechanism.SectionResults.ElementAt(0)); + } + } +} \ No newline at end of file Index: Ringtoets/Integration/test/Ringtoets.Integration.Data.Test/StandAlone/WaterPressureAsphaltCoverFailureMechanismTest.cs =================================================================== diff -u --- Ringtoets/Integration/test/Ringtoets.Integration.Data.Test/StandAlone/WaterPressureAsphaltCoverFailureMechanismTest.cs (revision 0) +++ Ringtoets/Integration/test/Ringtoets.Integration.Data.Test/StandAlone/WaterPressureAsphaltCoverFailureMechanismTest.cs (revision 20bb156dfc129b1602ddbcddc73c0806807f19ab) @@ -0,0 +1,63 @@ +// 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.Linq; +using Core.Common.Base.Geometry; +using NUnit.Framework; +using Ringtoets.Common.Data.FailureMechanism; +using Ringtoets.Integration.Data.StandAlone; + +namespace Ringtoets.Integration.Data.Test.StandAlone +{ + [TestFixture] + public class WaterPressureAsphaltCoverFailureMechanismTest + { + [Test] + public void DefaultConstructor_Always_PropertiesSet() + { + // Call + var failureMechanism = new WaterPressureAsphaltCoverFailureMechanism(); + + // Assert + Assert.IsInstanceOf(failureMechanism); + Assert.AreEqual("Dijken en dammen - Wateroverdruk bij asfaltbekleding", failureMechanism.Name); + Assert.AreEqual("AWO", failureMechanism.Code); + CollectionAssert.IsEmpty(failureMechanism.Sections); + } + + [Test] + public void AddSection_WithSection_AddedCustomFailureMechanismResult() + { + // Setup + var failureMechanism = new WaterPressureAsphaltCoverFailureMechanism(); + + // Call + failureMechanism.AddSection(new FailureMechanismSection("", new[] + { + new Point2D(2, 1) + })); + + // Assert + Assert.AreEqual(1, failureMechanism.SectionResults.Count()); + Assert.IsInstanceOf(failureMechanism.SectionResults.ElementAt(0)); + } + } +} \ No newline at end of file Index: Ringtoets/Integration/test/Ringtoets.Integration.Data.Test/StandAlone/WaveImpactAsphaltCoverFailureMechanismTest.cs =================================================================== diff -u --- Ringtoets/Integration/test/Ringtoets.Integration.Data.Test/StandAlone/WaveImpactAsphaltCoverFailureMechanismTest.cs (revision 0) +++ Ringtoets/Integration/test/Ringtoets.Integration.Data.Test/StandAlone/WaveImpactAsphaltCoverFailureMechanismTest.cs (revision 20bb156dfc129b1602ddbcddc73c0806807f19ab) @@ -0,0 +1,63 @@ +// 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.Linq; +using Core.Common.Base.Geometry; +using NUnit.Framework; +using Ringtoets.Common.Data.FailureMechanism; +using Ringtoets.Integration.Data.StandAlone; + +namespace Ringtoets.Integration.Data.Test.StandAlone +{ + [TestFixture] + public class WaveImpactAsphaltCoverFailureMechanismTest + { + [Test] + public void DefaultConstructor_Always_PropertiesSet() + { + // Call + var failureMechanism = new WaveImpactAsphaltCoverFailureMechanism(); + + // Assert + Assert.IsInstanceOf(failureMechanism); + Assert.AreEqual("Dijken en dammen - Golfklappen op asfaltbekleding", failureMechanism.Name); + Assert.AreEqual("AGK", failureMechanism.Code); + CollectionAssert.IsEmpty(failureMechanism.Sections); + } + + [Test] + public void AddSection_WithSection_AddedCustomFailureMechanismResult() + { + // Setup + var failureMechanism = new WaveImpactAsphaltCoverFailureMechanism(); + + // Call + failureMechanism.AddSection(new FailureMechanismSection("", new[] + { + new Point2D(2, 1) + })); + + // Assert + Assert.AreEqual(1, failureMechanism.SectionResults.Count()); + Assert.IsInstanceOf(failureMechanism.SectionResults.ElementAt(0)); + } + } +} \ No newline at end of file Fisheye: Tag 20bb156dfc129b1602ddbcddc73c0806807f19ab refers to a dead (removed) revision in file `Ringtoets/Integration/test/Ringtoets.Integration.Data.Test/StandAlone/WaveImpactAsphaltFailureMechanismTest.cs'. Fisheye: No comparison available. Pass `N' to diff? Index: Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/PresentationObjects/CustomFailureMechanismContextTest.cs =================================================================== diff -u --- Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/PresentationObjects/CustomFailureMechanismContextTest.cs (revision 0) +++ Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/PresentationObjects/CustomFailureMechanismContextTest.cs (revision 20bb156dfc129b1602ddbcddc73c0806807f19ab) @@ -0,0 +1,55 @@ +// 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 NUnit.Framework; +using Rhino.Mocks; +using Ringtoets.Common.Data.AssessmentSection; +using Ringtoets.Common.Data.FailureMechanism; +using Ringtoets.Common.Data.TestUtil; +using Ringtoets.Common.Forms.PresentationObjects; +using Ringtoets.Integration.Forms.PresentationObjects; + +namespace Ringtoets.Integration.Forms.Test.PresentationObjects +{ + [TestFixture] + public class CustomFailureMechanismContextTest + { + [Test] + public void Constructor_ExpectedValues() + { + // Setup + var mocks = new MockRepository(); + var assessmentSection = mocks.Stub(); + mocks.ReplayAll(); + + var failureMechanism = new TestFailureMechanism(); + + // Call + var context = new CustomFailureMechanismContext(failureMechanism, assessmentSection); + + // Assert + Assert.IsInstanceOf>(context); + Assert.AreSame(failureMechanism, context.WrappedData); + Assert.AreSame(assessmentSection, context.Parent); + mocks.VerifyAll(); + } + } +} \ No newline at end of file Index: Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/PresentationObjects/SimpleFailureMechanismContextTest.cs =================================================================== diff -u --- Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/PresentationObjects/SimpleFailureMechanismContextTest.cs (revision 0) +++ Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/PresentationObjects/SimpleFailureMechanismContextTest.cs (revision 20bb156dfc129b1602ddbcddc73c0806807f19ab) @@ -0,0 +1,55 @@ +// 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 NUnit.Framework; +using Rhino.Mocks; +using Ringtoets.Common.Data.AssessmentSection; +using Ringtoets.Common.Data.FailureMechanism; +using Ringtoets.Common.Data.TestUtil; +using Ringtoets.Common.Forms.PresentationObjects; +using Ringtoets.Integration.Forms.PresentationObjects; + +namespace Ringtoets.Integration.Forms.Test.PresentationObjects +{ + [TestFixture] + public class SimpleFailureMechanismContextTest + { + [Test] + public void Constructor_ExpectedValues() + { + // Setup + var mocks = new MockRepository(); + var assessmentSection = mocks.Stub(); + mocks.ReplayAll(); + + var failureMechanism = new TestFailureMechanism(); + + // Call + var context = new SimpleFailureMechanismContext(failureMechanism, assessmentSection); + + // Assert + Assert.IsInstanceOf>(context); + Assert.AreSame(failureMechanism, context.WrappedData); + Assert.AreSame(assessmentSection, context.Parent); + mocks.VerifyAll(); + } + } +} \ No newline at end of file Fisheye: Tag 20bb156dfc129b1602ddbcddc73c0806807f19ab refers to a dead (removed) revision in file `Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/PresentationObjects/StandAloneFailureMechanismContextTest.cs'. Fisheye: No comparison available. Pass `N' to diff? Index: Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/PropertyClasses/StandAloneFailureMechanismContextPropertiesTest.cs =================================================================== diff -u -r209bfd7b71ef53a57e1a52337f1333d38122282f -r20bb156dfc129b1602ddbcddc73c0806807f19ab --- Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/PropertyClasses/StandAloneFailureMechanismContextPropertiesTest.cs (.../StandAloneFailureMechanismContextPropertiesTest.cs) (revision 209bfd7b71ef53a57e1a52337f1333d38122282f) +++ Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/PropertyClasses/StandAloneFailureMechanismContextPropertiesTest.cs (.../StandAloneFailureMechanismContextPropertiesTest.cs) (revision 20bb156dfc129b1602ddbcddc73c0806807f19ab) @@ -48,7 +48,7 @@ public void Data_SetNewStandAloneFailureMechanismContextInstance_ReturnCorrectPropertyValues() { // Setup - var failureMechanism = new MacroStabilityInwardsFailureMechanism(); + var failureMechanism = new MacrostabilityInwardsFailureMechanism(); var properties = new StandAloneFailureMechanismContextProperties(); // Call Index: Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Ringtoets.Integration.Forms.Test.csproj =================================================================== diff -u -r903d441abc9596fbae24ca98a7d6af633bd616f7 -r20bb156dfc129b1602ddbcddc73c0806807f19ab --- Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Ringtoets.Integration.Forms.Test.csproj (.../Ringtoets.Integration.Forms.Test.csproj) (revision 903d441abc9596fbae24ca98a7d6af633bd616f7) +++ Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Ringtoets.Integration.Forms.Test.csproj (.../Ringtoets.Integration.Forms.Test.csproj) (revision 20bb156dfc129b1602ddbcddc73c0806807f19ab) @@ -59,8 +59,9 @@ + - + Index: Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/TreeNodeInfos/AssessmentSectionTreeNodeInfoTest.cs =================================================================== diff -u -r209bfd7b71ef53a57e1a52337f1333d38122282f -r20bb156dfc129b1602ddbcddc73c0806807f19ab --- Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/TreeNodeInfos/AssessmentSectionTreeNodeInfoTest.cs (.../AssessmentSectionTreeNodeInfoTest.cs) (revision 209bfd7b71ef53a57e1a52337f1333d38122282f) +++ Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/TreeNodeInfos/AssessmentSectionTreeNodeInfoTest.cs (.../AssessmentSectionTreeNodeInfoTest.cs) (revision 20bb156dfc129b1602ddbcddc73c0806807f19ab) @@ -142,7 +142,7 @@ var failureMechanisms = new IFailureMechanism[] { new PipingFailureMechanism(), - new MacroStabilityInwardsFailureMechanism() + new MacrostabilityInwardsFailureMechanism() }; var contribution = new FailureMechanismContribution(failureMechanisms, 10.0, 2);