Index: Ringtoets/ClosingStructures/src/Ringtoets.ClosingStructures.Service/ClosingStructuresCalculationService.cs =================================================================== diff -u -r874233bdb7814bef40b639e0fb4d26a0b86616a0 -r533cc8038f03f3acb30f4db787a3d583f93f7008 --- Ringtoets/ClosingStructures/src/Ringtoets.ClosingStructures.Service/ClosingStructuresCalculationService.cs (.../ClosingStructuresCalculationService.cs) (revision 874233bdb7814bef40b639e0fb4d26a0b86616a0) +++ Ringtoets/ClosingStructures/src/Ringtoets.ClosingStructures.Service/ClosingStructuresCalculationService.cs (.../ClosingStructuresCalculationService.cs) (revision 533cc8038f03f3acb30f4db787a3d583f93f7008) @@ -94,7 +94,7 @@ { calculator.Calculate(input); - if (!canceled) + if (!canceled && string.IsNullOrEmpty(calculator.LastErrorFileContent)) { calculation.Output = ProbabilityAssessmentService.Calculate(assessmentSection.FailureMechanismContribution.Norm, failureMechanism.Contribution, Index: Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Service.Test/ClosingStructuresCalculationServiceTest.cs =================================================================== diff -u -r2b26e7134b3918e67f8b23a6db3f90fad0d4f12e -r533cc8038f03f3acb30f4db787a3d583f93f7008 --- Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Service.Test/ClosingStructuresCalculationServiceTest.cs (.../ClosingStructuresCalculationServiceTest.cs) (revision 2b26e7134b3918e67f8b23a6db3f90fad0d4f12e) +++ Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Service.Test/ClosingStructuresCalculationServiceTest.cs (.../ClosingStructuresCalculationServiceTest.cs) (revision 533cc8038f03f3acb30f4db787a3d583f93f7008) @@ -1064,6 +1064,7 @@ StringAssert.StartsWith(string.Format("Berekening van '{0}' beëindigd om: ", calculation.Name), msgs[3]); }); Assert.IsTrue(exceptionThrown); + Assert.IsNull(calculation.Output); Assert.AreEqual(calculator.LastErrorFileContent, exceptionMessage); } mockRepository.VerifyAll(); Index: Ringtoets/Common/src/Ringtoets.Common.Service/DesignWaterLevelCalculationService.cs =================================================================== diff -u -r874233bdb7814bef40b639e0fb4d26a0b86616a0 -r533cc8038f03f3acb30f4db787a3d583f93f7008 --- Ringtoets/Common/src/Ringtoets.Common.Service/DesignWaterLevelCalculationService.cs (.../DesignWaterLevelCalculationService.cs) (revision 874233bdb7814bef40b639e0fb4d26a0b86616a0) +++ Ringtoets/Common/src/Ringtoets.Common.Service/DesignWaterLevelCalculationService.cs (.../DesignWaterLevelCalculationService.cs) (revision 533cc8038f03f3acb30f4db787a3d583f93f7008) @@ -97,13 +97,16 @@ { calculator.Calculate(CreateInput(hydraulicBoundaryLocation, norm, hydraulicBoundaryDatabaseFilePath)); - hydraulicBoundaryLocation.DesignWaterLevel = (RoundedDouble) calculator.DesignWaterLevel; - hydraulicBoundaryLocation.DesignWaterLevelCalculationConvergence = - RingtoetsCommonDataCalculationService.CalculationConverged(calculator.ReliabilityIndex, norm); - - if (hydraulicBoundaryLocation.DesignWaterLevelCalculationConvergence != CalculationConvergence.CalculatedConverged) + if (string.IsNullOrEmpty(calculator.LastErrorFileContent)) { - log.Warn(messageProvider.GetCalculatedNotConvergedMessage(hydraulicBoundaryLocation.Name)); + hydraulicBoundaryLocation.DesignWaterLevel = (RoundedDouble)calculator.DesignWaterLevel; + hydraulicBoundaryLocation.DesignWaterLevelCalculationConvergence = + RingtoetsCommonDataCalculationService.CalculationConverged(calculator.ReliabilityIndex, norm); + + if (hydraulicBoundaryLocation.DesignWaterLevelCalculationConvergence != CalculationConvergence.CalculatedConverged) + { + log.Warn(messageProvider.GetCalculatedNotConvergedMessage(hydraulicBoundaryLocation.Name)); + } } } catch (HydraRingFileParserException) Index: Ringtoets/Common/src/Ringtoets.Common.Service/WaveHeightCalculationService.cs =================================================================== diff -u -r874233bdb7814bef40b639e0fb4d26a0b86616a0 -r533cc8038f03f3acb30f4db787a3d583f93f7008 --- Ringtoets/Common/src/Ringtoets.Common.Service/WaveHeightCalculationService.cs (.../WaveHeightCalculationService.cs) (revision 874233bdb7814bef40b639e0fb4d26a0b86616a0) +++ Ringtoets/Common/src/Ringtoets.Common.Service/WaveHeightCalculationService.cs (.../WaveHeightCalculationService.cs) (revision 533cc8038f03f3acb30f4db787a3d583f93f7008) @@ -98,13 +98,16 @@ { calculator.Calculate(CreateInput(hydraulicBoundaryLocation, norm, hydraulicBoundaryDatabaseFilePath)); - hydraulicBoundaryLocation.WaveHeight = (RoundedDouble) calculator.WaveHeight; - hydraulicBoundaryLocation.WaveHeightCalculationConvergence = - RingtoetsCommonDataCalculationService.CalculationConverged(calculator.ReliabilityIndex, norm); - - if (hydraulicBoundaryLocation.WaveHeightCalculationConvergence != CalculationConvergence.CalculatedConverged) + if (string.IsNullOrEmpty(calculator.LastErrorFileContent)) { - log.Warn(messageProvider.GetCalculatedNotConvergedMessage(hydraulicBoundaryLocation.Name)); + hydraulicBoundaryLocation.WaveHeight = (RoundedDouble) calculator.WaveHeight; + hydraulicBoundaryLocation.WaveHeightCalculationConvergence = + RingtoetsCommonDataCalculationService.CalculationConverged(calculator.ReliabilityIndex, norm); + + if (hydraulicBoundaryLocation.WaveHeightCalculationConvergence != CalculationConvergence.CalculatedConverged) + { + log.Warn(messageProvider.GetCalculatedNotConvergedMessage(hydraulicBoundaryLocation.Name)); + } } } catch (HydraRingFileParserException) Index: Ringtoets/Common/test/Ringtoets.Common.Service.Test/CalculationServiceHelperTest.cs =================================================================== diff -u -r3e9eb63e09c270127a0db49f2dea3da5ff3a3639 -r533cc8038f03f3acb30f4db787a3d583f93f7008 --- Ringtoets/Common/test/Ringtoets.Common.Service.Test/CalculationServiceHelperTest.cs (.../CalculationServiceHelperTest.cs) (revision 3e9eb63e09c270127a0db49f2dea3da5ff3a3639) +++ Ringtoets/Common/test/Ringtoets.Common.Service.Test/CalculationServiceHelperTest.cs (.../CalculationServiceHelperTest.cs) (revision 533cc8038f03f3acb30f4db787a3d583f93f7008) @@ -167,7 +167,7 @@ [TestCase(true, true, "")] [TestCase(true, false, "")] [TestCase(false, true, "")] - public void ErrorOccurred_LastErrorSetCalculationCanceldOrExceptionThrown_ReturnFalse(bool canceled, bool exceptionThrown, string errorContent) + public void ErrorOccurred_LastErrorSetCalculationCanceledOrExceptionThrown_ReturnFalse(bool canceled, bool exceptionThrown, string errorContent) { // Call bool errorOccurred = CalculationServiceHelper.ErrorOccurred(canceled, exceptionThrown, errorContent); Index: Ringtoets/Common/test/Ringtoets.Common.Service.Test/DesignWaterLevelCalculationServiceTest.cs =================================================================== diff -u -r2b26e7134b3918e67f8b23a6db3f90fad0d4f12e -r533cc8038f03f3acb30f4db787a3d583f93f7008 --- Ringtoets/Common/test/Ringtoets.Common.Service.Test/DesignWaterLevelCalculationServiceTest.cs (.../DesignWaterLevelCalculationServiceTest.cs) (revision 2b26e7134b3918e67f8b23a6db3f90fad0d4f12e) +++ Ringtoets/Common/test/Ringtoets.Common.Service.Test/DesignWaterLevelCalculationServiceTest.cs (.../DesignWaterLevelCalculationServiceTest.cs) (revision 533cc8038f03f3acb30f4db787a3d583f93f7008) @@ -326,6 +326,7 @@ StringAssert.StartsWith(string.Format("Berekening van '{0}' beëindigd om: ", calculationName), msgs[3]); }); Assert.IsTrue(exceptionThrown); + Assert.IsNaN(hydraulicBoundaryLocation.DesignWaterLevel); } mockRepository.VerifyAll(); } @@ -339,13 +340,11 @@ const string locationName = "punt_flw_ 1"; const string calculationName = "locationName"; const string calculationFailedMessage = "calculationFailedMessage"; - const string calculationNotConvergedMessage = "calculationNotConvergedMessage"; var mockRepository = new MockRepository(); var calculationMessageProviderMock = mockRepository.StrictMock(); calculationMessageProviderMock.Stub(calc => calc.GetCalculationName(locationName)).Return(calculationName); calculationMessageProviderMock.Stub(calc => calc.GetCalculationFailedMessage(null, null)).IgnoreArguments().Return(calculationFailedMessage); - calculationMessageProviderMock.Stub(calc => calc.GetCalculatedNotConvergedMessage(locationName)).Return(calculationNotConvergedMessage); mockRepository.ReplayAll(); var hydraulicBoundaryLocation = new HydraulicBoundaryLocation(1, locationName, 0, 0) @@ -384,14 +383,14 @@ TestHelper.AssertLogMessages(call, messages => { var msgs = messages.ToArray(); - Assert.AreEqual(5, msgs.Length); + Assert.AreEqual(4, msgs.Length); StringAssert.StartsWith(string.Format("Berekening van '{0}' gestart om: ", calculationName), msgs[0]); - StringAssert.StartsWith(calculationNotConvergedMessage, msgs[1]); - StringAssert.StartsWith(calculationFailedMessage, msgs[2]); - StringAssert.StartsWith("Toetspeil berekening is uitgevoerd op de tijdelijke locatie", msgs[3]); - StringAssert.StartsWith(string.Format("Berekening van '{0}' beëindigd om: ", calculationName), msgs[4]); + StringAssert.StartsWith(calculationFailedMessage, msgs[1]); + StringAssert.StartsWith("Toetspeil berekening is uitgevoerd op de tijdelijke locatie", msgs[2]); + StringAssert.StartsWith(string.Format("Berekening van '{0}' beëindigd om: ", calculationName), msgs[3]); }); Assert.IsTrue(exceptionThrown); + Assert.IsNaN(hydraulicBoundaryLocation.DesignWaterLevel); Assert.AreEqual(calculator.LastErrorFileContent, exceptionMessage); } mockRepository.VerifyAll(); Index: Ringtoets/Common/test/Ringtoets.Common.Service.Test/WaveHeightCalculationServiceTest.cs =================================================================== diff -u -r2b26e7134b3918e67f8b23a6db3f90fad0d4f12e -r533cc8038f03f3acb30f4db787a3d583f93f7008 --- Ringtoets/Common/test/Ringtoets.Common.Service.Test/WaveHeightCalculationServiceTest.cs (.../WaveHeightCalculationServiceTest.cs) (revision 2b26e7134b3918e67f8b23a6db3f90fad0d4f12e) +++ Ringtoets/Common/test/Ringtoets.Common.Service.Test/WaveHeightCalculationServiceTest.cs (.../WaveHeightCalculationServiceTest.cs) (revision 533cc8038f03f3acb30f4db787a3d583f93f7008) @@ -31,7 +31,6 @@ using Ringtoets.HydraRing.Calculation.Data.Input; using Ringtoets.HydraRing.Calculation.Data.Input.Hydraulics; using Ringtoets.HydraRing.Calculation.Exceptions; -using Ringtoets.HydraRing.Calculation.Parsers; using Ringtoets.HydraRing.Calculation.TestUtil.Calculator; using Ringtoets.HydraRing.Data; @@ -326,6 +325,7 @@ StringAssert.StartsWith(string.Format("Berekening van '{0}' beëindigd om: ", calculationName), msgs[3]); }); Assert.IsTrue(exceptionThrown); + Assert.IsNaN(hydraulicBoundaryLocation.WaveHeight); } mockRepository.VerifyAll(); } @@ -339,13 +339,11 @@ const string locationName = "punt_flw_ 1"; const string calculationName = "locationName"; const string calculationFailedMessage = "calculationFailedMessage"; - const string calculationNotConvergedMessage = "calculationNotConvergedMessage"; var mockRepository = new MockRepository(); var calculationMessageProviderMock = mockRepository.StrictMock(); calculationMessageProviderMock.Stub(calc => calc.GetCalculationName(locationName)).Return(calculationName); calculationMessageProviderMock.Stub(calc => calc.GetCalculationFailedMessage(null, null)).IgnoreArguments().Return(calculationFailedMessage); - calculationMessageProviderMock.Stub(calc => calc.GetCalculatedNotConvergedMessage(locationName)).Return(calculationNotConvergedMessage); mockRepository.ReplayAll(); var hydraulicBoundaryLocation = new HydraulicBoundaryLocation(1, locationName, 0, 0) @@ -384,14 +382,14 @@ TestHelper.AssertLogMessages(call, messages => { var msgs = messages.ToArray(); - Assert.AreEqual(5, msgs.Length); + Assert.AreEqual(4, msgs.Length); StringAssert.StartsWith(string.Format("Berekening van '{0}' gestart om: ", calculationName), msgs[0]); - StringAssert.StartsWith(calculationNotConvergedMessage, msgs[1]); - StringAssert.StartsWith(calculationFailedMessage, msgs[2]); - StringAssert.StartsWith("Golfhoogte berekening is uitgevoerd op de tijdelijke locatie", msgs[3]); - StringAssert.StartsWith(string.Format("Berekening van '{0}' beëindigd om: ", calculationName), msgs[4]); + StringAssert.StartsWith(calculationFailedMessage, msgs[1]); + StringAssert.StartsWith("Golfhoogte berekening is uitgevoerd op de tijdelijke locatie", msgs[2]); + StringAssert.StartsWith(string.Format("Berekening van '{0}' beëindigd om: ", calculationName), msgs[3]); }); Assert.IsTrue(exceptionThrown); + Assert.IsNaN(hydraulicBoundaryLocation.WaveHeight); Assert.AreEqual(calculator.LastErrorFileContent, exceptionMessage); } mockRepository.VerifyAll(); Index: Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Service.Test/GrassCoverErosionInwardsCalculationServiceTest.cs =================================================================== diff -u -rc4972d4aec336f991ac1b4ab3dcd56161c238516 -r533cc8038f03f3acb30f4db787a3d583f93f7008 --- Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Service.Test/GrassCoverErosionInwardsCalculationServiceTest.cs (.../GrassCoverErosionInwardsCalculationServiceTest.cs) (revision c4972d4aec336f991ac1b4ab3dcd56161c238516) +++ Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Service.Test/GrassCoverErosionInwardsCalculationServiceTest.cs (.../GrassCoverErosionInwardsCalculationServiceTest.cs) (revision 533cc8038f03f3acb30f4db787a3d583f93f7008) @@ -506,73 +506,6 @@ } [Test] - public void Calculate_OvertoppingOnlyAndOvertoppingCalculationFails_OutputNull() - { - // Setup - var grassCoverErosionInwardsFailureMechanism = new GrassCoverErosionInwardsFailureMechanism(); - AddSectionToFailureMechanism(grassCoverErosionInwardsFailureMechanism); - - var mockRepository = new MockRepository(); - IAssessmentSection assessmentSectionStub = AssessmentSectionHelper.CreateAssessmentSectionStub(grassCoverErosionInwardsFailureMechanism, - mockRepository, - validFile); - mockRepository.ReplayAll(); - - var dikeProfile = GetDikeProfile(); - - var calculation = new GrassCoverErosionInwardsCalculation - { - InputParameters = - { - HydraulicBoundaryLocation = assessmentSectionStub.HydraulicBoundaryDatabase.Locations.First(hl => hl.Id == 1300001), - DikeProfile = dikeProfile - } - }; - - var failureMechanismSection = grassCoverErosionInwardsFailureMechanism.Sections.First(); - bool expectedExceptionThrown = false; - - // Call - Action call = () => - { - try - { - using (new HydraRingCalculatorFactoryConfig()) - { - var calculator = ((TestHydraRingCalculatorFactory) HydraRingCalculatorFactory.Instance).OvertoppingCalculator; - calculator.EndInFailure = true; - - new GrassCoverErosionInwardsCalculationService().Calculate(calculation, - assessmentSectionStub, - failureMechanismSection, - grassCoverErosionInwardsFailureMechanism.GeneralInput, - grassCoverErosionInwardsFailureMechanism.Contribution, - validFile); - } - } - catch (HydraRingFileParserException) - { - expectedExceptionThrown = true; - } - }; - - // Assert - TestHelper.AssertLogMessages(call, messages => - { - var msgs = messages.ToArray(); - Assert.AreEqual(4, msgs.Length); - StringAssert.StartsWith(string.Format("Berekening van '{0}' gestart om: ", calculation.Name), msgs[0]); - StringAssert.StartsWith(string.Format("De berekening voor grasbekleding erosie kruin en binnentalud '{0}' is niet gelukt.", calculation.Name), msgs[1]); - StringAssert.StartsWith("Overloop berekening is uitgevoerd op de tijdelijke locatie", msgs[2]); - StringAssert.StartsWith(string.Format("Berekening van '{0}' beëindigd om: ", calculation.Name), msgs[3]); - }); - Assert.IsTrue(expectedExceptionThrown); - Assert.IsNull(calculation.Output); - - mockRepository.VerifyAll(); - } - - [Test] public void Calculate_CancelWithValidOvertoppingCalculationInput_CancelsCalculatorAndHasNullOutput() { // Setup @@ -693,7 +626,9 @@ } [Test] - public void Calculate_OvertoppingCalculationFailedWithExceptionAndLastErrorPresent_LogErrorAndThrowException() + [TestCase(true)] + [TestCase(false)] + public void Calculate_OvertoppingCalculationFailedWithExceptionAndLastErrorPresent_LogErrorAndThrowException(bool calculateDikeHeight) { // Setup var failureMechanism = new GrassCoverErosionInwardsFailureMechanism(); @@ -713,7 +648,7 @@ { HydraulicBoundaryLocation = assessmentSectionStub.HydraulicBoundaryDatabase.Locations.First(hl => hl.Id == 1300001), DikeProfile = dikeProfile, - CalculateDikeHeight = true + CalculateDikeHeight = calculateDikeHeight } }; @@ -755,12 +690,15 @@ StringAssert.StartsWith("Overloop berekening is uitgevoerd op de tijdelijke locatie", msgs[2]); StringAssert.StartsWith(string.Format("Berekening van '{0}' beëindigd om: ", calculation.Name), msgs[3]); }); + Assert.IsNull(calculation.Output); Assert.IsTrue(exceptionThrown); } } [Test] - public void Calculate_OvertoppingCalculationFailedWithExceptionAndNoLastErrorPresent_LogErrorAndThrowException() + [TestCase(true)] + [TestCase(false)] + public void Calculate_OvertoppingCalculationFailedWithExceptionAndNoLastErrorPresent_LogErrorAndThrowException(bool calculateDikeHeight) { // Setup var failureMechanism = new GrassCoverErosionInwardsFailureMechanism(); @@ -780,7 +718,7 @@ { HydraulicBoundaryLocation = assessmentSectionStub.HydraulicBoundaryDatabase.Locations.First(hl => hl.Id == 1300001), DikeProfile = dikeProfile, - CalculateDikeHeight = true + CalculateDikeHeight = calculateDikeHeight } }; @@ -827,7 +765,9 @@ } [Test] - public void Calculate_OvertoppingCalculationFailedWithoutExceptionAndWithLastErrorPresent_LogErrorAndThrowException() + [TestCase(true)] + [TestCase(false)] + public void Calculate_OvertoppingCalculationFailedWithoutExceptionAndWithLastErrorPresent_LogErrorAndThrowException(bool calculateDikeHeight) { // Setup var failureMechanism = new GrassCoverErosionInwardsFailureMechanism(); @@ -847,7 +787,7 @@ { HydraulicBoundaryLocation = assessmentSectionStub.HydraulicBoundaryDatabase.Locations.First(hl => hl.Id == 1300001), DikeProfile = dikeProfile, - CalculateDikeHeight = true + CalculateDikeHeight = calculateDikeHeight } }; @@ -962,6 +902,7 @@ StringAssert.StartsWith("Dijkhoogte berekening is uitgevoerd op de tijdelijke locatie", msgs[3]); StringAssert.StartsWith(string.Format("Berekening van '{0}' beëindigd om: ", calculation.Name), msgs[4]); }); + Assert.IsNotNull(calculation.Output); Assert.IsFalse(exceptionThrown); } } @@ -974,8 +915,7 @@ AddSectionToFailureMechanism(failureMechanism); var mockRepository = new MockRepository(); - IAssessmentSection assessmentSectionStub = AssessmentSectionHelper.CreateAssessmentSectionStub(failureMechanism, - mockRepository, + IAssessmentSection assessmentSectionStub = AssessmentSectionHelper.CreateAssessmentSectionStub(failureMechanism, mockRepository, validFile); mockRepository.ReplayAll(); @@ -1029,6 +969,7 @@ StringAssert.StartsWith("Dijkhoogte berekening is uitgevoerd op de tijdelijke locatie", msgs[3]); StringAssert.StartsWith(string.Format("Berekening van '{0}' beëindigd om: ", calculation.Name), msgs[4]); }); + Assert.IsNotNull(calculation.Output); Assert.IsFalse(exceptionThrown); } } @@ -1097,6 +1038,7 @@ StringAssert.StartsWith("Dijkhoogte berekening is uitgevoerd op de tijdelijke locatie", msgs[3]); StringAssert.StartsWith(string.Format("Berekening van '{0}' beëindigd om: ", calculation.Name), msgs[4]); }); + Assert.IsNotNull(calculation.Output); Assert.IsFalse(exceptionThrown); } } Index: Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Service.Test/GrassCoverErosionOutwardsWaveConditionsCalculationServiceTest.cs =================================================================== diff -u -r2b26e7134b3918e67f8b23a6db3f90fad0d4f12e -r533cc8038f03f3acb30f4db787a3d583f93f7008 --- Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Service.Test/GrassCoverErosionOutwardsWaveConditionsCalculationServiceTest.cs (.../GrassCoverErosionOutwardsWaveConditionsCalculationServiceTest.cs) (revision 2b26e7134b3918e67f8b23a6db3f90fad0d4f12e) +++ Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Service.Test/GrassCoverErosionOutwardsWaveConditionsCalculationServiceTest.cs (.../GrassCoverErosionOutwardsWaveConditionsCalculationServiceTest.cs) (revision 533cc8038f03f3acb30f4db787a3d583f93f7008) @@ -584,6 +584,7 @@ StringAssert.StartsWith(string.Format("Berekening van '{0}' beëindigd om: ", calculation.Name), msgs[5]); }); + Assert.IsNull(calculation.Output); Assert.IsTrue(exception); } mockRepository.VerifyAll(); Index: Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Service/HeightStructuresCalculationService.cs =================================================================== diff -u -r874233bdb7814bef40b639e0fb4d26a0b86616a0 -r533cc8038f03f3acb30f4db787a3d583f93f7008 --- Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Service/HeightStructuresCalculationService.cs (.../HeightStructuresCalculationService.cs) (revision 874233bdb7814bef40b639e0fb4d26a0b86616a0) +++ Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Service/HeightStructuresCalculationService.cs (.../HeightStructuresCalculationService.cs) (revision 533cc8038f03f3acb30f4db787a3d583f93f7008) @@ -118,7 +118,7 @@ { calculator.Calculate(input); - if (!canceled) + if (!canceled && string.IsNullOrEmpty(calculator.LastErrorFileContent)) { calculation.Output = ProbabilityAssessmentService.Calculate(assessmentSection.FailureMechanismContribution.Norm, failureMechanism.Contribution, Index: Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Service.Test/HeightStructuresCalculationServiceTest.cs =================================================================== diff -u -r2b26e7134b3918e67f8b23a6db3f90fad0d4f12e -r533cc8038f03f3acb30f4db787a3d583f93f7008 --- Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Service.Test/HeightStructuresCalculationServiceTest.cs (.../HeightStructuresCalculationServiceTest.cs) (revision 2b26e7134b3918e67f8b23a6db3f90fad0d4f12e) +++ Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Service.Test/HeightStructuresCalculationServiceTest.cs (.../HeightStructuresCalculationServiceTest.cs) (revision 533cc8038f03f3acb30f4db787a3d583f93f7008) @@ -929,6 +929,7 @@ StringAssert.StartsWith(string.Format("Berekening van '{0}' beëindigd om: ", calculation.Name), msgs[3]); }); Assert.IsTrue(exceptionThrown); + Assert.IsNull(calculation.Output); Assert.AreEqual(calculator.LastErrorFileContent, exceptionMessage); } mockRepository.VerifyAll(); Index: Ringtoets/StabilityPointStructures/src/Ringtoets.StabilityPointStructures.Service/StabilityPointStructuresCalculationService.cs =================================================================== diff -u -r874233bdb7814bef40b639e0fb4d26a0b86616a0 -r533cc8038f03f3acb30f4db787a3d583f93f7008 --- Ringtoets/StabilityPointStructures/src/Ringtoets.StabilityPointStructures.Service/StabilityPointStructuresCalculationService.cs (.../StabilityPointStructuresCalculationService.cs) (revision 874233bdb7814bef40b639e0fb4d26a0b86616a0) +++ Ringtoets/StabilityPointStructures/src/Ringtoets.StabilityPointStructures.Service/StabilityPointStructuresCalculationService.cs (.../StabilityPointStructuresCalculationService.cs) (revision 533cc8038f03f3acb30f4db787a3d583f93f7008) @@ -114,7 +114,7 @@ { calculator.Calculate(input); - if (!canceled) + if (!canceled && string.IsNullOrEmpty(calculator.LastErrorFileContent)) { calculation.Output = ProbabilityAssessmentService.Calculate(assessmentSection.FailureMechanismContribution.Norm, failureMechanism.Contribution, Index: Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.Service.Test/StabilityPointStructuresCalculationServiceTest.cs =================================================================== diff -u -r2b26e7134b3918e67f8b23a6db3f90fad0d4f12e -r533cc8038f03f3acb30f4db787a3d583f93f7008 --- Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.Service.Test/StabilityPointStructuresCalculationServiceTest.cs (.../StabilityPointStructuresCalculationServiceTest.cs) (revision 2b26e7134b3918e67f8b23a6db3f90fad0d4f12e) +++ Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.Service.Test/StabilityPointStructuresCalculationServiceTest.cs (.../StabilityPointStructuresCalculationServiceTest.cs) (revision 533cc8038f03f3acb30f4db787a3d583f93f7008) @@ -1579,6 +1579,7 @@ StringAssert.StartsWith(string.Format("Berekening van '{0}' beëindigd om: ", calculation.Name), msgs[3]); }); Assert.IsTrue(exceptionThrown); + Assert.IsNull(calculation.Output); Assert.AreEqual(calculator.LastErrorFileContent, exceptionMessage); } mockRepository.VerifyAll();