Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Service.Test/MacroStabilityInwardsCalculationServiceTest.cs =================================================================== diff -u -r4bc5ff4364eac6c47a2deaddf701eb9d4f1191c5 -r457252870eff6f6c559976ae2a479112b5754bec --- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Service.Test/MacroStabilityInwardsCalculationServiceTest.cs (.../MacroStabilityInwardsCalculationServiceTest.cs) (revision 4bc5ff4364eac6c47a2deaddf701eb9d4f1191c5) +++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Service.Test/MacroStabilityInwardsCalculationServiceTest.cs (.../MacroStabilityInwardsCalculationServiceTest.cs) (revision 457252870eff6f6c559976ae2a479112b5754bec) @@ -322,6 +322,29 @@ } [Test] + public void Validate_ErrorWhileValidating_LogErrorMessage() + { + // Setup + using (new MacroStabilityInwardsCalculatorFactoryConfig()) + { + var calculatorFactory = (TestMacroStabilityInwardsCalculatorFactory) MacroStabilityInwardsCalculatorFactory.Instance; + calculatorFactory.LastCreatedUpliftVanCalculator.ThrowExceptionOnValidate = true; + + // Call + Action call = () => { MacroStabilityInwardsCalculationService.Validate(testCalculation); }; + + // Assert + TestHelper.AssertLogMessagesWithLevelAndLoggedExceptions(call, tuples => + { + Tuple tuple = tuples.ElementAt(1); + Assert.AreEqual("Macrostabiliteit validatie mislukt.", tuple.Item1); + Assert.AreEqual(Level.Error, tuple.Item2); + Assert.IsInstanceOf(tuple.Item3); + }); + } + } + + [Test] public void Calculate_CalculationNull_ThrowArgumentNullException() { // Call