Index: Ringtoets/Common/src/Ringtoets.Common.Data/Contribution/FailureMechanismContribution.cs =================================================================== diff -u --- Ringtoets/Common/src/Ringtoets.Common.Data/Contribution/FailureMechanismContribution.cs (revision 0) +++ Ringtoets/Common/src/Ringtoets.Common.Data/Contribution/FailureMechanismContribution.cs (revision d1565906db90df7be4365d277d5ff22dc2d77a82) @@ -0,0 +1,124 @@ +// 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; +using System.Collections.Generic; + +using Core.Common.Base; +using Core.Common.Utils.Extensions; + +using Ringtoets.Common.Data.Properties; + +namespace Ringtoets.Common.Data.Contribution +{ + /// + /// This class represents the distribution of all failure mechanism contributions. + /// + public class FailureMechanismContribution : Observable + { + private readonly ICollection distribution = new List(); + private int norm; + + /// + /// Creates a new instance of . Values are taken from the + /// and one item is added with a value of + /// which represents the contribution of any other failure mechanisms. + /// + /// The of on which to base + /// the . + /// The collective contribution for other failure mechanisms. + /// The norm defined on a assessment section. + /// Thrown when: + /// + /// any of the has a value for not in interval [0,100]. + /// the value of is not in interval [0,100] + /// + /// + /// Thrown when is null. + public FailureMechanismContribution(IEnumerable failureMechanisms, double otherContribution, int norm) + { + if (failureMechanisms == null) + { + throw new ArgumentNullException("failureMechanisms", Resources.FailureMechanismContribution_FailureMechanismContribution_Can_not_create_FailureMechanismContribution_without_FailureMechanism_collection); + } + Norm = norm; + failureMechanisms.ForEachElementDo(AddContributionItem); + AddOtherContributionItem(otherContribution); + } + + /// + /// Gets or sets the norm which has been defined on the assessment section. + /// + public int Norm + { + get + { + return norm; + } + set + { + if (value <= 0) + { + throw new ArgumentOutOfRangeException("value", Resources.FailureMechanismContributionItem_Norm_must_be_larger_than_zero); + } + norm = value; + distribution.ForEachElementDo(d => d.Norm = norm); + } + } + + /// + /// Gets the distribution of failure mechanism contributions. + /// + public IEnumerable Distribution + { + get + { + return distribution; + } + } + + /// + /// Adds a based on . + /// + /// The to add a for. + /// Thrown when is null. + private void AddContributionItem(IFailureMechanism failureMechanism) + { + distribution.Add(new FailureMechanismContributionItem(failureMechanism, norm)); + } + + /// + /// Adds a representing all other failure mechanisms not in the failure mechanism + /// list supported within Ringtoets. + /// + /// The contribution to set for other failure mechanisms. + /// Thrown when is not in interval [0,100] + private void AddOtherContributionItem(double otherContribution) + { + var otherFailureMechanism = new OtherFailureMechanism + { + Contribution = otherContribution + }; + var otherContributionItem = new FailureMechanismContributionItem(otherFailureMechanism, norm); + distribution.Add(otherContributionItem); + } + } +} \ No newline at end of file Index: Ringtoets/Common/src/Ringtoets.Common.Data/Contribution/FailureMechanismContributionItem.cs =================================================================== diff -u --- Ringtoets/Common/src/Ringtoets.Common.Data/Contribution/FailureMechanismContributionItem.cs (revision 0) +++ Ringtoets/Common/src/Ringtoets.Common.Data/Contribution/FailureMechanismContributionItem.cs (revision d1565906db90df7be4365d277d5ff22dc2d77a82) @@ -0,0 +1,78 @@ +// 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; + +using CommonResources = Ringtoets.Common.Data.Properties.Resources; + +namespace Ringtoets.Common.Data.Contribution +{ + /// + /// This class represents an amount for which a failure mechanism will contribute to the + /// overall verdict of a dike section. + /// + public class FailureMechanismContributionItem + { + /// + /// Creates a new instance of . With + /// , and set. + /// + /// The for which the contribution is defined. + /// The norm used to calculate the probability space. + /// Thrown when is null. + public FailureMechanismContributionItem(IFailureMechanism failureMechanism, int norm) + { + if (failureMechanism == null) + { + throw new ArgumentNullException("failureMechanism", CommonResources.FailureMechanismContributionItem_Can_not_create_contribution_item_without_failure_mechanism); + } + Assessment = failureMechanism.Name; + Contribution = failureMechanism.Contribution; + Norm = norm; + } + + /// + /// Gets the name of the assessment for which to configure the . + /// + public string Assessment { get; private set; } + + /// + /// Gets the amount of contribution as a percentage. + /// + public double Contribution { get; private set; } + + /// + /// Gets or sets the norm of the complete dike section. + /// + public int Norm { get; internal set; } + + /// + /// Gets the probability space per year for the . + /// + public double ProbabilitySpace + { + get + { + return (Norm / Contribution) * 100; + } + } + } +} \ No newline at end of file Index: Ringtoets/Common/src/Ringtoets.Common.Data/Contribution/OtherFailureMechanism.cs =================================================================== diff -u --- Ringtoets/Common/src/Ringtoets.Common.Data/Contribution/OtherFailureMechanism.cs (revision 0) +++ Ringtoets/Common/src/Ringtoets.Common.Data/Contribution/OtherFailureMechanism.cs (revision d1565906db90df7be4365d277d5ff22dc2d77a82) @@ -0,0 +1,47 @@ +// 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.Properties; + +namespace Ringtoets.Common.Data.Contribution +{ + /// + /// This class represents a failure mechanism which has no representative within Ringtoets but + /// contributes to the overall verdict nonetheless. + /// + public class OtherFailureMechanism : BaseFailureMechanism + { + /// + /// Creates a new instance of . + /// + public OtherFailureMechanism() : base(Resources.OtherFailureMechanism_DisplayName) { } + + public override IEnumerable CalculationItems + { + get + { + yield break; + } + } + } +} \ No newline at end of file Index: Ringtoets/Common/src/Ringtoets.Common.Data/Properties/Resources.Designer.cs =================================================================== diff -u -r337f02d824bf5352ed8148dbda0ca6b2b61a20c1 -rd1565906db90df7be4365d277d5ff22dc2d77a82 --- Ringtoets/Common/src/Ringtoets.Common.Data/Properties/Resources.Designer.cs (.../Resources.Designer.cs) (revision 337f02d824bf5352ed8148dbda0ca6b2b61a20c1) +++ Ringtoets/Common/src/Ringtoets.Common.Data/Properties/Resources.Designer.cs (.../Resources.Designer.cs) (revision d1565906db90df7be4365d277d5ff22dc2d77a82) @@ -115,6 +115,35 @@ } /// + /// Looks up a localized string similar to Kan geen bijdrageoverzicht maken zonder faalmechanismen.. + /// + public static string FailureMechanismContribution_FailureMechanismContribution_Can_not_create_FailureMechanismContribution_without_FailureMechanism_collection { + get { + return ResourceManager.GetString("FailureMechanismContribution_FailureMechanismContribution_Can_not_create_FailureM" + + "echanismContribution_without_FailureMechanism_collection", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Kan geen bijdrage element maken zonder een faalmechanisme.. + /// + public static string FailureMechanismContributionItem_Can_not_create_contribution_item_without_failure_mechanism { + get { + return ResourceManager.GetString("FailureMechanismContributionItem_Can_not_create_contribution_item_without_failure" + + "_mechanism", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to De faalkansbijdrage kan alleen bepaald worden als de norm van het traject groter is dan 0.. + /// + public static string FailureMechanismContributionItem_Norm_must_be_larger_than_zero { + get { + return ResourceManager.GetString("FailureMechanismContributionItem_Norm_must_be_larger_than_zero", resourceCulture); + } + } + + /// /// Looks up a localized string similar to Vak moet minstens uit 1 punt bestaan.. /// public static string FailureMechanismSection_Section_must_have_at_least_1_geometry_point { @@ -124,6 +153,15 @@ } /// + /// Looks up a localized string similar to Overig. + /// + public static string OtherFailureMechanism_DisplayName { + get { + return ResourceManager.GetString("OtherFailureMechanism_DisplayName", resourceCulture); + } + } + + /// /// Looks up a localized string similar to De geometrie die opgegeven werd voor de referentielijn heeft geen waarde.. /// public static string ReferenceLine_SetGeometry_New_geometry_cannot_be_null { Index: Ringtoets/Common/src/Ringtoets.Common.Data/Properties/Resources.resx =================================================================== diff -u -r337f02d824bf5352ed8148dbda0ca6b2b61a20c1 -rd1565906db90df7be4365d277d5ff22dc2d77a82 --- Ringtoets/Common/src/Ringtoets.Common.Data/Properties/Resources.resx (.../Resources.resx) (revision 337f02d824bf5352ed8148dbda0ca6b2b61a20c1) +++ Ringtoets/Common/src/Ringtoets.Common.Data/Properties/Resources.resx (.../Resources.resx) (revision d1565906db90df7be4365d277d5ff22dc2d77a82) @@ -144,4 +144,16 @@ Vak moet minstens uit 1 punt bestaan. + + Kan geen bijdrage element maken zonder een faalmechanisme. + + + De faalkansbijdrage kan alleen bepaald worden als de norm van het traject groter is dan 0. + + + Kan geen bijdrageoverzicht maken zonder faalmechanismen. + + + Overig + \ No newline at end of file Index: Ringtoets/Common/src/Ringtoets.Common.Data/Ringtoets.Common.Data.csproj =================================================================== diff -u -rbb4d49ec7a262fbd9afdd83527bfef2ba186e278 -rd1565906db90df7be4365d277d5ff22dc2d77a82 --- Ringtoets/Common/src/Ringtoets.Common.Data/Ringtoets.Common.Data.csproj (.../Ringtoets.Common.Data.csproj) (revision bb4d49ec7a262fbd9afdd83527bfef2ba186e278) +++ Ringtoets/Common/src/Ringtoets.Common.Data/Ringtoets.Common.Data.csproj (.../Ringtoets.Common.Data.csproj) (revision d1565906db90df7be4365d277d5ff22dc2d77a82) @@ -40,6 +40,9 @@ Properties\GlobalAssembly.cs + + + @@ -64,6 +67,10 @@ Core.Common.Base False + + {f49bd8b2-332a-4c91-a196-8cce0a2c7d98} + Core.Common.Utils + {c90b77da-e421-43cc-b82e-529651bc21ac} Core.Common.Version Index: Ringtoets/Common/test/Ringtoets.Common.Data.Test/Contribution/FailureMechanismContributionItemTest.cs =================================================================== diff -u --- Ringtoets/Common/test/Ringtoets.Common.Data.Test/Contribution/FailureMechanismContributionItemTest.cs (revision 0) +++ Ringtoets/Common/test/Ringtoets.Common.Data.Test/Contribution/FailureMechanismContributionItemTest.cs (revision d1565906db90df7be4365d277d5ff22dc2d77a82) @@ -0,0 +1,95 @@ +using System; + +using Core.Common.TestUtil; + +using NUnit.Framework; + +using Rhino.Mocks; + +using Ringtoets.Common.Data.Contribution; + +namespace Ringtoets.Common.Data.Test.Contribution +{ + [TestFixture] + public class FailureMechanismContributionItemTest + { + private MockRepository mockRepository; + + [SetUp] + public void SetUp() + { + mockRepository = new MockRepository(); + } + + [Test] + public void Constructor_WithoutFailureMechanism_ThrowsArgumentNullException() + { + // Setup + var norm = new Random(21).Next(1, int.MaxValue); + + // Call + TestDelegate test = () => + { + new FailureMechanismContributionItem(null, norm); + }; + + // Assert + const string expectedMessage = "Kan geen bijdrage element maken zonder een faalmechanisme."; + TestHelper.AssertThrowsArgumentExceptionAndTestMessage(test, expectedMessage); + } + + [Test] + public void Constructor_WithFailureMechanism_SetProperties() + { + // Setup + string name = "SomeName"; + var random = new Random(21); + double contribution = random.Next(1, 100); + var norm = random.Next(1, int.MaxValue); + + var failureMechanism = mockRepository.StrictMock(); + + failureMechanism.Expect(fm => fm.Name).Return(name); + failureMechanism.Expect(fm => fm.Contribution).Return(contribution); + + mockRepository.ReplayAll(); + + // Call + var result = new FailureMechanismContributionItem(failureMechanism, norm); + + // Assert + Assert.AreEqual(name, result.Assessment); + Assert.AreEqual(contribution, result.Contribution); + Assert.AreEqual(norm, result.Norm); + + mockRepository.VerifyAll(); + } + + [Test] + [TestCase(20, 2000, 10000)] + [TestCase(3, 100, 10000/3.0)] + [TestCase(25.5, 2550, 10000)] + public void ProbabilitySpace_DifferentContributionAndNorm_ReturnsExpectedValue(double contribution, int norm, double expectedResult) + { + // Setup + string name = "SomeName"; + + var failureMechanism = mockRepository.StrictMock(); + + failureMechanism.Expect(fm => fm.Name).Return(name); + failureMechanism.Expect(fm => fm.Contribution).Return(contribution); + + mockRepository.ReplayAll(); + + var contributionItem = new FailureMechanismContributionItem(failureMechanism, norm); + + // Call + var result = contributionItem.ProbabilitySpace; + + // Assert + Assert.AreEqual(expectedResult, result, double.Epsilon); + + mockRepository.VerifyAll(); + } + } +} \ No newline at end of file Index: Ringtoets/Common/test/Ringtoets.Common.Data.Test/Contribution/FailureMechanismContributionTest.cs =================================================================== diff -u --- Ringtoets/Common/test/Ringtoets.Common.Data.Test/Contribution/FailureMechanismContributionTest.cs (revision 0) +++ Ringtoets/Common/test/Ringtoets.Common.Data.Test/Contribution/FailureMechanismContributionTest.cs (revision d1565906db90df7be4365d277d5ff22dc2d77a82) @@ -0,0 +1,197 @@ +using System; +using System.Collections.ObjectModel; +using System.Linq; + +using Core.Common.TestUtil; + +using NUnit.Framework; + +using Rhino.Mocks; + +using Ringtoets.Common.Data.Contribution; + +namespace Ringtoets.Common.Data.Test.Contribution +{ + [TestFixture] + public class FailureMechanismContributionTest + { + private MockRepository mockRepository; + + [SetUp] + public void SetUp() + { + mockRepository = new MockRepository(); + } + + [Test] + public void Constructor_WithNullFailureMechanisms_ThrowsArgumentNullException() + { + // Setup + var random = new Random(21); + var contribution = random.Next(1, 100); + var norm = random.Next(1, int.MaxValue); + + // Call + TestDelegate test = () => + { + new FailureMechanismContribution(null, contribution, norm); + }; + + // Assert + const string expectedMessage = "Kan geen bijdrageoverzicht maken zonder faalmechanismen."; + TestHelper.AssertThrowsArgumentExceptionAndTestMessage(test, expectedMessage); + } + + [Test] + public void Constructor_WithNullFailureMechanism_ThrowsArgumentNullException() + { + // Setup + var random = new Random(21); + var contribution = random.Next(1, 100); + var norm = random.Next(1, int.MaxValue); + + // Call + TestDelegate test = () => new FailureMechanismContribution(new IFailureMechanism[] + { + null + }, contribution, norm); + + // Assert + const string expectedMessage = "Kan geen bijdrage element maken zonder een faalmechanisme."; + TestHelper.AssertThrowsArgumentExceptionAndTestMessage(test, expectedMessage); + } + + [Test] + [TestCase(0)] + [TestCase(-1)] + [TestCase(-200)] + public void Constructor_WithInvalidNorm_ThrowsArgumentException(int norm) + { + // Setup + var random = new Random(21); + var contribution = random.Next(1,100); + + // Call + TestDelegate test = () => + { + new FailureMechanismContribution(Enumerable.Empty(), contribution, norm); + }; + + // Assert + const string expectedMessage = "De faalkansbijdrage kan alleen bepaald worden als de norm van het traject groter is dan 0."; + TestHelper.AssertThrowsArgumentExceptionAndTestMessage(test, expectedMessage); + } + + [Test] + [TestCase(0)] + [TestCase(-10)] + [TestCase(-1e-6)] + [TestCase(100 + 1e-6)] + [TestCase(150)] + public void Constructor_OtherContributionLessOrEqualTo0OrGreaterThan100_ArgumentException(double contribution) + { + // Setup + var random = new Random(21); + var norm = random.Next(1, int.MaxValue); + + // Call + TestDelegate test = () => + { + new FailureMechanismContribution(Enumerable.Empty(), contribution, norm); + }; + + // Assert + TestHelper.AssertThrowsArgumentExceptionAndTestMessage(test, Common.Data.Properties.Resources.FailureMechanism_Contribution_Value_should_be_in_interval_0_100); + } + + [Test] + [TestCase(50)] + [TestCase(1e-6)] + [TestCase(100)] + public void Constructor_EmptyFailureMechanisms_OnlyOtherFailureMechanismAddedWithContributionSet(double contribution) + { + // Setup + var random = new Random(21); + var norm = random.Next(1, int.MaxValue); + + // Call + var result = new FailureMechanismContribution(Enumerable.Empty(), contribution, norm); + + // Assert + Assert.AreEqual(1, result.Distribution.Count()); + Assert.AreEqual(contribution, result.Distribution.ElementAt(0).Contribution); + Assert.AreEqual((norm/contribution)*100, result.Distribution.ElementAt(0).ProbabilitySpace); + Assert.AreEqual(norm, result.Norm); + } + + [Test] + [TestCase(1)] + [TestCase(2)] + [TestCase(5)] + public void Constructor_OneOrMoreFailureMechanisms_DistributionForFailureMechanismsWithOtherAtEnd(int failureMechanismCount) + { + // Setup + var random = new Random(21); + var otherContribution = random.Next(1, 100); + var norm = random.Next(1, int.MaxValue); + + var failureMechanismNames = new Collection(); + var failureMechanismContributions = new Collection(); + + var failureMechanisms = new Collection(); + var namePrefixFormat = "mechanism_{0}"; + + for (var i = 0; i < failureMechanismCount; i++) + { + var name = string.Format(namePrefixFormat, i); + var contribution = random.Next(1, 100); + var failureMechanism = mockRepository.StrictMock(); + failureMechanism.Expect(fm => fm.Name).Return(name); + failureMechanism.Expect(fm => fm.Contribution).Return(contribution); + + failureMechanisms.Add(failureMechanism); + failureMechanismNames.Add(name); + failureMechanismContributions.Add(contribution); + } + + failureMechanismNames.Add("Overig"); + failureMechanismContributions.Add(otherContribution); + + mockRepository.ReplayAll(); + + // Call + var result = new FailureMechanismContribution(failureMechanisms, otherContribution, norm); + + // Assert + Assert.AreEqual(failureMechanismCount + 1, result.Distribution.Count()); + + CollectionAssert.AreEqual(failureMechanismNames, result.Distribution.Select(d => d.Assessment)); + CollectionAssert.AreEqual(failureMechanismContributions, result.Distribution.Select(d => d.Contribution)); + CollectionAssert.AreEqual(failureMechanismContributions.Select(c => (norm/c)*100), result.Distribution.Select(d => d.ProbabilitySpace)); + + mockRepository.VerifyAll(); + } + + [Test] + public void Norm_WhenUpdated_NormUpdatedForEachFailureMechanismContributionItem() + { + // Setup + var random = new Random(21); + var otherContribution = random.Next(1, 100); + var norm = 20000; + var newNorm = 30000; + + var failureMechanism = mockRepository.Stub(); + + mockRepository.ReplayAll(); + + var failureMechanismContribution = new FailureMechanismContribution(new[] { failureMechanism }, otherContribution, norm); + + // Call + failureMechanismContribution.Norm = newNorm; + + // Assert + Assert.AreEqual(Enumerable.Repeat(newNorm,2) , failureMechanismContribution.Distribution.Select(d => d.Norm)); + } + } +} \ No newline at end of file Index: Ringtoets/Common/test/Ringtoets.Common.Data.Test/Contribution/OtherFailureMechanismTest.cs =================================================================== diff -u --- Ringtoets/Common/test/Ringtoets.Common.Data.Test/Contribution/OtherFailureMechanismTest.cs (revision 0) +++ Ringtoets/Common/test/Ringtoets.Common.Data.Test/Contribution/OtherFailureMechanismTest.cs (revision d1565906db90df7be4365d277d5ff22dc2d77a82) @@ -0,0 +1,20 @@ +using NUnit.Framework; + +using Ringtoets.Common.Data.Contribution; + +namespace Ringtoets.Common.Data.Test.Contribution +{ + [TestFixture] + public class OtherFailureMechanismTest + { + [Test] + public void Constructor_Always_NameSet() + { + // Call + var result = new OtherFailureMechanism(); + + // Assert + Assert.AreEqual("Overig", result.Name); + } + } +} \ No newline at end of file Index: Ringtoets/Common/test/Ringtoets.Common.Data.Test/Ringtoets.Common.Data.Test.csproj =================================================================== diff -u -rbb4d49ec7a262fbd9afdd83527bfef2ba186e278 -rd1565906db90df7be4365d277d5ff22dc2d77a82 --- Ringtoets/Common/test/Ringtoets.Common.Data.Test/Ringtoets.Common.Data.Test.csproj (.../Ringtoets.Common.Data.Test.csproj) (revision bb4d49ec7a262fbd9afdd83527bfef2ba186e278) +++ Ringtoets/Common/test/Ringtoets.Common.Data.Test/Ringtoets.Common.Data.Test.csproj (.../Ringtoets.Common.Data.Test.csproj) (revision d1565906db90df7be4365d277d5ff22dc2d77a82) @@ -53,6 +53,9 @@ + + + Index: Ringtoets/Integration/src/Ringtoets.Integration.Data/AssessmentSectionBase.cs =================================================================== diff -u -r06f9145d8180df7fd26eac086a3f431c181e4d64 -rd1565906db90df7be4365d277d5ff22dc2d77a82 --- Ringtoets/Integration/src/Ringtoets.Integration.Data/AssessmentSectionBase.cs (.../AssessmentSectionBase.cs) (revision 06f9145d8180df7fd26eac086a3f431c181e4d64) +++ Ringtoets/Integration/src/Ringtoets.Integration.Data/AssessmentSectionBase.cs (.../AssessmentSectionBase.cs) (revision d1565906db90df7be4365d277d5ff22dc2d77a82) @@ -24,8 +24,8 @@ using Core.Common.Base; using Core.Common.Base.Storage; using Ringtoets.Common.Data; +using Ringtoets.Common.Data.Contribution; using Ringtoets.HydraRing.Data; -using Ringtoets.Integration.Data.Contribution; namespace Ringtoets.Integration.Data { Fisheye: Tag d1565906db90df7be4365d277d5ff22dc2d77a82 refers to a dead (removed) revision in file `Ringtoets/Integration/src/Ringtoets.Integration.Data/Contribution/FailureMechanismContribution.cs'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag d1565906db90df7be4365d277d5ff22dc2d77a82 refers to a dead (removed) revision in file `Ringtoets/Integration/src/Ringtoets.Integration.Data/Contribution/FailureMechanismContributionItem.cs'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag d1565906db90df7be4365d277d5ff22dc2d77a82 refers to a dead (removed) revision in file `Ringtoets/Integration/src/Ringtoets.Integration.Data/Contribution/OtherFailureMechanism.cs'. Fisheye: No comparison available. Pass `N' to diff? Index: Ringtoets/Integration/src/Ringtoets.Integration.Data/DikeAssessmentSection.cs =================================================================== diff -u -r4512af7782ee31b36941bb280b54d9da2953dd71 -rd1565906db90df7be4365d277d5ff22dc2d77a82 --- Ringtoets/Integration/src/Ringtoets.Integration.Data/DikeAssessmentSection.cs (.../DikeAssessmentSection.cs) (revision 4512af7782ee31b36941bb280b54d9da2953dd71) +++ Ringtoets/Integration/src/Ringtoets.Integration.Data/DikeAssessmentSection.cs (.../DikeAssessmentSection.cs) (revision d1565906db90df7be4365d277d5ff22dc2d77a82) @@ -21,7 +21,7 @@ using System.Collections.Generic; using Ringtoets.Common.Data; -using Ringtoets.Integration.Data.Contribution; +using Ringtoets.Common.Data.Contribution; using Ringtoets.Integration.Data.Placeholders; using Ringtoets.Integration.Data.Properties; using Ringtoets.Piping.Data; Index: Ringtoets/Integration/src/Ringtoets.Integration.Data/DuneAssessmentSection.cs =================================================================== diff -u -r4512af7782ee31b36941bb280b54d9da2953dd71 -rd1565906db90df7be4365d277d5ff22dc2d77a82 --- Ringtoets/Integration/src/Ringtoets.Integration.Data/DuneAssessmentSection.cs (.../DuneAssessmentSection.cs) (revision 4512af7782ee31b36941bb280b54d9da2953dd71) +++ Ringtoets/Integration/src/Ringtoets.Integration.Data/DuneAssessmentSection.cs (.../DuneAssessmentSection.cs) (revision d1565906db90df7be4365d277d5ff22dc2d77a82) @@ -22,7 +22,7 @@ using System.Collections.Generic; using Ringtoets.Common.Data; -using Ringtoets.Integration.Data.Contribution; +using Ringtoets.Common.Data.Contribution; using Ringtoets.Integration.Data.Placeholders; using Ringtoets.Integration.Data.Properties; Index: Ringtoets/Integration/src/Ringtoets.Integration.Data/Properties/Resources.Designer.cs =================================================================== diff -u -r249fd5e4604012895724a9d7df67201332c9e7dc -rd1565906db90df7be4365d277d5ff22dc2d77a82 --- Ringtoets/Integration/src/Ringtoets.Integration.Data/Properties/Resources.Designer.cs (.../Resources.Designer.cs) (revision 249fd5e4604012895724a9d7df67201332c9e7dc) +++ Ringtoets/Integration/src/Ringtoets.Integration.Data/Properties/Resources.Designer.cs (.../Resources.Designer.cs) (revision d1565906db90df7be4365d277d5ff22dc2d77a82) @@ -124,35 +124,6 @@ } /// - /// Looks up a localized string similar to Kan geen bijdrageoverzicht maken zonder faalmechanismen.. - /// - public static string FailureMechanismContribution_FailureMechanismContribution_Can_not_create_FailureMechanismContribution_without_FailureMechanism_collection { - get { - return ResourceManager.GetString("FailureMechanismContribution_FailureMechanismContribution_Can_not_create_FailureM" + - "echanismContribution_without_FailureMechanism_collection", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Kan geen bijdrage element maken zonder een faalmechanisme.. - /// - public static string FailureMechanismContributionItem_Can_not_create_contribution_item_without_failure_mechanism { - get { - return ResourceManager.GetString("FailureMechanismContributionItem_Can_not_create_contribution_item_without_failure" + - "_mechanism", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to De faalkansbijdrage kan alleen bepaald worden als de norm van het traject groter is dan 0.. - /// - public static string FailureMechanismContributionItem_Norm_must_be_larger_than_zero { - get { - return ResourceManager.GetString("FailureMechanismContributionItem_Norm_must_be_larger_than_zero", resourceCulture); - } - } - - /// /// Looks up a localized string similar to Dijken - Graserosie kruin en binnentalud. /// public static string GrassErosionFailureMechanism_DisplayName { @@ -189,15 +160,6 @@ } /// - /// Looks up a localized string similar to Overig. - /// - public static string OtherFailureMechanism_DisplayName { - get { - return ResourceManager.GetString("OtherFailureMechanism_DisplayName", resourceCulture); - } - } - - /// /// Looks up a localized string similar to Kunstwerken - Overslag en overloop. /// public static string OvertoppingFailureMechanism_DisplayName { Index: Ringtoets/Integration/src/Ringtoets.Integration.Data/Properties/Resources.resx =================================================================== diff -u -r249fd5e4604012895724a9d7df67201332c9e7dc -rd1565906db90df7be4365d277d5ff22dc2d77a82 --- Ringtoets/Integration/src/Ringtoets.Integration.Data/Properties/Resources.resx (.../Resources.resx) (revision 249fd5e4604012895724a9d7df67201332c9e7dc) +++ Ringtoets/Integration/src/Ringtoets.Integration.Data/Properties/Resources.resx (.../Resources.resx) (revision d1565906db90df7be4365d277d5ff22dc2d77a82) @@ -156,16 +156,4 @@ Dijken - Grasbekledingen - - Overig - - - Kan geen bijdrage element maken zonder een faalmechanisme. - - - Kan geen bijdrageoverzicht maken zonder faalmechanismen. - - - De faalkansbijdrage kan alleen bepaald worden als de norm van het traject groter is dan 0. - \ No newline at end of file Index: Ringtoets/Integration/src/Ringtoets.Integration.Data/Ringtoets.Integration.Data.csproj =================================================================== diff -u -r56ff0f1d920928ea93ba1a739936bca2df327391 -rd1565906db90df7be4365d277d5ff22dc2d77a82 --- Ringtoets/Integration/src/Ringtoets.Integration.Data/Ringtoets.Integration.Data.csproj (.../Ringtoets.Integration.Data.csproj) (revision 56ff0f1d920928ea93ba1a739936bca2df327391) +++ Ringtoets/Integration/src/Ringtoets.Integration.Data/Ringtoets.Integration.Data.csproj (.../Ringtoets.Integration.Data.csproj) (revision d1565906db90df7be4365d277d5ff22dc2d77a82) @@ -40,12 +40,9 @@ Properties\GlobalAssembly.cs - - - Index: Ringtoets/Integration/src/Ringtoets.Integration.Forms/Views/FailureMechanismContributionView.cs =================================================================== diff -u -r4512af7782ee31b36941bb280b54d9da2953dd71 -rd1565906db90df7be4365d277d5ff22dc2d77a82 --- Ringtoets/Integration/src/Ringtoets.Integration.Forms/Views/FailureMechanismContributionView.cs (.../FailureMechanismContributionView.cs) (revision 4512af7782ee31b36941bb280b54d9da2953dd71) +++ Ringtoets/Integration/src/Ringtoets.Integration.Forms/Views/FailureMechanismContributionView.cs (.../FailureMechanismContributionView.cs) (revision d1565906db90df7be4365d277d5ff22dc2d77a82) @@ -25,8 +25,9 @@ using Core.Common.Controls.Views; using Core.Common.Gui.Properties; using Core.Common.Utils.Reflection; -using Ringtoets.Integration.Data.Contribution; +using Ringtoets.Common.Data.Contribution; + namespace Ringtoets.Integration.Forms.Views { /// Index: Ringtoets/Integration/src/Ringtoets.Integration.Plugin/RingtoetsGuiPlugin.cs =================================================================== diff -u -r7d124cef8960a865cc8d7db24b3359f7ff9958be -rd1565906db90df7be4365d277d5ff22dc2d77a82 --- Ringtoets/Integration/src/Ringtoets.Integration.Plugin/RingtoetsGuiPlugin.cs (.../RingtoetsGuiPlugin.cs) (revision 7d124cef8960a865cc8d7db24b3359f7ff9958be) +++ Ringtoets/Integration/src/Ringtoets.Integration.Plugin/RingtoetsGuiPlugin.cs (.../RingtoetsGuiPlugin.cs) (revision d1565906db90df7be4365d277d5ff22dc2d77a82) @@ -33,12 +33,12 @@ using Core.Common.IO.Exceptions; using log4net; using Ringtoets.Common.Data; +using Ringtoets.Common.Data.Contribution; using Ringtoets.Common.Forms.PresentationObjects; using Ringtoets.Common.Placeholder; using Ringtoets.HydraRing.Forms.PresentationObjects; using Ringtoets.HydraRing.Plugin; using Ringtoets.Integration.Data; -using Ringtoets.Integration.Data.Contribution; using Ringtoets.Integration.Data.Placeholders; using Ringtoets.Integration.Forms.PresentationObjects; using Ringtoets.Integration.Forms.PropertyClasses; Fisheye: Tag d1565906db90df7be4365d277d5ff22dc2d77a82 refers to a dead (removed) revision in file `Ringtoets/Integration/test/Ringtoets.Integration.Data.Test/Contribution/FailureMechanismContributionItemTest.cs'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag d1565906db90df7be4365d277d5ff22dc2d77a82 refers to a dead (removed) revision in file `Ringtoets/Integration/test/Ringtoets.Integration.Data.Test/Contribution/FailureMechanismContributionTest.cs'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag d1565906db90df7be4365d277d5ff22dc2d77a82 refers to a dead (removed) revision in file `Ringtoets/Integration/test/Ringtoets.Integration.Data.Test/Contribution/OtherFailureMechanismTest.cs'. Fisheye: No comparison available. Pass `N' to diff? Index: Ringtoets/Integration/test/Ringtoets.Integration.Data.Test/DikeAssessmentSectionTest.cs =================================================================== diff -u -r17574077c6720e02c10f23ac3a0354db35855a05 -rd1565906db90df7be4365d277d5ff22dc2d77a82 --- Ringtoets/Integration/test/Ringtoets.Integration.Data.Test/DikeAssessmentSectionTest.cs (.../DikeAssessmentSectionTest.cs) (revision 17574077c6720e02c10f23ac3a0354db35855a05) +++ Ringtoets/Integration/test/Ringtoets.Integration.Data.Test/DikeAssessmentSectionTest.cs (.../DikeAssessmentSectionTest.cs) (revision d1565906db90df7be4365d277d5ff22dc2d77a82) @@ -1,7 +1,8 @@ using System.Linq; using Core.Common.Base; using NUnit.Framework; -using Ringtoets.Integration.Data.Contribution; + +using Ringtoets.Common.Data.Contribution; using Ringtoets.Piping.Data; using RingtoetsIntegrationResources = Ringtoets.Integration.Data.Properties.Resources; @@ -38,7 +39,7 @@ stoneRevetmentName, asphaltName, grassRevetmentName, - RingtoetsIntegrationResources.OtherFailureMechanism_DisplayName + "Overig" }; // Assert @@ -138,7 +139,7 @@ Assert.AreEqual(norm, contribution[i].Norm); Assert.AreEqual((norm / contribution[i].Contribution) * 100, contribution[i].ProbabilitySpace); } - Assert.AreEqual(RingtoetsIntegrationResources.OtherFailureMechanism_DisplayName, contribution[9].Assessment); + Assert.AreEqual("Overig", contribution[9].Assessment); Assert.AreEqual(30, contribution[9].Contribution); Assert.AreEqual(norm, contribution[9].Norm); Assert.AreEqual((norm / contribution[9].Contribution) * 100, 100000); Index: Ringtoets/Integration/test/Ringtoets.Integration.Data.Test/DuneAssessmentSectionTest.cs =================================================================== diff -u -r17574077c6720e02c10f23ac3a0354db35855a05 -rd1565906db90df7be4365d277d5ff22dc2d77a82 --- Ringtoets/Integration/test/Ringtoets.Integration.Data.Test/DuneAssessmentSectionTest.cs (.../DuneAssessmentSectionTest.cs) (revision 17574077c6720e02c10f23ac3a0354db35855a05) +++ Ringtoets/Integration/test/Ringtoets.Integration.Data.Test/DuneAssessmentSectionTest.cs (.../DuneAssessmentSectionTest.cs) (revision d1565906db90df7be4365d277d5ff22dc2d77a82) @@ -1,8 +1,9 @@ using System.Linq; using Core.Common.Base; using NUnit.Framework; -using Ringtoets.Integration.Data.Contribution; +using Ringtoets.Common.Data.Contribution; + using RingtoetsIntegrationResources = Ringtoets.Integration.Data.Properties.Resources; namespace Ringtoets.Integration.Data.Test @@ -19,7 +20,7 @@ var contributions = new double[] { 70, 30 }; var names = new[] { duneErosionName, - RingtoetsIntegrationResources.OtherFailureMechanism_DisplayName + "Overig" }; // Call @@ -76,7 +77,7 @@ Assert.AreEqual(failureMechanisms[0].Contribution, contribution[0].Contribution); Assert.AreEqual((30000 / contribution[0].Contribution) * 100, contribution[0].ProbabilitySpace); - Assert.AreEqual(RingtoetsIntegrationResources.OtherFailureMechanism_DisplayName, contribution[1].Assessment); + Assert.AreEqual("Overig", contribution[1].Assessment); Assert.AreEqual(30, contribution[1].Contribution); Assert.AreEqual((30000 / contribution[1].Contribution) * 100, 100000); } Index: Ringtoets/Integration/test/Ringtoets.Integration.Data.Test/Ringtoets.Integration.Data.Test.csproj =================================================================== diff -u -r56ff0f1d920928ea93ba1a739936bca2df327391 -rd1565906db90df7be4365d277d5ff22dc2d77a82 --- Ringtoets/Integration/test/Ringtoets.Integration.Data.Test/Ringtoets.Integration.Data.Test.csproj (.../Ringtoets.Integration.Data.Test.csproj) (revision 56ff0f1d920928ea93ba1a739936bca2df327391) +++ Ringtoets/Integration/test/Ringtoets.Integration.Data.Test/Ringtoets.Integration.Data.Test.csproj (.../Ringtoets.Integration.Data.Test.csproj) (revision d1565906db90df7be4365d277d5ff22dc2d77a82) @@ -53,11 +53,8 @@ - - - Index: Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/TreeNodeInfos/AssessmentSectionBaseTreeNodeInfoTest.cs =================================================================== diff -u -r06f9145d8180df7fd26eac086a3f431c181e4d64 -rd1565906db90df7be4365d277d5ff22dc2d77a82 --- Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/TreeNodeInfos/AssessmentSectionBaseTreeNodeInfoTest.cs (.../AssessmentSectionBaseTreeNodeInfoTest.cs) (revision 06f9145d8180df7fd26eac086a3f431c181e4d64) +++ Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/TreeNodeInfos/AssessmentSectionBaseTreeNodeInfoTest.cs (.../AssessmentSectionBaseTreeNodeInfoTest.cs) (revision d1565906db90df7be4365d277d5ff22dc2d77a82) @@ -9,9 +9,9 @@ using NUnit.Framework; using Rhino.Mocks; using Ringtoets.Common.Data; +using Ringtoets.Common.Data.Contribution; using Ringtoets.HydraRing.Forms.PresentationObjects; using Ringtoets.Integration.Data; -using Ringtoets.Integration.Data.Contribution; using Ringtoets.Integration.Forms.PresentationObjects; using Ringtoets.Integration.Plugin; using RingtoetsIntegrationFormsResources = Ringtoets.Integration.Forms.Properties.Resources; Index: Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/TreeNodeInfos/FailureMechanismContributionTreeNodeInfoTest.cs =================================================================== diff -u -r17574077c6720e02c10f23ac3a0354db35855a05 -rd1565906db90df7be4365d277d5ff22dc2d77a82 --- Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/TreeNodeInfos/FailureMechanismContributionTreeNodeInfoTest.cs (.../FailureMechanismContributionTreeNodeInfoTest.cs) (revision 17574077c6720e02c10f23ac3a0354db35855a05) +++ Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/TreeNodeInfos/FailureMechanismContributionTreeNodeInfoTest.cs (.../FailureMechanismContributionTreeNodeInfoTest.cs) (revision d1565906db90df7be4365d277d5ff22dc2d77a82) @@ -5,7 +5,8 @@ using Core.Common.TestUtil; using NUnit.Framework; using Rhino.Mocks; -using Ringtoets.Integration.Data.Contribution; + +using Ringtoets.Common.Data.Contribution; using Ringtoets.Integration.Plugin; using RingtoetsIntegrationFormsResources = Ringtoets.Integration.Forms.Properties.Resources; using RingtoetsIntegrationDataResources = Ringtoets.Integration.Data.Properties.Resources; Index: Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/FailureMechanismContributionViewTest.cs =================================================================== diff -u -r249fd5e4604012895724a9d7df67201332c9e7dc -rd1565906db90df7be4365d277d5ff22dc2d77a82 --- Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/FailureMechanismContributionViewTest.cs (.../FailureMechanismContributionViewTest.cs) (revision 249fd5e4604012895724a9d7df67201332c9e7dc) +++ Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/FailureMechanismContributionViewTest.cs (.../FailureMechanismContributionViewTest.cs) (revision d1565906db90df7be4365d277d5ff22dc2d77a82) @@ -5,7 +5,7 @@ using NUnit.Framework; using Rhino.Mocks; using Ringtoets.Common.Data; -using Ringtoets.Integration.Data.Contribution; +using Ringtoets.Common.Data.Contribution; using Ringtoets.Integration.Forms.Views; namespace Ringtoets.Integration.Forms.Test.Views Index: Ringtoets/Integration/test/Ringtoets.Integration.Plugin.Test/RingtoetsGuiPluginTest.cs =================================================================== diff -u -r79b8577124d89ef4a4bb595fd6c8361b4d8cd194 -rd1565906db90df7be4365d277d5ff22dc2d77a82 --- Ringtoets/Integration/test/Ringtoets.Integration.Plugin.Test/RingtoetsGuiPluginTest.cs (.../RingtoetsGuiPluginTest.cs) (revision 79b8577124d89ef4a4bb595fd6c8361b4d8cd194) +++ Ringtoets/Integration/test/Ringtoets.Integration.Plugin.Test/RingtoetsGuiPluginTest.cs (.../RingtoetsGuiPluginTest.cs) (revision d1565906db90df7be4365d277d5ff22dc2d77a82) @@ -8,11 +8,12 @@ using Core.Common.TestUtil; using NUnit.Framework; using Rhino.Mocks; + +using Ringtoets.Common.Data.Contribution; using Ringtoets.Common.Forms.PresentationObjects; using Ringtoets.Common.Placeholder; using Ringtoets.HydraRing.Forms.PresentationObjects; using Ringtoets.Integration.Data; -using Ringtoets.Integration.Data.Contribution; using Ringtoets.Integration.Data.Placeholders; using Ringtoets.Integration.Forms.PresentationObjects; using Ringtoets.Integration.Forms.PropertyClasses;