Index: Ringtoets/Common/test/Ringtoets.Common.Service.Test/DesignWaterLevelCalculationActivityTest.cs =================================================================== diff -u -r1a595dde70f3b4eadd73cab397c994825bdb13ab -r2812443e00840082c4b6a91fe1755f3b0cd807a0 --- Ringtoets/Common/test/Ringtoets.Common.Service.Test/DesignWaterLevelCalculationActivityTest.cs (.../DesignWaterLevelCalculationActivityTest.cs) (revision 1a595dde70f3b4eadd73cab397c994825bdb13ab) +++ Ringtoets/Common/test/Ringtoets.Common.Service.Test/DesignWaterLevelCalculationActivityTest.cs (.../DesignWaterLevelCalculationActivityTest.cs) (revision 2812443e00840082c4b6a91fe1755f3b0cd807a0) @@ -325,8 +325,10 @@ CalculationServiceTestHelper.AssertValidationEndMessage(messages[2]); CalculationServiceTestHelper.AssertCalculationStartMessage(messages[3]); - string errorMessage = GetErrorMessage(endInFailure, lastErrorFileContent); - Assert.AreEqual($"Er is een fout opgetreden tijdens de toetspeil berekening 'locationName' (Categorie {categoryBoundaryName}). {errorMessage}", messages[4]); + string expectedFailureMessage = string.IsNullOrEmpty(lastErrorFileContent) + ? $"Er is een fout opgetreden tijdens de toetspeil berekening '{locationName}' (Categorie {categoryBoundaryName}). Er is geen foutrapport beschikbaar." + : $"Er is een fout opgetreden tijdens de toetspeil berekening '{locationName}' (Categorie {categoryBoundaryName}). Bekijk het foutrapport door op details te klikken.{Environment.NewLine}{lastErrorFileContent}"; + Assert.AreEqual(expectedFailureMessage, messages[4]); StringAssert.StartsWith("Waterstand berekening is uitgevoerd op de tijdelijke locatie", messages[5]); CalculationServiceTestHelper.AssertCalculationEndMessage(messages[6]); @@ -424,25 +426,6 @@ mockRepository.VerifyAll(); } - private static string GetErrorMessage(bool endInFailure, string lastErrorFileContent) - { - string errorMessage; - if (endInFailure && string.IsNullOrEmpty(lastErrorFileContent)) - { - errorMessage = "Er is geen foutrapport beschikbaar."; - } - else if (endInFailure) - { - errorMessage = "Bekijk het foutrapport door op details te klikken.\r\nLastErrorFileContentAndEndInFailure"; - } - else - { - errorMessage = "Bekijk het foutrapport door op details te klikken.\r\nLastErrorFileContent"; - } - - return errorMessage; - } - private static string GetActivityDescription(string locationName, string categoryBoundaryName) { return $"Waterstand berekenen voor locatie '{locationName}' (Categorie {categoryBoundaryName})";