Index: Ringtoets/WaveImpactAsphaltCover/test/Ringtoets.WaveImpactAsphaltCover.Plugin.Test/TreeNodeInfos/WaveImpactAsphaltCoverFailureMechanismContextTreeNodeInfoTest.cs =================================================================== diff -u -r4fc2d8aef4716a3b5c6fb5944fec5769ffdf2ba3 -re973ab8c1e544eed031185ca91fc738297d8b08d --- Ringtoets/WaveImpactAsphaltCover/test/Ringtoets.WaveImpactAsphaltCover.Plugin.Test/TreeNodeInfos/WaveImpactAsphaltCoverFailureMechanismContextTreeNodeInfoTest.cs (.../WaveImpactAsphaltCoverFailureMechanismContextTreeNodeInfoTest.cs) (revision 4fc2d8aef4716a3b5c6fb5944fec5769ffdf2ba3) +++ Ringtoets/WaveImpactAsphaltCover/test/Ringtoets.WaveImpactAsphaltCover.Plugin.Test/TreeNodeInfos/WaveImpactAsphaltCoverFailureMechanismContextTreeNodeInfoTest.cs (.../WaveImpactAsphaltCoverFailureMechanismContextTreeNodeInfoTest.cs) (revision e973ab8c1e544eed031185ca91fc738297d8b08d) @@ -1,4 +1,4 @@ -// Copyright (C) Stichting Deltares 2017. All rights reserved. +// Copyright (C) Stichting Deltares 2018. All rights reserved. // // This file is part of Ringtoets. // @@ -35,7 +35,6 @@ using Core.Common.TestUtil; using NUnit.Framework; using Rhino.Mocks; -using Ringtoets.AssemblyTool.KernelWrapper.Calculators; using Ringtoets.AssemblyTool.KernelWrapper.TestUtil.Calculators; using Ringtoets.AssemblyTool.KernelWrapper.TestUtil.Calculators.Categories; using Ringtoets.Common.Data; @@ -44,11 +43,14 @@ using Ringtoets.Common.Data.Hydraulics; using Ringtoets.Common.Data.TestUtil; using Ringtoets.Common.Forms.PresentationObjects; +using Ringtoets.Common.Service.TestUtil; using Ringtoets.HydraRing.Calculation.Calculator.Factory; +using Ringtoets.HydraRing.Calculation.Data.Input; using Ringtoets.HydraRing.Calculation.TestUtil.Calculator; using Ringtoets.Revetment.Data; using Ringtoets.WaveImpactAsphaltCover.Data; using Ringtoets.WaveImpactAsphaltCover.Forms.PresentationObjects; +using Riskeer.AssemblyTool.KernelWrapper.Calculators; using RingtoetsCommonFormsResources = Ringtoets.Common.Forms.Properties.Resources; namespace Ringtoets.WaveImpactAsphaltCover.Plugin.Test.TreeNodeInfos @@ -100,7 +102,7 @@ Assert.IsNull(info.CanRemove); Assert.IsNull(info.OnNodeRemoved); Assert.IsNull(info.CanCheck); - Assert.IsNull(info.IsChecked); + Assert.IsNull(info.CheckedState); Assert.IsNull(info.OnNodeChecked); Assert.IsNull(info.CanDrag); Assert.IsNull(info.CanDrop); @@ -242,7 +244,7 @@ AssemblyCategoriesCalculatorStub calculator = calculatorFactory.LastCreatedAssemblyCategoriesCalculator; failureMechanismAssemblyCategoriesContext.GetFailureMechanismSectionAssemblyCategoriesFunc(); - Assert.AreEqual(failureMechanism.GeneralWaveImpactAsphaltCoverInput.N, calculator.AssemblyCategoriesInput.N); + Assert.AreEqual(failureMechanism.GeneralWaveImpactAsphaltCoverInput.GetN(assessmentSection.ReferenceLine.Length), calculator.AssemblyCategoriesInput.N); } var failureMechanismResultsContext = (FailureMechanismSectionResultContext) outputsFolder.Contents.ElementAt(1); @@ -578,8 +580,16 @@ gui.Stub(g => g.MainWindow).Return(mainWindow); var calculatorFactory = mocks.Stub(); - calculatorFactory.Expect(cf => cf.CreateWaveConditionsCosineCalculator(Path.GetDirectoryName(validFilePath), string.Empty)) - .Return(new TestWaveConditionsCosineCalculator()).Repeat.Times(6); + calculatorFactory.Expect(cf => cf.CreateWaveConditionsCosineCalculator(Arg.Is.NotNull)) + .WhenCalled(invocation => + { + HydraRingCalculationSettingsTestHelper.AssertHydraRingCalculationSettings( + HydraulicBoundaryCalculationSettingsFactory.CreateSettings(assessmentSection.HydraulicBoundaryDatabase), + (HydraRingCalculationSettings) invocation.Arguments[0]); + }) + .Return(new TestWaveConditionsCosineCalculator()) + .Repeat + .Times(6); mocks.ReplayAll(); plugin.Gui = gui; @@ -612,7 +622,8 @@ } } }; - + HydraulicBoundaryDatabaseTestHelper.SetHydraulicBoundaryLocationConfigurationSettings(assessmentSection.HydraulicBoundaryDatabase); + assessmentSection.SetHydraulicBoundaryLocationCalculations(new[] { hydraulicBoundaryLocation