Index: Riskeer/Integration/test/Riskeer.Integration.Plugin.Test/Handlers/AssessmentSectionCompositionChangeHandlerTest.cs =================================================================== diff -u -r1d0a59ccf8855747a93312e38b76f4a493fb78ba -r4cf3be94771c4d444c92c3d154407f0581c60674 --- Riskeer/Integration/test/Riskeer.Integration.Plugin.Test/Handlers/AssessmentSectionCompositionChangeHandlerTest.cs (.../AssessmentSectionCompositionChangeHandlerTest.cs) (revision 1d0a59ccf8855747a93312e38b76f4a493fb78ba) +++ Riskeer/Integration/test/Riskeer.Integration.Plugin.Test/Handlers/AssessmentSectionCompositionChangeHandlerTest.cs (.../AssessmentSectionCompositionChangeHandlerTest.cs) (revision 4cf3be94771c4d444c92c3d154407f0581c60674) @@ -30,12 +30,10 @@ using Riskeer.Common.Data.AssessmentSection; using Riskeer.Common.Data.Calculation; using Riskeer.Common.Data.FailureMechanism; -using Riskeer.Common.Data.Hydraulics; using Riskeer.DuneErosion.Data; using Riskeer.DuneErosion.Data.TestUtil; using Riskeer.GrassCoverErosionInwards.Data; using Riskeer.GrassCoverErosionOutwards.Data; -using Riskeer.GrassCoverErosionOutwards.Data.TestUtil; using Riskeer.HeightStructures.Data; using Riskeer.Integration.Data; using Riskeer.Integration.Forms.PropertyClasses; @@ -160,10 +158,6 @@ .Concat(assessmentSection.DuneErosion.CalculationsForFactorizedLowerLimitNorm.Where(HasDuneLocationCalculationOutput)) .ToArray(); - GrassCoverErosionOutwardsFailureMechanism failureMechanism = assessmentSection.GrassCoverErosionOutwards; - IEnumerable hydraulicBoundaryLocationCalculationsWithOutput = - GrassCoverErosionOutwardsHydraulicBoundaryLocationsTestHelper.GetAllHydraulicBoundaryLocationCalculationsWithOutput(failureMechanism); - var handler = new AssessmentSectionCompositionChangeHandler(); // Call @@ -174,7 +168,6 @@ "All calculations that had output still have them."); Assert.True(duneLocationCalculationsWithOutput.All(HasDuneLocationCalculationOutput)); - Assert.True(hydraulicBoundaryLocationCalculationsWithOutput.All(calc => calc.HasOutput)); CollectionAssert.IsEmpty(affectedObjects); } @@ -193,10 +186,8 @@ .Where(calc => calc.HasOutput) .ToArray(); - GrassCoverErosionOutwardsFailureMechanism grassCoverErosionOutwardsFailureMechanism = assessmentSection.GrassCoverErosionOutwards; DuneErosionFailureMechanism duneErosionFailureMechanism = assessmentSection.DuneErosion; IEnumerable expectedAffectedObjects = GetAllAffectedDuneLocationCalculations(duneErosionFailureMechanism) - .Concat(GetAllAffectedGrassCoverErosionOutwardsCalculations(grassCoverErosionOutwardsFailureMechanism)) .Concat(new IObservable[] { assessmentSection @@ -224,7 +215,6 @@ AssertCorrectOutputClearedWhenCompositionDune(unaffectedObjects, assessmentSection); CollectionAssert.IsSubsetOf(expectedAffectedObjects, affectedObjects); - GrassCoverErosionOutwardsHydraulicBoundaryLocationsTestHelper.AssertHydraulicBoundaryLocationCalculationsHaveNoOutputs(grassCoverErosionOutwardsFailureMechanism); DuneLocationsTestHelper.AssertDuneLocationCalculationsHaveNoOutputs(duneErosionFailureMechanism); } @@ -244,10 +234,6 @@ .Where(calc => calc.HasOutput) .ToArray(); - GrassCoverErosionOutwardsFailureMechanism grassCoverErosionOutwardsFailureMechanism = assessmentSection.GrassCoverErosionOutwards; - IEnumerable hydraulicBoundaryLocationCalculationsWithOutput = - GrassCoverErosionOutwardsHydraulicBoundaryLocationsTestHelper.GetAllHydraulicBoundaryLocationCalculationsWithOutput(grassCoverErosionOutwardsFailureMechanism); - DuneErosionFailureMechanism duneErosionFailureMechanism = assessmentSection.DuneErosion; IEnumerable expectedAffectedObjects = GetAllAffectedDuneLocationCalculations(duneErosionFailureMechanism) .Concat(new IObservable[] @@ -271,7 +257,6 @@ CollectionAssert.IsSubsetOf(expectedAffectedObjects, affectedObjects); AssertOutputNotCleared(expectedUnaffectedObjects, assessmentSection.GetFailureMechanisms()); - Assert.IsTrue(hydraulicBoundaryLocationCalculationsWithOutput.All(c => c.HasOutput)); DuneLocationsTestHelper.AssertDuneLocationCalculationsHaveNoOutputs(duneErosionFailureMechanism); } @@ -284,11 +269,9 @@ // Setup AssessmentSection assessmentSection = TestDataGenerator.GetAssessmentSectionWithAllCalculationConfigurationsWithoutCalculationOutput(oldComposition); - GrassCoverErosionOutwardsFailureMechanism grassCoverErosionOutwardsFailureMechanism = assessmentSection.GrassCoverErosionOutwards; DuneErosionFailureMechanism duneErosionFailureMechanism = assessmentSection.DuneErosion; IEnumerable expectedAffectedObjects = GetAllAffectedDuneLocationCalculations(duneErosionFailureMechanism) - .Concat(GetAllAffectedGrassCoverErosionOutwardsCalculations(grassCoverErosionOutwardsFailureMechanism)) .Concat(new IObservable[] { assessmentSection @@ -310,7 +293,6 @@ Assert.AreEqual(newComposition, assessmentSection.Composition); Assert.True(assessmentSection.GetFailureMechanisms().SelectMany(fm => fm.Calculations).All(c => !c.HasOutput)); CollectionAssert.IsSubsetOf(expectedAffectedObjects, affectedObjects); - GrassCoverErosionOutwardsHydraulicBoundaryLocationsTestHelper.AssertHydraulicBoundaryLocationCalculationsHaveNoOutputs(grassCoverErosionOutwardsFailureMechanism); DuneLocationsTestHelper.AssertDuneLocationCalculationsHaveNoOutputs(duneErosionFailureMechanism); } @@ -323,10 +305,6 @@ // Setup AssessmentSection assessmentSection = TestDataGenerator.GetAssessmentSectionWithAllCalculationConfigurationsWithoutCalculationOutput(oldComposition); - GrassCoverErosionOutwardsFailureMechanism failureMechanism = assessmentSection.GrassCoverErosionOutwards; - IEnumerable hydraulicBoundaryLocationCalculationsWithOutput = - GrassCoverErosionOutwardsHydraulicBoundaryLocationsTestHelper.GetAllHydraulicBoundaryLocationCalculationsWithOutput(failureMechanism); - DuneErosionFailureMechanism duneErosionFailureMechanism = assessmentSection.DuneErosion; IEnumerable expectedAffectedObjects = GetAllAffectedDuneLocationCalculations(duneErosionFailureMechanism).Concat(new IObservable[] @@ -348,7 +326,6 @@ Assert.True(assessmentSection.GetFailureMechanisms().SelectMany(fm => fm.Calculations).All(c => !c.HasOutput)); CollectionAssert.IsSubsetOf(expectedAffectedObjects, affectedObjects); - Assert.IsTrue(hydraulicBoundaryLocationCalculationsWithOutput.All(calc => calc.HasOutput)); DuneLocationsTestHelper.AssertDuneLocationCalculationsHaveNoOutputs(duneErosionFailureMechanism); } @@ -474,15 +451,6 @@ AssertOutputNotCleared(unaffectedObjects, GetDuneIrrelevantFailureMechanisms(assessmentSection)); } - #region Grass Cover Erosion Outwards failure mechanism helpers - - private static IEnumerable GetAllAffectedGrassCoverErosionOutwardsCalculations(GrassCoverErosionOutwardsFailureMechanism failureMechanism) - { - return GrassCoverErosionOutwardsHydraulicBoundaryLocationsTestHelper.GetAllHydraulicBoundaryLocationCalculationsWithOutput(failureMechanism); - } - - #endregion - #region Dune Erosion failure mechanism helpers private static IEnumerable GetAllAffectedDuneLocationCalculations(DuneErosionFailureMechanism failureMechanism)