Index: Riskeer/ClosingStructures/src/Riskeer.ClosingStructures.Plugin/ClosingStructuresPlugin.cs =================================================================== diff -u -rbb831b80442c0389546ce12572e24c795e0f6df6 -rd4fb475f3f6e36b919118b6c1ed100ce45dbf356 --- Riskeer/ClosingStructures/src/Riskeer.ClosingStructures.Plugin/ClosingStructuresPlugin.cs (.../ClosingStructuresPlugin.cs) (revision bb831b80442c0389546ce12572e24c795e0f6df6) +++ Riskeer/ClosingStructures/src/Riskeer.ClosingStructures.Plugin/ClosingStructuresPlugin.cs (.../ClosingStructuresPlugin.cs) (revision d4fb475f3f6e36b919118b6c1ed100ce45dbf356) @@ -865,10 +865,10 @@ #region Helpers - private ClearIllustrationPointsOfStructureCalculationCollectionChangeHandler CreateChangeHandler( + private ClearIllustrationPointsOfStructureCalculationCollectionChangeHandler CreateChangeHandler( IInquiryHelper inquiryHelper, IEnumerable> calculations) { - return new ClearIllustrationPointsOfStructureCalculationCollectionChangeHandler(inquiryHelper, calculations); + return new ClearIllustrationPointsOfStructureCalculationCollectionChangeHandler(inquiryHelper, calculations); } #endregion Index: Riskeer/Common/src/Riskeer.Common.Forms/ChangeHandlers/ClearIllustrationPointsOfStructureCalculationCollectionChangeHandler.cs =================================================================== diff -u -r54b18502094d399a194f36827816557459c03d4b -rd4fb475f3f6e36b919118b6c1ed100ce45dbf356 --- Riskeer/Common/src/Riskeer.Common.Forms/ChangeHandlers/ClearIllustrationPointsOfStructureCalculationCollectionChangeHandler.cs (.../ClearIllustrationPointsOfStructureCalculationCollectionChangeHandler.cs) (revision 54b18502094d399a194f36827816557459c03d4b) +++ Riskeer/Common/src/Riskeer.Common.Forms/ChangeHandlers/ClearIllustrationPointsOfStructureCalculationCollectionChangeHandler.cs (.../ClearIllustrationPointsOfStructureCalculationCollectionChangeHandler.cs) (revision d4fb475f3f6e36b919118b6c1ed100ce45dbf356) @@ -32,21 +32,19 @@ /// /// Class for handling a collection of structure calculations when its illustration points need to be cleared. /// - /// Object type of the structure calculation input. - public class ClearIllustrationPointsOfStructureCalculationCollectionChangeHandler + public class ClearIllustrationPointsOfStructureCalculationCollectionChangeHandler : ClearIllustrationPointsOfCalculationCollectionChangeHandlerBase - where TStructureInput : IStructuresCalculationInput, new() { - private readonly IEnumerable> calculations; + private readonly IEnumerable calculations; /// - /// Creates a new instance of . + /// Creates a new instance of . /// /// Object responsible for inquiring the required data. /// The calculations for which the illustration points should be cleared for. /// Thrown when any parameter is null. public ClearIllustrationPointsOfStructureCalculationCollectionChangeHandler(IInquiryHelper inquiryHelper, - IEnumerable> calculations) + IEnumerable calculations) : base(inquiryHelper, Resources.ClearIllustrationPointsCalculationCollection_Inquiry) { if (calculations == null) Index: Riskeer/Common/src/Riskeer.Common.Service/RiskeerCommonDataSynchronizationService.cs =================================================================== diff -u -r54b18502094d399a194f36827816557459c03d4b -rd4fb475f3f6e36b919118b6c1ed100ce45dbf356 --- Riskeer/Common/src/Riskeer.Common.Service/RiskeerCommonDataSynchronizationService.cs (.../RiskeerCommonDataSynchronizationService.cs) (revision 54b18502094d399a194f36827816557459c03d4b) +++ Riskeer/Common/src/Riskeer.Common.Service/RiskeerCommonDataSynchronizationService.cs (.../RiskeerCommonDataSynchronizationService.cs) (revision d4fb475f3f6e36b919118b6c1ed100ce45dbf356) @@ -86,20 +86,18 @@ /// /// Clears the illustration points of the provided structure calculations. /// - /// Object type of the structure calculation input. /// The calculations for which the illustration points need to be cleared. /// All objects changed during the clear. /// Thrown when is null. - public static IEnumerable ClearStructuresCalculationIllustrationPoints(IEnumerable> calculations) - where TStructureInput : IStructuresCalculationInput, new() + public static IEnumerable ClearStructuresCalculationIllustrationPoints(IEnumerable calculations) { if (calculations == null) { throw new ArgumentNullException(nameof(calculations)); } var affectedCalculations = new List(); - foreach (StructuresCalculation calculation in calculations) + foreach (IStructuresCalculation calculation in calculations) { if (calculation.HasOutput && calculation.Output.HasGeneralResult) { Index: Riskeer/Common/src/Riskeer.Common.Util/IllustrationPointsHelper.cs =================================================================== diff -u -r25c7415364b0351b606708154b24d3d47ec19023 -rd4fb475f3f6e36b919118b6c1ed100ce45dbf356 --- Riskeer/Common/src/Riskeer.Common.Util/IllustrationPointsHelper.cs (.../IllustrationPointsHelper.cs) (revision 25c7415364b0351b606708154b24d3d47ec19023) +++ Riskeer/Common/src/Riskeer.Common.Util/IllustrationPointsHelper.cs (.../IllustrationPointsHelper.cs) (revision d4fb475f3f6e36b919118b6c1ed100ce45dbf356) @@ -51,16 +51,14 @@ } /// - /// Determines whether a collection of contain + /// Determines whether a collection of contain /// calculations with illustration point results. /// - /// Object type of the structure calculation input. /// The calculations to check. /// true if contain calculations with /// illustration point results, false otherwise. /// Thrown when is null. - public static bool HasIllustrationPoints(IEnumerable> calculations) - where TStructureInput : IStructuresCalculationInput, new() + public static bool HasIllustrationPoints(IEnumerable calculations) { if (calculations == null) { @@ -71,14 +69,12 @@ } /// - /// Determines whether a has illustration point results. + /// Determines whether a has illustration point results. /// - /// Object type of the structure calculation input. /// The calculation to check. /// true if has illustration point results, false otherwise. /// Thrown when is null. - public static bool HasIllustrationPoints(StructuresCalculation calculation) - where TStructureInput : IStructuresCalculationInput, new() + public static bool HasIllustrationPoints(IStructuresCalculation calculation) { if (calculation == null) { Index: Riskeer/Common/test/Riskeer.Common.Forms.Test/ChangeHandlers/ClearIllustrationPointsOfStructureCalculationCollectionChangeHandlerTest.cs =================================================================== diff -u -r54b18502094d399a194f36827816557459c03d4b -rd4fb475f3f6e36b919118b6c1ed100ce45dbf356 --- Riskeer/Common/test/Riskeer.Common.Forms.Test/ChangeHandlers/ClearIllustrationPointsOfStructureCalculationCollectionChangeHandlerTest.cs (.../ClearIllustrationPointsOfStructureCalculationCollectionChangeHandlerTest.cs) (revision 54b18502094d399a194f36827816557459c03d4b) +++ Riskeer/Common/test/Riskeer.Common.Forms.Test/ChangeHandlers/ClearIllustrationPointsOfStructureCalculationCollectionChangeHandlerTest.cs (.../ClearIllustrationPointsOfStructureCalculationCollectionChangeHandlerTest.cs) (revision d4fb475f3f6e36b919118b6c1ed100ce45dbf356) @@ -45,12 +45,13 @@ mocks.ReplayAll(); // Call - TestDelegate call = () => new ClearIllustrationPointsOfStructureCalculationCollectionChangeHandler( + TestDelegate call = () => new ClearIllustrationPointsOfStructureCalculationCollectionChangeHandler( inquiryHelper, null); // Assert var exception = Assert.Throws(call); Assert.AreEqual("calculations", exception.ParamName); + mocks.VerifyAll(); } [Test] @@ -62,11 +63,12 @@ mocks.ReplayAll(); // Call - var handler = new ClearIllustrationPointsOfStructureCalculationCollectionChangeHandler( + var handler = new ClearIllustrationPointsOfStructureCalculationCollectionChangeHandler( inquiryHelper, Enumerable.Empty()); // Assert Assert.IsInstanceOf(handler); + mocks.VerifyAll(); } [Test] @@ -81,15 +83,15 @@ inquiryHelper.Expect(h => h.InquireContinuation("Weet u zeker dat u alle illustratiepunten wilt wissen?")).Return(expectedConfirmation); mocks.ReplayAll(); - var handler = new ClearIllustrationPointsOfStructureCalculationCollectionChangeHandler( + var handler = new ClearIllustrationPointsOfStructureCalculationCollectionChangeHandler( inquiryHelper, Enumerable.Empty()); // Call bool confirmation = handler.InquireConfirmation(); // Assert Assert.AreEqual(expectedConfirmation, confirmation); - mocks.ReplayAll(); + mocks.VerifyAll(); } [Test] @@ -123,7 +125,7 @@ calculationWithOutput.Attach(calculationWithoutIllustrationPointsObserver); mocks.ReplayAll(); - var handler = new ClearIllustrationPointsOfStructureCalculationCollectionChangeHandler(inquiryHelper, calculations); + var handler = new ClearIllustrationPointsOfStructureCalculationCollectionChangeHandler(inquiryHelper, calculations); // Call IEnumerable affectedObjects = handler.ClearIllustrationPoints(); Index: Riskeer/Common/test/Riskeer.Common.Service.Test/RiskeerCommonDataSynchronizationServiceTest.cs =================================================================== diff -u -r54b18502094d399a194f36827816557459c03d4b -rd4fb475f3f6e36b919118b6c1ed100ce45dbf356 --- Riskeer/Common/test/Riskeer.Common.Service.Test/RiskeerCommonDataSynchronizationServiceTest.cs (.../RiskeerCommonDataSynchronizationServiceTest.cs) (revision 54b18502094d399a194f36827816557459c03d4b) +++ Riskeer/Common/test/Riskeer.Common.Service.Test/RiskeerCommonDataSynchronizationServiceTest.cs (.../RiskeerCommonDataSynchronizationServiceTest.cs) (revision d4fb475f3f6e36b919118b6c1ed100ce45dbf356) @@ -170,7 +170,7 @@ public void ClearStructuresCalculationIllustrationPoints_CalculationsNull_ThrowsArgumentNullException() { // Call - TestDelegate call = () => RiskeerCommonDataSynchronizationService.ClearStructuresCalculationIllustrationPoints(null); + TestDelegate call = () => RiskeerCommonDataSynchronizationService.ClearStructuresCalculationIllustrationPoints(null); // Assert var exception = Assert.Throws(call); Index: Riskeer/Common/test/Riskeer.Common.Util.Test/IllustrationPointsHelperTest.cs =================================================================== diff -u -r25c7415364b0351b606708154b24d3d47ec19023 -rd4fb475f3f6e36b919118b6c1ed100ce45dbf356 --- Riskeer/Common/test/Riskeer.Common.Util.Test/IllustrationPointsHelperTest.cs (.../IllustrationPointsHelperTest.cs) (revision 25c7415364b0351b606708154b24d3d47ec19023) +++ Riskeer/Common/test/Riskeer.Common.Util.Test/IllustrationPointsHelperTest.cs (.../IllustrationPointsHelperTest.cs) (revision d4fb475f3f6e36b919118b6c1ed100ce45dbf356) @@ -36,7 +36,7 @@ public void HasIllustrationPoints_HydraulicBoundaryLocationCalculationsNull_ThrowsArgumentNullException() { // Call - TestDelegate call = () => IllustrationPointsHelper.HasIllustrationPoints(null); + TestDelegate call = () => IllustrationPointsHelper.HasIllustrationPoints((IEnumerable) null); // Assert var exception = Assert.Throws(call); Index: Riskeer/HeightStructures/src/Riskeer.HeightStructures.Plugin/HeightStructuresPlugin.cs =================================================================== diff -u -rbb831b80442c0389546ce12572e24c795e0f6df6 -rd4fb475f3f6e36b919118b6c1ed100ce45dbf356 --- Riskeer/HeightStructures/src/Riskeer.HeightStructures.Plugin/HeightStructuresPlugin.cs (.../HeightStructuresPlugin.cs) (revision bb831b80442c0389546ce12572e24c795e0f6df6) +++ Riskeer/HeightStructures/src/Riskeer.HeightStructures.Plugin/HeightStructuresPlugin.cs (.../HeightStructuresPlugin.cs) (revision d4fb475f3f6e36b919118b6c1ed100ce45dbf356) @@ -876,10 +876,10 @@ #region Helpers - private ClearIllustrationPointsOfStructureCalculationCollectionChangeHandler CreateChangeHandler( + private ClearIllustrationPointsOfStructureCalculationCollectionChangeHandler CreateChangeHandler( IInquiryHelper inquiryHelper, IEnumerable> calculations) { - return new ClearIllustrationPointsOfStructureCalculationCollectionChangeHandler(inquiryHelper, calculations); + return new ClearIllustrationPointsOfStructureCalculationCollectionChangeHandler(inquiryHelper, calculations); } #endregion Index: Riskeer/StabilityPointStructures/src/Riskeer.StabilityPointStructures.Plugin/StabilityPointStructuresPlugin.cs =================================================================== diff -u -rbb831b80442c0389546ce12572e24c795e0f6df6 -rd4fb475f3f6e36b919118b6c1ed100ce45dbf356 --- Riskeer/StabilityPointStructures/src/Riskeer.StabilityPointStructures.Plugin/StabilityPointStructuresPlugin.cs (.../StabilityPointStructuresPlugin.cs) (revision bb831b80442c0389546ce12572e24c795e0f6df6) +++ Riskeer/StabilityPointStructures/src/Riskeer.StabilityPointStructures.Plugin/StabilityPointStructuresPlugin.cs (.../StabilityPointStructuresPlugin.cs) (revision d4fb475f3f6e36b919118b6c1ed100ce45dbf356) @@ -879,10 +879,10 @@ #region Helpers - private ClearIllustrationPointsOfStructureCalculationCollectionChangeHandler CreateChangeHandler( + private ClearIllustrationPointsOfStructureCalculationCollectionChangeHandler CreateChangeHandler( IInquiryHelper inquiryHelper, IEnumerable> calculations) { - return new ClearIllustrationPointsOfStructureCalculationCollectionChangeHandler(inquiryHelper, calculations); + return new ClearIllustrationPointsOfStructureCalculationCollectionChangeHandler(inquiryHelper, calculations); } #endregion