Index: Riskeer/Common/test/Riskeer.Common.Forms.Test/GuiServices/HydraulicBoundaryLocationCalculationGuiServiceTest.cs =================================================================== diff -u -r519cab13efb803884d0eaf1bafbc662ef2a2a692 -rb560a9e10b303dd00a605d8aa30fd834d63ba222 --- Riskeer/Common/test/Riskeer.Common.Forms.Test/GuiServices/HydraulicBoundaryLocationCalculationGuiServiceTest.cs (.../HydraulicBoundaryLocationCalculationGuiServiceTest.cs) (revision 519cab13efb803884d0eaf1bafbc662ef2a2a692) +++ Riskeer/Common/test/Riskeer.Common.Forms.Test/GuiServices/HydraulicBoundaryLocationCalculationGuiServiceTest.cs (.../HydraulicBoundaryLocationCalculationGuiServiceTest.cs) (revision b560a9e10b303dd00a605d8aa30fd834d63ba222) @@ -83,7 +83,7 @@ var guiService = new HydraulicBoundaryLocationCalculationGuiService(viewParent); // Call - void Call() => guiService.CalculateDesignWaterLevels(Enumerable.Empty(), null, 0.01, "A"); + void Call() => guiService.CalculateDesignWaterLevels(Enumerable.Empty(), null, 0.01, "1/10000"); // Assert var exception = Assert.Throws(Call); @@ -103,7 +103,7 @@ var guiService = new HydraulicBoundaryLocationCalculationGuiService(viewParent); // Call - void Call() => guiService.CalculateDesignWaterLevels(null, assessmentSection, 0.01, "A"); + void Call() => guiService.CalculateDesignWaterLevels(null, assessmentSection, 0.01, "1/10000"); // Assert var exception = Assert.Throws(Call); @@ -126,7 +126,7 @@ var guiService = new HydraulicBoundaryLocationCalculationGuiService(viewParent); // Call - void Call() => guiService.CalculateDesignWaterLevels(Enumerable.Empty(), assessmentSection, 0.01, "A"); + void Call() => guiService.CalculateDesignWaterLevels(Enumerable.Empty(), assessmentSection, 0.01, "1/10000"); // Assert TestHelper.AssertLogMessages(Call, messages => @@ -154,7 +154,7 @@ var guiService = new HydraulicBoundaryLocationCalculationGuiService(viewParent); // Call - void Call() => guiService.CalculateDesignWaterLevels(Enumerable.Empty(), assessmentSection, 1.0, "A"); + void Call() => guiService.CalculateDesignWaterLevels(Enumerable.Empty(), assessmentSection, 1.0, "1/10000"); // Assert TestHelper.AssertLogMessageIsGenerated(Call, "Berekeningen konden niet worden gestart. Doelkans is te groot om een berekening uit te kunnen voeren."); @@ -183,7 +183,7 @@ var guiService = new HydraulicBoundaryLocationCalculationGuiService(viewParent); // Call - void Call() => guiService.CalculateDesignWaterLevels(Enumerable.Empty(), assessmentSection, 0.01, "A"); + void Call() => guiService.CalculateDesignWaterLevels(Enumerable.Empty(), assessmentSection, 0.01, "1/10000"); // Assert TestHelper.AssertLogMessagesCount(Call, 0); @@ -197,7 +197,7 @@ { // Setup const string hydraulicLocationName = "name"; - const string categoryBoundaryName = "A"; + const string calculationIdentifier = "1/10000"; var mocks = new MockRepository(); IAssessmentSection assessmentSection = AssessmentSectionTestHelper.CreateAssessmentSectionStub(mocks); @@ -231,19 +231,19 @@ guiService.CalculateDesignWaterLevels(new[] { new HydraulicBoundaryLocationCalculation(new TestHydraulicBoundaryLocation(hydraulicLocationName)) - }, assessmentSection, 0.01, categoryBoundaryName); + }, assessmentSection, 0.01, calculationIdentifier); // Assert TestHelper.AssertLogMessages(Call, messages => { string[] msgs = messages.ToArray(); Assert.AreEqual(8, msgs.Length); - string activityDescription = GetDesignWaterLevelCalculationActivityDescription(hydraulicLocationName, categoryBoundaryName); + string activityDescription = GetDesignWaterLevelCalculationActivityDescription(hydraulicLocationName, calculationIdentifier); Assert.AreEqual($"{activityDescription} is gestart.", msgs[0]); CalculationServiceTestHelper.AssertValidationStartMessage(msgs[1]); CalculationServiceTestHelper.AssertValidationEndMessage(msgs[2]); CalculationServiceTestHelper.AssertCalculationStartMessage(msgs[3]); - Assert.AreEqual($"Waterstand berekening voor locatie 'name' (Categoriegrens {categoryBoundaryName}) is niet geconvergeerd.", msgs[4]); + Assert.AreEqual($"Waterstand berekening voor locatie 'name' ({calculationIdentifier}) is niet geconvergeerd.", msgs[4]); StringAssert.StartsWith("Waterstand berekening is uitgevoerd op de tijdelijke locatie", msgs[5]); CalculationServiceTestHelper.AssertCalculationEndMessage(msgs[6]); Assert.AreEqual($"{activityDescription} is gelukt.", msgs[7]); @@ -264,7 +264,7 @@ var guiService = new HydraulicBoundaryLocationCalculationGuiService(viewParent); // Call - void Call() => guiService.CalculateWaveHeights(Enumerable.Empty(), null, 0.01, "A"); + void Call() => guiService.CalculateWaveHeights(Enumerable.Empty(), null, 0.01, "1/10000"); // Assert var exception = Assert.Throws(Call); @@ -284,7 +284,7 @@ var guiService = new HydraulicBoundaryLocationCalculationGuiService(viewParent); // Call - void Call() => guiService.CalculateWaveHeights(null, assessmentSection, 0.01, "A"); + void Call() => guiService.CalculateWaveHeights(null, assessmentSection, 0.01, "1/10000"); // Assert var exception = Assert.Throws(Call); @@ -307,7 +307,7 @@ var guiService = new HydraulicBoundaryLocationCalculationGuiService(viewParent); // Call - void Call() => guiService.CalculateWaveHeights(Enumerable.Empty(), assessmentSection, 0.01, "A"); + void Call() => guiService.CalculateWaveHeights(Enumerable.Empty(), assessmentSection, 0.01, "1/10000"); // Assert TestHelper.AssertLogMessages(Call, messages => @@ -334,7 +334,7 @@ var guiService = new HydraulicBoundaryLocationCalculationGuiService(viewParent); // Call - void Call() => guiService.CalculateWaveHeights(Enumerable.Empty(), assessmentSection, 1.0, "A"); + void Call() => guiService.CalculateWaveHeights(Enumerable.Empty(), assessmentSection, 1.0, "1/10000"); // Assert TestHelper.AssertLogMessageIsGenerated(Call, "Berekeningen konden niet worden gestart. Doelkans is te groot om een berekening uit te kunnen voeren."); @@ -362,7 +362,7 @@ var guiService = new HydraulicBoundaryLocationCalculationGuiService(viewParent); // Call - void Call() => guiService.CalculateWaveHeights(Enumerable.Empty(), assessmentSection, 0.01, "A"); + void Call() => guiService.CalculateWaveHeights(Enumerable.Empty(), assessmentSection, 0.01, "1/10000"); // Assert TestHelper.AssertLogMessagesCount(Call, 0); @@ -376,7 +376,7 @@ { // Setup const string hydraulicLocationName = "name"; - const string categoryBoundaryName = "A"; + const string calculationIdentifier = "1/10000"; var mocks = new MockRepository(); IAssessmentSection assessmentSection = AssessmentSectionTestHelper.CreateAssessmentSectionStub(mocks); @@ -410,19 +410,19 @@ guiService.CalculateWaveHeights(new[] { new HydraulicBoundaryLocationCalculation(new TestHydraulicBoundaryLocation(hydraulicLocationName)) - }, assessmentSection, 0.01, categoryBoundaryName); + }, assessmentSection, 0.01, calculationIdentifier); // Assert TestHelper.AssertLogMessages(Call, messages => { string[] msgs = messages.ToArray(); Assert.AreEqual(8, msgs.Length); - string activityDescription = GetWaveHeightCalculationActivityDescription(hydraulicLocationName, categoryBoundaryName); + string activityDescription = GetWaveHeightCalculationActivityDescription(hydraulicLocationName, calculationIdentifier); Assert.AreEqual($"{activityDescription} is gestart.", msgs[0]); CalculationServiceTestHelper.AssertValidationStartMessage(msgs[1]); CalculationServiceTestHelper.AssertValidationEndMessage(msgs[2]); CalculationServiceTestHelper.AssertCalculationStartMessage(msgs[3]); - Assert.AreEqual($"Golfhoogte berekening voor locatie 'name' (Categoriegrens {categoryBoundaryName}) is niet geconvergeerd.", msgs[4]); + Assert.AreEqual($"Golfhoogte berekening voor locatie 'name' ({calculationIdentifier}) is niet geconvergeerd.", msgs[4]); StringAssert.StartsWith("Golfhoogte berekening is uitgevoerd op de tijdelijke locatie", msgs[5]); CalculationServiceTestHelper.AssertCalculationEndMessage(msgs[6]); Assert.AreEqual($"{activityDescription} is gelukt.", msgs[7]); @@ -432,14 +432,14 @@ mocks.VerifyAll(); } - private static string GetWaveHeightCalculationActivityDescription(string locationName, string categoryBoundaryName) + private static string GetWaveHeightCalculationActivityDescription(string locationName, string calculationIdentifier) { - return $"Golfhoogte berekenen voor locatie '{locationName}' (Categoriegrens {categoryBoundaryName})"; + return $"Golfhoogte berekenen voor locatie '{locationName}' ({calculationIdentifier})"; } - private static string GetDesignWaterLevelCalculationActivityDescription(string locationName, string categoryBoundaryName) + private static string GetDesignWaterLevelCalculationActivityDescription(string locationName, string calculationIdentifier) { - return $"Waterstand berekenen voor locatie '{locationName}' (Categoriegrens {categoryBoundaryName})"; + return $"Waterstand berekenen voor locatie '{locationName}' ({calculationIdentifier})"; } } } \ No newline at end of file