Index: Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Forms.Test/TreeNodeInfos/ClosingStructureFailureMechanismContextTreeNodeInfoTest.cs =================================================================== diff -u -r36b3511af84b8ca722697aa64164ee009486f243 -rbae9328136bb33f3827192d07115f5512fa7bc32 --- Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Forms.Test/TreeNodeInfos/ClosingStructureFailureMechanismContextTreeNodeInfoTest.cs (.../ClosingStructureFailureMechanismContextTreeNodeInfoTest.cs) (revision 36b3511af84b8ca722697aa64164ee009486f243) +++ Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Forms.Test/TreeNodeInfos/ClosingStructureFailureMechanismContextTreeNodeInfoTest.cs (.../ClosingStructureFailureMechanismContextTreeNodeInfoTest.cs) (revision bae9328136bb33f3827192d07115f5512fa7bc32) @@ -43,6 +43,7 @@ using Ringtoets.Common.Data.FailureMechanism; using Ringtoets.Common.Data.Structures; using Ringtoets.Common.Forms.PresentationObjects; +using Ringtoets.HydraRing.Calculation.TestUtil.Calculator; using Ringtoets.HydraRing.Data; using CoreCommonGuiResources = Core.Common.Gui.Properties.Resources; using RingtoetsCommonFormsResources = Ringtoets.Common.Forms.Properties.Resources; @@ -610,15 +611,15 @@ Name = "A", InputParameters = { - HydraulicBoundaryLocation = new HydraulicBoundaryLocation(-1, "nonExisting", 1, 2), + HydraulicBoundaryLocation = new HydraulicBoundaryLocation(-1, "nonExisting", 1, 2) } }); failureMechanism.CalculationsGroup.Children.Add(new TestClosingStructuresCalculation { Name = "B", InputParameters = { - HydraulicBoundaryLocation = new HydraulicBoundaryLocation(-1, "nonExisting", 1, 2), + HydraulicBoundaryLocation = new HydraulicBoundaryLocation(-1, "nonExisting", 1, 2) } }); @@ -647,30 +648,27 @@ }; using (var contextMenu = info.ContextMenuStrip(failureMechanismContext, null, treeViewControl)) + using (new HydraRingCalculatorFactoryConfig()) { // Call TestHelper.AssertLogMessages(() => contextMenu.Items[contextMenuCalculateAllIndex].PerformClick(), messages => { var messageList = messages.ToList(); // Assert - Assert.AreEqual(14, messageList.Count); + Assert.AreEqual(12, messageList.Count); StringAssert.StartsWith("Validatie van 'A' gestart om: ", messageList[0]); StringAssert.StartsWith("Validatie van 'A' beëindigd om: ", messageList[1]); StringAssert.StartsWith("Berekening van 'A' gestart om: ", messageList[2]); - StringAssert.StartsWith("De berekening voor kunstwerk sluiten 'A' is niet gelukt. Bekijk het foutrapport door op details te klikken.", - messageList[3]); - StringAssert.StartsWith("Betrouwbaarheid sluiting kunstwerk berekening is uitgevoerd op de tijdelijke locatie:", messageList[4]); - StringAssert.StartsWith("Berekening van 'A' beëindigd om: ", messageList[5]); - StringAssert.StartsWith("Validatie van 'B' gestart om: ", messageList[6]); - StringAssert.StartsWith("Validatie van 'B' beëindigd om: ", messageList[7]); - StringAssert.StartsWith("Berekening van 'B' gestart om: ", messageList[8]); - StringAssert.StartsWith("De berekening voor kunstwerk sluiten 'B' is niet gelukt. Bekijk het foutrapport door op details te klikken.", - messageList[9]); - StringAssert.StartsWith("Betrouwbaarheid sluiting kunstwerk berekening is uitgevoerd op de tijdelijke locatie:", messageList[10]); - StringAssert.StartsWith("Berekening van 'B' beëindigd om: ", messageList[11]); - Assert.AreEqual("Uitvoeren van 'A' is mislukt.", messageList[12]); - Assert.AreEqual("Uitvoeren van 'B' is mislukt.", messageList[13]); + StringAssert.StartsWith("Betrouwbaarheid sluiting kunstwerk berekening is uitgevoerd op de tijdelijke locatie:", messageList[3]); + StringAssert.StartsWith("Berekening van 'A' beëindigd om: ", messageList[4]); + StringAssert.StartsWith("Validatie van 'B' gestart om: ", messageList[5]); + StringAssert.StartsWith("Validatie van 'B' beëindigd om: ", messageList[6]); + StringAssert.StartsWith("Berekening van 'B' gestart om: ", messageList[7]); + StringAssert.StartsWith("Betrouwbaarheid sluiting kunstwerk berekening is uitgevoerd op de tijdelijke locatie:", messageList[8]); + StringAssert.StartsWith("Berekening van 'B' beëindigd om: ", messageList[9]); + Assert.AreEqual("Uitvoeren van 'A' is mislukt.", messageList[10]); + Assert.AreEqual("Uitvoeren van 'B' is mislukt.", messageList[11]); }); } } @@ -686,20 +684,20 @@ new Point2D(0, 0) }); failureMechanism.AddSection(section); - failureMechanism.CalculationsGroup.Children.Add(new TestClosingStructuresCalculation() + failureMechanism.CalculationsGroup.Children.Add(new TestClosingStructuresCalculation { Name = "A", InputParameters = { - HydraulicBoundaryLocation = new HydraulicBoundaryLocation(-1, "nonExisting", 1, 2), + HydraulicBoundaryLocation = new HydraulicBoundaryLocation(-1, "nonExisting", 1, 2) } }); - failureMechanism.CalculationsGroup.Children.Add(new TestClosingStructuresCalculation() + failureMechanism.CalculationsGroup.Children.Add(new TestClosingStructuresCalculation { Name = "B", InputParameters = { - HydraulicBoundaryLocation = new HydraulicBoundaryLocation(-1, "nonExisting", 1, 2), + HydraulicBoundaryLocation = new HydraulicBoundaryLocation(-1, "nonExisting", 1, 2) } }); Index: Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Forms.Test/TreeNodeInfos/ClosingStructuresCalculationContextTreeNodeInfoTest.cs =================================================================== diff -u -rbd73023d5f8926a411da214fb5ce522056a0e30a -rbae9328136bb33f3827192d07115f5512fa7bc32 --- Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Forms.Test/TreeNodeInfos/ClosingStructuresCalculationContextTreeNodeInfoTest.cs (.../ClosingStructuresCalculationContextTreeNodeInfoTest.cs) (revision bd73023d5f8926a411da214fb5ce522056a0e30a) +++ Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Forms.Test/TreeNodeInfos/ClosingStructuresCalculationContextTreeNodeInfoTest.cs (.../ClosingStructuresCalculationContextTreeNodeInfoTest.cs) (revision bae9328136bb33f3827192d07115f5512fa7bc32) @@ -45,6 +45,8 @@ using Ringtoets.Common.Data.Probability; using Ringtoets.Common.Data.Structures; using Ringtoets.Common.Forms.PresentationObjects; +using Ringtoets.HydraRing.Calculation.Calculator.Factory; +using Ringtoets.HydraRing.Calculation.TestUtil.Calculator; using Ringtoets.HydraRing.Data; using RingtoetsCommonFormsResources = Ringtoets.Common.Forms.Properties.Resources; using RingtoetsCommonServicesResources = Ringtoets.Common.Service.Properties.Resources; @@ -69,7 +71,7 @@ { mocks = new MockRepository(); guiMock = mocks.Stub(); - plugin = new ClosingStructuresPlugin() + plugin = new ClosingStructuresPlugin { Gui = guiMock }; @@ -439,7 +441,7 @@ } [Test] - public void GivenCalculationWithNonExistingLocationId_WhenCalculatingFromContextMenuFails_ThenOutputClearedLogMessagesAddedAndUpdateObserver() + public void GivenCalculationThatEndsInFailure_WhenCalculatingFromContextMenuFails_ThenOutputClearedLogMessagesAddedAndUpdateObserver() { // Given var mainWindow = mocks.Stub(); @@ -468,12 +470,12 @@ var assessmentSectionStub = mocks.Stub(); assessmentSectionStub.HydraulicBoundaryDatabase = hydraulicBoundaryDatabase; - var calculation = new TestClosingStructuresCalculation() + var calculation = new TestClosingStructuresCalculation { Output = new ProbabilityAssessmentOutput(double.NaN, double.NaN, double.NaN, double.NaN, double.NaN), InputParameters = { - HydraulicBoundaryLocation = hydraulicBoundaryLocation, + HydraulicBoundaryLocation = hydraulicBoundaryLocation } }; @@ -496,7 +498,11 @@ }; using (ContextMenuStrip contextMenuStrip = info.ContextMenuStrip(calculationContext, null, treeViewControl)) + using (new HydraRingCalculatorFactoryConfig()) { + var calculator = ((TestHydraRingCalculatorFactory) HydraRingCalculatorFactory.Instance).StructuresClosureCalculator; + calculator.EndInFailure = true; + // When Action action = () => contextMenuStrip.Items[contextMenuCalculateIndex].PerformClick(); @@ -546,11 +552,11 @@ var assessmentSectionStub = mocks.Stub(); - var calculation = new TestClosingStructuresCalculation() + var calculation = new TestClosingStructuresCalculation { InputParameters = { - HydraulicBoundaryLocation = hydraulicBoundaryLocation, + HydraulicBoundaryLocation = hydraulicBoundaryLocation } }; Index: Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Forms.Test/TreeNodeInfos/ClosingStructuresCalculationGroupContextTreeNodeInfoTest.cs =================================================================== diff -u -rce5d60b8a5c520faec45cce64de6957dce747449 -rbae9328136bb33f3827192d07115f5512fa7bc32 --- Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Forms.Test/TreeNodeInfos/ClosingStructuresCalculationGroupContextTreeNodeInfoTest.cs (.../ClosingStructuresCalculationGroupContextTreeNodeInfoTest.cs) (revision ce5d60b8a5c520faec45cce64de6957dce747449) +++ Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Forms.Test/TreeNodeInfos/ClosingStructuresCalculationGroupContextTreeNodeInfoTest.cs (.../ClosingStructuresCalculationGroupContextTreeNodeInfoTest.cs) (revision bae9328136bb33f3827192d07115f5512fa7bc32) @@ -45,6 +45,7 @@ using Ringtoets.Common.Data.Structures; using Ringtoets.Common.Forms; using Ringtoets.Common.Forms.Helpers; +using Ringtoets.HydraRing.Calculation.TestUtil.Calculator; using Ringtoets.HydraRing.Data; using RingtoetsCommonFormsResources = Ringtoets.Common.Forms.Properties.Resources; @@ -78,7 +79,7 @@ { mocks = new MockRepository(); guiMock = mocks.Stub(); - plugin = new ClosingStructuresPlugin() + plugin = new ClosingStructuresPlugin { Gui = guiMock }; @@ -646,7 +647,7 @@ Name = "A", InputParameters = { - HydraulicBoundaryLocation = new HydraulicBoundaryLocation(-1, "nonExisting", 1, 2), + HydraulicBoundaryLocation = new HydraulicBoundaryLocation(-1, "nonExisting", 1, 2) } }); @@ -655,7 +656,7 @@ Name = "B", InputParameters = { - HydraulicBoundaryLocation = new HydraulicBoundaryLocation(-1, "nonExisting", 1, 2), + HydraulicBoundaryLocation = new HydraulicBoundaryLocation(-1, "nonExisting", 1, 2) } }); @@ -687,30 +688,27 @@ }; using (ContextMenuStrip contextMenu = info.ContextMenuStrip(groupContext, null, treeViewControl)) + using (new HydraRingCalculatorFactoryConfig()) { // Call TestHelper.AssertLogMessages(() => contextMenu.Items[contextMenuCalculateAllIndexRootGroup].PerformClick(), messages => { var messageList = messages.ToList(); // Assert - Assert.AreEqual(14, messageList.Count); + Assert.AreEqual(12, messageList.Count); StringAssert.StartsWith("Validatie van 'A' gestart om: ", messageList[0]); StringAssert.StartsWith("Validatie van 'A' beëindigd om: ", messageList[1]); StringAssert.StartsWith("Berekening van 'A' gestart om: ", messageList[2]); - StringAssert.StartsWith("De berekening voor kunstwerk sluiten 'A' is niet gelukt. Bekijk het foutrapport door op details te klikken.", - messageList[3]); - StringAssert.StartsWith("Betrouwbaarheid sluiting kunstwerk berekening is uitgevoerd op de tijdelijke locatie:", messageList[4]); - StringAssert.StartsWith("Berekening van 'A' beëindigd om: ", messageList[5]); - StringAssert.StartsWith("Validatie van 'B' gestart om: ", messageList[6]); - StringAssert.StartsWith("Validatie van 'B' beëindigd om: ", messageList[7]); - StringAssert.StartsWith("Berekening van 'B' gestart om: ", messageList[8]); - StringAssert.StartsWith("De berekening voor kunstwerk sluiten 'B' is niet gelukt. Bekijk het foutrapport door op details te klikken.", - messageList[9]); - StringAssert.StartsWith("Betrouwbaarheid sluiting kunstwerk berekening is uitgevoerd op de tijdelijke locatie:", messageList[10]); - StringAssert.StartsWith("Berekening van 'B' beëindigd om: ", messageList[11]); - Assert.AreEqual("Uitvoeren van 'A' is mislukt.", messageList[12]); - Assert.AreEqual("Uitvoeren van 'B' is mislukt.", messageList[13]); + StringAssert.StartsWith("Betrouwbaarheid sluiting kunstwerk berekening is uitgevoerd op de tijdelijke locatie:", messageList[3]); + StringAssert.StartsWith("Berekening van 'A' beëindigd om: ", messageList[4]); + StringAssert.StartsWith("Validatie van 'B' gestart om: ", messageList[5]); + StringAssert.StartsWith("Validatie van 'B' beëindigd om: ", messageList[6]); + StringAssert.StartsWith("Berekening van 'B' gestart om: ", messageList[7]); + StringAssert.StartsWith("Betrouwbaarheid sluiting kunstwerk berekening is uitgevoerd op de tijdelijke locatie:", messageList[8]); + StringAssert.StartsWith("Berekening van 'B' beëindigd om: ", messageList[9]); + Assert.AreEqual("Uitvoeren van 'A' is mislukt.", messageList[10]); + Assert.AreEqual("Uitvoeren van 'B' is mislukt.", messageList[11]); }); } } @@ -734,7 +732,7 @@ Name = "A", InputParameters = { - HydraulicBoundaryLocation = new HydraulicBoundaryLocation(-1, "nonExisting", 1, 2), + HydraulicBoundaryLocation = new HydraulicBoundaryLocation(-1, "nonExisting", 1, 2) } }); @@ -743,7 +741,7 @@ Name = "B", InputParameters = { - HydraulicBoundaryLocation = new HydraulicBoundaryLocation(-1, "nonExisting", 1, 2), + HydraulicBoundaryLocation = new HydraulicBoundaryLocation(-1, "nonExisting", 1, 2) } }); Index: Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Forms.Test/Ringtoets.GrassCoverErosionInwards.Forms.Test.csproj =================================================================== diff -u -rcb4c5e6cd9a0478a8afe7d653bb7467b3c1a2b4e -rbae9328136bb33f3827192d07115f5512fa7bc32 --- Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Forms.Test/Ringtoets.GrassCoverErosionInwards.Forms.Test.csproj (.../Ringtoets.GrassCoverErosionInwards.Forms.Test.csproj) (revision cb4c5e6cd9a0478a8afe7d653bb7467b3c1a2b4e) +++ Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Forms.Test/Ringtoets.GrassCoverErosionInwards.Forms.Test.csproj (.../Ringtoets.GrassCoverErosionInwards.Forms.Test.csproj) (revision bae9328136bb33f3827192d07115f5512fa7bc32) @@ -161,6 +161,10 @@ {70f8cc9c-5bc8-4fb2-b201-eae7fa8088c2} Ringtoets.HydraRing.Data + + {74CBA865-9338-447F-BAD9-28312446AE84} + Ringtoets.HydraRing.Calculation.TestUtil + {90DE728E-48EF-4665-AB38-3D88E41D9F4D} Ringtoets.GrassCoverErosionInwards.Data Index: Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Forms.Test/TreeNodeInfos/GrassCoverErosionInwardsCalculationContextTreeNodeInfoTest.cs =================================================================== diff -u -r74817f4dbb43aa0346f8b839e59370f786c5d452 -rbae9328136bb33f3827192d07115f5512fa7bc32 --- Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Forms.Test/TreeNodeInfos/GrassCoverErosionInwardsCalculationContextTreeNodeInfoTest.cs (.../GrassCoverErosionInwardsCalculationContextTreeNodeInfoTest.cs) (revision 74817f4dbb43aa0346f8b839e59370f786c5d452) +++ Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Forms.Test/TreeNodeInfos/GrassCoverErosionInwardsCalculationContextTreeNodeInfoTest.cs (.../GrassCoverErosionInwardsCalculationContextTreeNodeInfoTest.cs) (revision bae9328136bb33f3827192d07115f5512fa7bc32) @@ -45,6 +45,8 @@ using Ringtoets.GrassCoverErosionInwards.Data; using Ringtoets.GrassCoverErosionInwards.Forms.PresentationObjects; using Ringtoets.GrassCoverErosionInwards.Plugin; +using Ringtoets.HydraRing.Calculation.Calculator.Factory; +using Ringtoets.HydraRing.Calculation.TestUtil.Calculator; using Ringtoets.HydraRing.Data; using RingtoetsCommonFormsResources = Ringtoets.Common.Forms.Properties.Resources; using RingtoetsCommonServiceResources = Ringtoets.Common.Service.Properties.Resources; @@ -574,7 +576,7 @@ } [Test] - public void GivenCalculationWithNonExistingLocationId_WhenCalculatingFromContextMenu_ThenOutputClearedLogMessagesAddedAndUpdateObserver() + public void GivenCalculationThatEndsInFailure_WhenCalculatingFromContextMenu_ThenOutputClearedLogMessagesAddedAndUpdateObserver() { // Given var gui = mocks.DynamicMock(); @@ -636,7 +638,11 @@ }; using (ContextMenuStrip contextMenuStrip = info.ContextMenuStrip(calculationContext, null, treeViewControl)) + using (new HydraRingCalculatorFactoryConfig()) { + var calculator = ((TestHydraRingCalculatorFactory) HydraRingCalculatorFactory.Instance).OvertoppingCalculator; + calculator.EndInFailure = true; + // When Action action = () => contextMenuStrip.Items[contextMenuCalculateIndex].PerformClick(); Index: Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Forms.Test/TreeNodeInfos/GrassCoverErosionInwardsCalculationGroupContextTreeNodeInfoTest.cs =================================================================== diff -u -r3e8359d4b2175db8257daf911c91f602dc42c676 -rbae9328136bb33f3827192d07115f5512fa7bc32 --- Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Forms.Test/TreeNodeInfos/GrassCoverErosionInwardsCalculationGroupContextTreeNodeInfoTest.cs (.../GrassCoverErosionInwardsCalculationGroupContextTreeNodeInfoTest.cs) (revision 3e8359d4b2175db8257daf911c91f602dc42c676) +++ Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Forms.Test/TreeNodeInfos/GrassCoverErosionInwardsCalculationGroupContextTreeNodeInfoTest.cs (.../GrassCoverErosionInwardsCalculationGroupContextTreeNodeInfoTest.cs) (revision bae9328136bb33f3827192d07115f5512fa7bc32) @@ -44,6 +44,7 @@ using Ringtoets.GrassCoverErosionInwards.Data; using Ringtoets.GrassCoverErosionInwards.Forms.PresentationObjects; using Ringtoets.GrassCoverErosionInwards.Plugin; +using Ringtoets.HydraRing.Calculation.TestUtil.Calculator; using Ringtoets.HydraRing.Data; using CoreCommonGuiResources = Core.Common.Gui.Properties.Resources; using RingtoetsCommonFormsResources = Ringtoets.Common.Forms.Properties.Resources; @@ -788,28 +789,27 @@ }; using (ContextMenuStrip contextMenu = info.ContextMenuStrip(groupContext, null, treeViewControl)) + using (new HydraRingCalculatorFactoryConfig()) { // Call TestHelper.AssertLogMessages(() => contextMenu.Items[contextMenuCalculateAllIndexRootGroup].PerformClick(), messages => { var messageList = messages.ToList(); // Assert - Assert.AreEqual(14, messageList.Count); + Assert.AreEqual(12, messageList.Count); StringAssert.StartsWith("Validatie van 'A' gestart om: ", messageList[0]); StringAssert.StartsWith("Validatie van 'A' beëindigd om: ", messageList[1]); StringAssert.StartsWith("Berekening van 'A' gestart om: ", messageList[2]); - Assert.AreEqual("De berekening voor grasbekleding erosie kruin en binnentalud 'A' is niet gelukt.", messageList[3]); - StringAssert.StartsWith("Overloop berekening is uitgevoerd op de tijdelijke locatie:", messageList[4]); - StringAssert.StartsWith("Berekening van 'A' beëindigd om: ", messageList[5]); - StringAssert.StartsWith("Validatie van 'B' gestart om: ", messageList[6]); - StringAssert.StartsWith("Validatie van 'B' beëindigd om: ", messageList[7]); - StringAssert.StartsWith("Berekening van 'B' gestart om: ", messageList[8]); - Assert.AreEqual("De berekening voor grasbekleding erosie kruin en binnentalud 'B' is niet gelukt.", messageList[9]); - StringAssert.StartsWith("Overloop berekening is uitgevoerd op de tijdelijke locatie:", messageList[10]); - StringAssert.StartsWith("Berekening van 'B' beëindigd om: ", messageList[11]); - Assert.AreEqual("Uitvoeren van 'A' is mislukt.", messageList[12]); - Assert.AreEqual("Uitvoeren van 'B' is mislukt.", messageList[13]); + StringAssert.StartsWith("Overloop berekening is uitgevoerd op de tijdelijke locatie:", messageList[3]); + StringAssert.StartsWith("Berekening van 'A' beëindigd om: ", messageList[4]); + StringAssert.StartsWith("Validatie van 'B' gestart om: ", messageList[5]); + StringAssert.StartsWith("Validatie van 'B' beëindigd om: ", messageList[6]); + StringAssert.StartsWith("Berekening van 'B' gestart om: ", messageList[7]); + StringAssert.StartsWith("Overloop berekening is uitgevoerd op de tijdelijke locatie:", messageList[8]); + StringAssert.StartsWith("Berekening van 'B' beëindigd om: ", messageList[9]); + Assert.AreEqual("Uitvoeren van 'A' is gelukt.", messageList[10]); + Assert.AreEqual("Uitvoeren van 'B' is gelukt.", messageList[11]); }); } } Index: Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Forms.Test/TreeNodeInfos/GrassCoverErosionInwardsFailureMechanismContextTreeNodeInfoTest.cs =================================================================== diff -u -r3e8359d4b2175db8257daf911c91f602dc42c676 -rbae9328136bb33f3827192d07115f5512fa7bc32 --- Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Forms.Test/TreeNodeInfos/GrassCoverErosionInwardsFailureMechanismContextTreeNodeInfoTest.cs (.../GrassCoverErosionInwardsFailureMechanismContextTreeNodeInfoTest.cs) (revision 3e8359d4b2175db8257daf911c91f602dc42c676) +++ Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Forms.Test/TreeNodeInfos/GrassCoverErosionInwardsFailureMechanismContextTreeNodeInfoTest.cs (.../GrassCoverErosionInwardsFailureMechanismContextTreeNodeInfoTest.cs) (revision bae9328136bb33f3827192d07115f5512fa7bc32) @@ -42,6 +42,7 @@ using Ringtoets.GrassCoverErosionInwards.Data; using Ringtoets.GrassCoverErosionInwards.Forms.PresentationObjects; using Ringtoets.GrassCoverErosionInwards.Plugin; +using Ringtoets.HydraRing.Calculation.TestUtil.Calculator; using Ringtoets.HydraRing.Data; using GrassCoverErosionInwardsFormsResources = Ringtoets.GrassCoverErosionInwards.Forms.Properties.Resources; using CoreCommonGuiResources = Core.Common.Gui.Properties.Resources; @@ -773,28 +774,27 @@ }; using (ContextMenuStrip contextMenu = info.ContextMenuStrip(failureMechanismContext, null, treeViewControl)) + using (new HydraRingCalculatorFactoryConfig()) { // Call TestHelper.AssertLogMessages(() => contextMenu.Items[contextMenuCalculateAllIndex].PerformClick(), messages => { var messageList = messages.ToList(); // Assert - Assert.AreEqual(14, messageList.Count); + Assert.AreEqual(12, messageList.Count); StringAssert.StartsWith("Validatie van 'A' gestart om: ", messageList[0]); StringAssert.StartsWith("Validatie van 'A' beëindigd om: ", messageList[1]); StringAssert.StartsWith("Berekening van 'A' gestart om: ", messageList[2]); - Assert.AreEqual("De berekening voor grasbekleding erosie kruin en binnentalud 'A' is niet gelukt.", messageList[3]); - StringAssert.StartsWith("Overloop berekening is uitgevoerd op de tijdelijke locatie:", messageList[4]); - StringAssert.StartsWith("Berekening van 'A' beëindigd om: ", messageList[5]); - StringAssert.StartsWith("Validatie van 'B' gestart om: ", messageList[6]); - StringAssert.StartsWith("Validatie van 'B' beëindigd om: ", messageList[7]); - StringAssert.StartsWith("Berekening van 'B' gestart om: ", messageList[8]); - Assert.AreEqual("De berekening voor grasbekleding erosie kruin en binnentalud 'B' is niet gelukt.", messageList[9]); - StringAssert.StartsWith("Overloop berekening is uitgevoerd op de tijdelijke locatie:", messageList[10]); - StringAssert.StartsWith("Berekening van 'B' beëindigd om: ", messageList[11]); - Assert.AreEqual("Uitvoeren van 'A' is mislukt.", messageList[12]); - Assert.AreEqual("Uitvoeren van 'B' is mislukt.", messageList[13]); + StringAssert.StartsWith("Overloop berekening is uitgevoerd op de tijdelijke locatie:", messageList[3]); + StringAssert.StartsWith("Berekening van 'A' beëindigd om: ", messageList[4]); + StringAssert.StartsWith("Validatie van 'B' gestart om: ", messageList[5]); + StringAssert.StartsWith("Validatie van 'B' beëindigd om: ", messageList[6]); + StringAssert.StartsWith("Berekening van 'B' gestart om: ", messageList[7]); + StringAssert.StartsWith("Overloop berekening is uitgevoerd op de tijdelijke locatie:", messageList[8]); + StringAssert.StartsWith("Berekening van 'B' beëindigd om: ", messageList[9]); + Assert.AreEqual("Uitvoeren van 'A' is gelukt.", messageList[10]); + Assert.AreEqual("Uitvoeren van 'B' is gelukt.", messageList[11]); }); } } Index: Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Forms.Test/Ringtoets.HeightStructures.Forms.Test.csproj =================================================================== diff -u -r86984ca293c30b4f9b47da7825cbae1404fffe08 -rbae9328136bb33f3827192d07115f5512fa7bc32 --- Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Forms.Test/Ringtoets.HeightStructures.Forms.Test.csproj (.../Ringtoets.HeightStructures.Forms.Test.csproj) (revision 86984ca293c30b4f9b47da7825cbae1404fffe08) +++ Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Forms.Test/Ringtoets.HeightStructures.Forms.Test.csproj (.../Ringtoets.HeightStructures.Forms.Test.csproj) (revision bae9328136bb33f3827192d07115f5512fa7bc32) @@ -148,6 +148,10 @@ {70F8CC9C-5BC8-4FB2-B201-EAE7FA8088C2} Ringtoets.HydraRing.Data + + {74CBA865-9338-447F-BAD9-28312446AE84} + Ringtoets.HydraRing.Calculation.TestUtil + {1C0017D8-35B5-4CA0-8FC7-A83F46DBDC99} Ringtoets.HeightStructures.Data Index: Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Forms.Test/TreeNodeInfos/HeightStructuresCalculationContextTreeNodeInfoTest.cs =================================================================== diff -u -rbd73023d5f8926a411da214fb5ce522056a0e30a -rbae9328136bb33f3827192d07115f5512fa7bc32 --- Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Forms.Test/TreeNodeInfos/HeightStructuresCalculationContextTreeNodeInfoTest.cs (.../HeightStructuresCalculationContextTreeNodeInfoTest.cs) (revision bd73023d5f8926a411da214fb5ce522056a0e30a) +++ Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Forms.Test/TreeNodeInfos/HeightStructuresCalculationContextTreeNodeInfoTest.cs (.../HeightStructuresCalculationContextTreeNodeInfoTest.cs) (revision bae9328136bb33f3827192d07115f5512fa7bc32) @@ -45,6 +45,8 @@ using Ringtoets.HeightStructures.Data.TestUtil; using Ringtoets.HeightStructures.Forms.PresentationObjects; using Ringtoets.HeightStructures.Plugin; +using Ringtoets.HydraRing.Calculation.Calculator.Factory; +using Ringtoets.HydraRing.Calculation.TestUtil.Calculator; using Ringtoets.HydraRing.Data; using RingtoetsCommonFormsResources = Ringtoets.Common.Forms.Properties.Resources; using RingtoetsCommonServicesResources = Ringtoets.Common.Service.Properties.Resources; @@ -573,7 +575,7 @@ } [Test] - public void GivenCalculationWithNonExistingLocationId_WhenCalculatingFromContextMenu_ThenOutputClearedLogMessagesAddedAndUpdateObserver() + public void GivenCalculationThatEndsInFailure_WhenCalculatingFromContextMenu_ThenOutputClearedLogMessagesAddedAndUpdateObserver() { // Given var gui = mocks.DynamicMock(); @@ -633,7 +635,11 @@ }; using (ContextMenuStrip contextMenuStrip = info.ContextMenuStrip(calculationContext, null, treeViewControl)) + using (new HydraRingCalculatorFactoryConfig()) { + var calculator = ((TestHydraRingCalculatorFactory) HydraRingCalculatorFactory.Instance).StructuresOvertoppingCalculator; + calculator.EndInFailure = true; + // When Action action = () => contextMenuStrip.Items[contextMenuCalculateIndex].PerformClick(); Index: Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Forms.Test/TreeNodeInfos/HeightStructuresCalculationGroupContextTreeNodeInfoTest.cs =================================================================== diff -u -r0fc840682ffcce4fc1074e7d6687e90cab58bd2b -rbae9328136bb33f3827192d07115f5512fa7bc32 --- Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Forms.Test/TreeNodeInfos/HeightStructuresCalculationGroupContextTreeNodeInfoTest.cs (.../HeightStructuresCalculationGroupContextTreeNodeInfoTest.cs) (revision 0fc840682ffcce4fc1074e7d6687e90cab58bd2b) +++ Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Forms.Test/TreeNodeInfos/HeightStructuresCalculationGroupContextTreeNodeInfoTest.cs (.../HeightStructuresCalculationGroupContextTreeNodeInfoTest.cs) (revision bae9328136bb33f3827192d07115f5512fa7bc32) @@ -45,6 +45,7 @@ using Ringtoets.HeightStructures.Data.TestUtil; using Ringtoets.HeightStructures.Forms.PresentationObjects; using Ringtoets.HeightStructures.Plugin; +using Ringtoets.HydraRing.Calculation.TestUtil.Calculator; using Ringtoets.HydraRing.Data; using RingtoetsCommonFormsResources = Ringtoets.Common.Forms.Properties.Resources; @@ -852,28 +853,27 @@ }; using (ContextMenuStrip contextMenu = info.ContextMenuStrip(groupContext, null, treeViewControl)) + using (new HydraRingCalculatorFactoryConfig()) { // Call TestHelper.AssertLogMessages(() => contextMenu.Items[contextMenuCalculateAllIndexRootGroup].PerformClick(), messages => { var messageList = messages.ToList(); // Assert - Assert.AreEqual(14, messageList.Count); + Assert.AreEqual(12, messageList.Count); StringAssert.StartsWith("Validatie van 'A' gestart om: ", messageList[0]); StringAssert.StartsWith("Validatie van 'A' beëindigd om: ", messageList[1]); StringAssert.StartsWith("Berekening van 'A' gestart om: ", messageList[2]); - StringAssert.StartsWith("De berekening voor hoogte kunstwerk 'A' is niet gelukt. Bekijk het foutrapport door op details te klikken.", messageList[3]); - StringAssert.StartsWith("Hoogte kunstwerk berekening is uitgevoerd op de tijdelijke locatie:", messageList[4]); - StringAssert.StartsWith("Berekening van 'A' beëindigd om: ", messageList[5]); - StringAssert.StartsWith("Validatie van 'B' gestart om: ", messageList[6]); - StringAssert.StartsWith("Validatie van 'B' beëindigd om: ", messageList[7]); - StringAssert.StartsWith("Berekening van 'B' gestart om: ", messageList[8]); - StringAssert.StartsWith("De berekening voor hoogte kunstwerk 'B' is niet gelukt. Bekijk het foutrapport door op details te klikken.", messageList[9]); - StringAssert.StartsWith("Hoogte kunstwerk berekening is uitgevoerd op de tijdelijke locatie:", messageList[10]); - StringAssert.StartsWith("Berekening van 'B' beëindigd om: ", messageList[11]); - Assert.AreEqual("Uitvoeren van 'A' is mislukt.", messageList[12]); - Assert.AreEqual("Uitvoeren van 'B' is mislukt.", messageList[13]); + StringAssert.StartsWith("Hoogte kunstwerk berekening is uitgevoerd op de tijdelijke locatie:", messageList[3]); + StringAssert.StartsWith("Berekening van 'A' beëindigd om: ", messageList[4]); + StringAssert.StartsWith("Validatie van 'B' gestart om: ", messageList[5]); + StringAssert.StartsWith("Validatie van 'B' beëindigd om: ", messageList[6]); + StringAssert.StartsWith("Berekening van 'B' gestart om: ", messageList[7]); + StringAssert.StartsWith("Hoogte kunstwerk berekening is uitgevoerd op de tijdelijke locatie:", messageList[8]); + StringAssert.StartsWith("Berekening van 'B' beëindigd om: ", messageList[9]); + Assert.AreEqual("Uitvoeren van 'A' is mislukt.", messageList[10]); + Assert.AreEqual("Uitvoeren van 'B' is mislukt.", messageList[11]); }); } } Index: Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Forms.Test/TreeNodeInfos/HeightStructuresFailureMechanismContextTreeNodeInfoTest.cs =================================================================== diff -u -r36b3511af84b8ca722697aa64164ee009486f243 -rbae9328136bb33f3827192d07115f5512fa7bc32 --- Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Forms.Test/TreeNodeInfos/HeightStructuresFailureMechanismContextTreeNodeInfoTest.cs (.../HeightStructuresFailureMechanismContextTreeNodeInfoTest.cs) (revision 36b3511af84b8ca722697aa64164ee009486f243) +++ Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Forms.Test/TreeNodeInfos/HeightStructuresFailureMechanismContextTreeNodeInfoTest.cs (.../HeightStructuresFailureMechanismContextTreeNodeInfoTest.cs) (revision bae9328136bb33f3827192d07115f5512fa7bc32) @@ -43,6 +43,7 @@ using Ringtoets.HeightStructures.Data.TestUtil; using Ringtoets.HeightStructures.Forms.PresentationObjects; using Ringtoets.HeightStructures.Plugin; +using Ringtoets.HydraRing.Calculation.TestUtil.Calculator; using Ringtoets.HydraRing.Data; using CoreCommonGuiResources = Core.Common.Gui.Properties.Resources; using RingtoetsCommonFormsResources = Ringtoets.Common.Forms.Properties.Resources; @@ -773,28 +774,27 @@ }; using (var contextMenu = info.ContextMenuStrip(failureMechanismContext, null, treeViewControl)) + using (new HydraRingCalculatorFactoryConfig()) { // Call TestHelper.AssertLogMessages(() => contextMenu.Items[contextMenuCalculateAllIndex].PerformClick(), messages => { var messageList = messages.ToList(); // Assert - Assert.AreEqual(14, messageList.Count); + Assert.AreEqual(12, messageList.Count); StringAssert.StartsWith("Validatie van 'A' gestart om: ", messageList[0]); StringAssert.StartsWith("Validatie van 'A' beëindigd om: ", messageList[1]); StringAssert.StartsWith("Berekening van 'A' gestart om: ", messageList[2]); - StringAssert.StartsWith("De berekening voor hoogte kunstwerk 'A' is niet gelukt. Bekijk het foutrapport door op details te klikken.", messageList[3]); - StringAssert.StartsWith("Hoogte kunstwerk berekening is uitgevoerd op de tijdelijke locatie:", messageList[4]); - StringAssert.StartsWith("Berekening van 'A' beëindigd om: ", messageList[5]); - StringAssert.StartsWith("Validatie van 'B' gestart om: ", messageList[6]); - StringAssert.StartsWith("Validatie van 'B' beëindigd om: ", messageList[7]); - StringAssert.StartsWith("Berekening van 'B' gestart om: ", messageList[8]); - StringAssert.StartsWith("De berekening voor hoogte kunstwerk 'B' is niet gelukt. Bekijk het foutrapport door op details te klikken.", messageList[9]); - StringAssert.StartsWith("Hoogte kunstwerk berekening is uitgevoerd op de tijdelijke locatie:", messageList[10]); - StringAssert.StartsWith("Berekening van 'B' beëindigd om: ", messageList[11]); - Assert.AreEqual("Uitvoeren van 'A' is mislukt.", messageList[12]); - Assert.AreEqual("Uitvoeren van 'B' is mislukt.", messageList[13]); + StringAssert.StartsWith("Hoogte kunstwerk berekening is uitgevoerd op de tijdelijke locatie:", messageList[3]); + StringAssert.StartsWith("Berekening van 'A' beëindigd om: ", messageList[4]); + StringAssert.StartsWith("Validatie van 'B' gestart om: ", messageList[5]); + StringAssert.StartsWith("Validatie van 'B' beëindigd om: ", messageList[6]); + StringAssert.StartsWith("Berekening van 'B' gestart om: ", messageList[7]); + StringAssert.StartsWith("Hoogte kunstwerk berekening is uitgevoerd op de tijdelijke locatie:", messageList[8]); + StringAssert.StartsWith("Berekening van 'B' beëindigd om: ", messageList[9]); + Assert.AreEqual("Uitvoeren van 'A' is mislukt.", messageList[10]); + Assert.AreEqual("Uitvoeren van 'B' is mislukt.", messageList[11]); }); } } Index: Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.Forms.Test/Ringtoets.StabilityPointStructures.Forms.Test.csproj =================================================================== diff -u -rabcfb413c3e2024036761c3b05156c98cc2a8e44 -rbae9328136bb33f3827192d07115f5512fa7bc32 --- Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.Forms.Test/Ringtoets.StabilityPointStructures.Forms.Test.csproj (.../Ringtoets.StabilityPointStructures.Forms.Test.csproj) (revision abcfb413c3e2024036761c3b05156c98cc2a8e44) +++ Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.Forms.Test/Ringtoets.StabilityPointStructures.Forms.Test.csproj (.../Ringtoets.StabilityPointStructures.Forms.Test.csproj) (revision bae9328136bb33f3827192d07115f5512fa7bc32) @@ -143,6 +143,10 @@ {70f8cc9c-5bc8-4fb2-b201-eae7fa8088c2} Ringtoets.HydraRing.Data + + {74CBA865-9338-447F-BAD9-28312446AE84} + Ringtoets.HydraRing.Calculation.TestUtil + {3D4B9740-8348-4434-8D77-B611FC6EE57F} Ringtoets.StabilityPointStructures.Data Index: Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.Forms.Test/TreeNodeInfos/StabilityPointStructuresCalculationContextTreeNodeInfoTest.cs =================================================================== diff -u -r36b3511af84b8ca722697aa64164ee009486f243 -rbae9328136bb33f3827192d07115f5512fa7bc32 --- Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.Forms.Test/TreeNodeInfos/StabilityPointStructuresCalculationContextTreeNodeInfoTest.cs (.../StabilityPointStructuresCalculationContextTreeNodeInfoTest.cs) (revision 36b3511af84b8ca722697aa64164ee009486f243) +++ Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.Forms.Test/TreeNodeInfos/StabilityPointStructuresCalculationContextTreeNodeInfoTest.cs (.../StabilityPointStructuresCalculationContextTreeNodeInfoTest.cs) (revision bae9328136bb33f3827192d07115f5512fa7bc32) @@ -41,6 +41,8 @@ using Ringtoets.Common.Data.Probability; using Ringtoets.Common.Data.Structures; using Ringtoets.Common.Forms.PresentationObjects; +using Ringtoets.HydraRing.Calculation.Calculator.Factory; +using Ringtoets.HydraRing.Calculation.TestUtil.Calculator; using Ringtoets.HydraRing.Data; using Ringtoets.StabilityPointStructures.Data; using Ringtoets.StabilityPointStructures.Data.TestUtil; @@ -433,7 +435,7 @@ } [Test] - public void GivenCalculationWithNonExistingLocationId_WhenCalculatingFromContextMenuFails_ThenOutputClearedLogMessagesAddedAndUpdateObserver() + public void GivenCalculationThatEndsInFailure_WhenCalculatingFromContextMenuFails_ThenOutputClearedLogMessagesAddedAndUpdateObserver() { // Given var guiMock = mocks.StrictMock(); @@ -493,7 +495,11 @@ }; using (ContextMenuStrip contextMenuStrip = info.ContextMenuStrip(calculationContext, null, treeViewControl)) + using (new HydraRingCalculatorFactoryConfig()) { + var calculator = ((TestHydraRingCalculatorFactory) HydraRingCalculatorFactory.Instance).StructuresStabilityPointCalculator; + calculator.EndInFailure = true; + // When Action action = () => contextMenuStrip.Items[contextMenuCalculateIndex].PerformClick(); @@ -544,7 +550,7 @@ var assessmentSectionStub = mocks.Stub(); assessmentSectionStub.HydraulicBoundaryDatabase = hydraulicBoundaryDatabase; - var calculation = new TestStabilityPointStructuresCalculation() + var calculation = new TestStabilityPointStructuresCalculation { InputParameters = { Index: Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.Forms.Test/TreeNodeInfos/StabilityPointStructuresCalculationGroupContextTreeNodeInfoTest.cs =================================================================== diff -u -rdf13dff5aedb149d7b566bed9dda68fe9e3a8e02 -rbae9328136bb33f3827192d07115f5512fa7bc32 --- Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.Forms.Test/TreeNodeInfos/StabilityPointStructuresCalculationGroupContextTreeNodeInfoTest.cs (.../StabilityPointStructuresCalculationGroupContextTreeNodeInfoTest.cs) (revision df13dff5aedb149d7b566bed9dda68fe9e3a8e02) +++ Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.Forms.Test/TreeNodeInfos/StabilityPointStructuresCalculationGroupContextTreeNodeInfoTest.cs (.../StabilityPointStructuresCalculationGroupContextTreeNodeInfoTest.cs) (revision bae9328136bb33f3827192d07115f5512fa7bc32) @@ -41,6 +41,7 @@ using Ringtoets.Common.Data.Structures; using Ringtoets.Common.Forms; using Ringtoets.Common.Forms.Helpers; +using Ringtoets.HydraRing.Calculation.TestUtil.Calculator; using Ringtoets.HydraRing.Data; using Ringtoets.StabilityPointStructures.Data; using Ringtoets.StabilityPointStructures.Data.TestUtil; @@ -769,30 +770,27 @@ }; using (ContextMenuStrip contextMenu = info.ContextMenuStrip(groupContext, null, treeViewControl)) + using (new HydraRingCalculatorFactoryConfig()) { // Call TestHelper.AssertLogMessages(() => contextMenu.Items[contextMenuCalculateAllIndexRootGroup].PerformClick(), messages => { var messageList = messages.ToList(); // Assert - Assert.AreEqual(14, messageList.Count); + Assert.AreEqual(12, messageList.Count); StringAssert.StartsWith("Validatie van 'A' gestart om: ", messageList[0]); StringAssert.StartsWith("Validatie van 'A' beëindigd om: ", messageList[1]); StringAssert.StartsWith("Berekening van 'A' gestart om: ", messageList[2]); - StringAssert.StartsWith("De berekening voor kunstwerk puntconstructies 'A' is niet gelukt. Bekijk het foutrapport door op details te klikken.", - messageList[3]); - StringAssert.StartsWith("Puntconstructies berekening is uitgevoerd op de tijdelijke locatie:", messageList[4]); - StringAssert.StartsWith("Berekening van 'A' beëindigd om: ", messageList[5]); - StringAssert.StartsWith("Validatie van 'B' gestart om: ", messageList[6]); - StringAssert.StartsWith("Validatie van 'B' beëindigd om: ", messageList[7]); - StringAssert.StartsWith("Berekening van 'B' gestart om: ", messageList[8]); - StringAssert.StartsWith("De berekening voor kunstwerk puntconstructies 'B' is niet gelukt. Bekijk het foutrapport door op details te klikken.", - messageList[9]); - StringAssert.StartsWith("Puntconstructies berekening is uitgevoerd op de tijdelijke locatie:", messageList[10]); - StringAssert.StartsWith("Berekening van 'B' beëindigd om: ", messageList[11]); - Assert.AreEqual("Uitvoeren van 'A' is mislukt.", messageList[12]); - Assert.AreEqual("Uitvoeren van 'B' is mislukt.", messageList[13]); + StringAssert.StartsWith("Puntconstructies berekening is uitgevoerd op de tijdelijke locatie:", messageList[3]); + StringAssert.StartsWith("Berekening van 'A' beëindigd om: ", messageList[4]); + StringAssert.StartsWith("Validatie van 'B' gestart om: ", messageList[5]); + StringAssert.StartsWith("Validatie van 'B' beëindigd om: ", messageList[6]); + StringAssert.StartsWith("Berekening van 'B' gestart om: ", messageList[7]); + StringAssert.StartsWith("Puntconstructies berekening is uitgevoerd op de tijdelijke locatie:", messageList[8]); + StringAssert.StartsWith("Berekening van 'B' beëindigd om: ", messageList[9]); + Assert.AreEqual("Uitvoeren van 'A' is mislukt.", messageList[10]); + Assert.AreEqual("Uitvoeren van 'B' is mislukt.", messageList[11]); }); } } @@ -811,7 +809,7 @@ new Point2D(0, 0) })); - failureMechanism.CalculationsGroup.Children.Add(new TestStabilityPointStructuresCalculation() + failureMechanism.CalculationsGroup.Children.Add(new TestStabilityPointStructuresCalculation { Name = "A", InputParameters = @@ -822,7 +820,7 @@ } }); - failureMechanism.CalculationsGroup.Children.Add(new TestStabilityPointStructuresCalculation() + failureMechanism.CalculationsGroup.Children.Add(new TestStabilityPointStructuresCalculation { Name = "B", InputParameters = Index: Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.Forms.Test/TreeNodeInfos/StabilityPointStructuresFailureMechanismContextTreeNodeInfoTest.cs =================================================================== diff -u -r36b3511af84b8ca722697aa64164ee009486f243 -rbae9328136bb33f3827192d07115f5512fa7bc32 --- Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.Forms.Test/TreeNodeInfos/StabilityPointStructuresFailureMechanismContextTreeNodeInfoTest.cs (.../StabilityPointStructuresFailureMechanismContextTreeNodeInfoTest.cs) (revision 36b3511af84b8ca722697aa64164ee009486f243) +++ Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.Forms.Test/TreeNodeInfos/StabilityPointStructuresFailureMechanismContextTreeNodeInfoTest.cs (.../StabilityPointStructuresFailureMechanismContextTreeNodeInfoTest.cs) (revision bae9328136bb33f3827192d07115f5512fa7bc32) @@ -39,6 +39,7 @@ using Ringtoets.Common.Data.FailureMechanism; using Ringtoets.Common.Data.Structures; using Ringtoets.Common.Forms.PresentationObjects; +using Ringtoets.HydraRing.Calculation.TestUtil.Calculator; using Ringtoets.HydraRing.Data; using Ringtoets.StabilityPointStructures.Data; using Ringtoets.StabilityPointStructures.Data.TestUtil; @@ -677,30 +678,27 @@ }; using (var contextMenu = info.ContextMenuStrip(failureMechanismContext, null, treeViewControl)) + using (new HydraRingCalculatorFactoryConfig()) { // Call TestHelper.AssertLogMessages(() => contextMenu.Items[contextMenuCalculateAllIndex].PerformClick(), messages => { var messageList = messages.ToList(); // Assert - Assert.AreEqual(14, messageList.Count); + Assert.AreEqual(12, messageList.Count); StringAssert.StartsWith("Validatie van 'A' gestart om: ", messageList[0]); StringAssert.StartsWith("Validatie van 'A' beëindigd om: ", messageList[1]); StringAssert.StartsWith("Berekening van 'A' gestart om: ", messageList[2]); - StringAssert.StartsWith("De berekening voor kunstwerk puntconstructies 'A' is niet gelukt. Bekijk het foutrapport door op details te klikken.", - messageList[3]); - StringAssert.StartsWith("Puntconstructies berekening is uitgevoerd op de tijdelijke locatie:", messageList[4]); - StringAssert.StartsWith("Berekening van 'A' beëindigd om: ", messageList[5]); - StringAssert.StartsWith("Validatie van 'B' gestart om: ", messageList[6]); - StringAssert.StartsWith("Validatie van 'B' beëindigd om: ", messageList[7]); - StringAssert.StartsWith("Berekening van 'B' gestart om: ", messageList[8]); - StringAssert.StartsWith("De berekening voor kunstwerk puntconstructies 'B' is niet gelukt. Bekijk het foutrapport door op details te klikken.", - messageList[9]); - StringAssert.StartsWith("Puntconstructies berekening is uitgevoerd op de tijdelijke locatie:", messageList[10]); - StringAssert.StartsWith("Berekening van 'B' beëindigd om: ", messageList[11]); - Assert.AreEqual("Uitvoeren van 'A' is mislukt.", messageList[12]); - Assert.AreEqual("Uitvoeren van 'B' is mislukt.", messageList[13]); + StringAssert.StartsWith("Puntconstructies berekening is uitgevoerd op de tijdelijke locatie:", messageList[3]); + StringAssert.StartsWith("Berekening van 'A' beëindigd om: ", messageList[4]); + StringAssert.StartsWith("Validatie van 'B' gestart om: ", messageList[5]); + StringAssert.StartsWith("Validatie van 'B' beëindigd om: ", messageList[6]); + StringAssert.StartsWith("Berekening van 'B' gestart om: ", messageList[7]); + StringAssert.StartsWith("Puntconstructies berekening is uitgevoerd op de tijdelijke locatie:", messageList[8]); + StringAssert.StartsWith("Berekening van 'B' beëindigd om: ", messageList[9]); + Assert.AreEqual("Uitvoeren van 'A' is mislukt.", messageList[10]); + Assert.AreEqual("Uitvoeren van 'B' is mislukt.", messageList[11]); }); } } @@ -716,7 +714,7 @@ new Point2D(0, 0) }); failureMechanism.AddSection(section); - failureMechanism.CalculationsGroup.Children.Add(new TestStabilityPointStructuresCalculation() + failureMechanism.CalculationsGroup.Children.Add(new TestStabilityPointStructuresCalculation { Name = "A", InputParameters = @@ -726,7 +724,7 @@ LoadSchematizationType = LoadSchematizationType.Linear } }); - failureMechanism.CalculationsGroup.Children.Add(new TestStabilityPointStructuresCalculation() + failureMechanism.CalculationsGroup.Children.Add(new TestStabilityPointStructuresCalculation { Name = "B", InputParameters =