Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Service.Test/MacroStabilityInwardsCalculationActivityFactoryTest.cs =================================================================== diff -u -r196132a34bd868c97c81f00f35904f29055f4512 -rd088de29dabf3bcca2e68c766745ef6b5fc62050 --- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Service.Test/MacroStabilityInwardsCalculationActivityFactoryTest.cs (.../MacroStabilityInwardsCalculationActivityFactoryTest.cs) (revision 196132a34bd868c97c81f00f35904f29055f4512) +++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Service.Test/MacroStabilityInwardsCalculationActivityFactoryTest.cs (.../MacroStabilityInwardsCalculationActivityFactoryTest.cs) (revision d088de29dabf3bcca2e68c766745ef6b5fc62050) @@ -28,6 +28,7 @@ using Rhino.Mocks; using Ringtoets.Common.Data.AssessmentSection; using Ringtoets.Common.Data.Calculation; +using Ringtoets.Common.Data.Contribution; using Ringtoets.Common.Data.Hydraulics; using Ringtoets.Common.Data.TestUtil; using Ringtoets.Common.Service; @@ -78,7 +79,13 @@ { // Setup var hydraulicBoundaryLocation = new TestHydraulicBoundaryLocation(); - var assessmentSection = new AssessmentSectionStub(); + var assessmentSection = new AssessmentSectionStub + { + FailureMechanismContribution = + { + NormativeNorm = NormType.LowerLimit + } + }; assessmentSection.SetHydraulicBoundaryLocationCalculations(new[] { hydraulicBoundaryLocation @@ -134,7 +141,13 @@ var hydraulicBoundaryLocation1 = new TestHydraulicBoundaryLocation(); var hydraulicBoundaryLocation2 = new TestHydraulicBoundaryLocation(); - var assessmentSection = new AssessmentSectionStub(); + var assessmentSection = new AssessmentSectionStub + { + FailureMechanismContribution = + { + NormativeNorm = NormType.LowerLimit + } + }; assessmentSection.SetHydraulicBoundaryLocationCalculations(new[] { hydraulicBoundaryLocation1, @@ -167,6 +180,8 @@ // Assert CollectionAssert.AllItemsAreInstancesOfType(activities, typeof(MacroStabilityInwardsCalculationActivity)); + Assert.AreEqual(2, activities.Count()); + AssertMacroStabilityInwardsCalculationActivity(activities.First(), calculation1, hydraulicBoundaryLocationCalculation1); AssertMacroStabilityInwardsCalculationActivity(activities.ElementAt(1), calculation2, hydraulicBoundaryLocationCalculation2); } @@ -206,7 +221,13 @@ var hydraulicBoundaryLocation1 = new TestHydraulicBoundaryLocation(); var hydraulicBoundaryLocation2 = new TestHydraulicBoundaryLocation(); - var assessmentSection = new AssessmentSectionStub(); + var assessmentSection = new AssessmentSectionStub + { + FailureMechanismContribution = + { + NormativeNorm = NormType.LowerLimit + } + }; assessmentSection.SetHydraulicBoundaryLocationCalculations(new[] { hydraulicBoundaryLocation1, @@ -237,6 +258,8 @@ // Assert CollectionAssert.AllItemsAreInstancesOfType(activities, typeof(MacroStabilityInwardsCalculationActivity)); + Assert.AreEqual(2, activities.Count()); + AssertMacroStabilityInwardsCalculationActivity(activities.First(), calculation1, hydraulicBoundaryLocationCalculation1); AssertMacroStabilityInwardsCalculationActivity(activities.ElementAt(1), calculation2, hydraulicBoundaryLocationCalculation2); } @@ -255,6 +278,7 @@ using (new MacroStabilityInwardsCalculatorFactoryConfig()) { activity.Run(); + var testFactory = (TestMacroStabilityInwardsCalculatorFactory) MacroStabilityInwardsCalculatorFactory.Instance; UpliftVanCalculatorInput upliftVanCalculatorInput = testFactory.LastCreatedUpliftVanCalculator.Input;