Index: Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Service.Test/GrassCoverErosionInwardsCalculationServiceTest.cs =================================================================== diff -u -r7fa4481428458d47cc3ec2fe6e75b12a1c539c8d -r0eb4a6e9f82ad1e6d0924c92e0e1a0a3825ff6b3 --- Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Service.Test/GrassCoverErosionInwardsCalculationServiceTest.cs (.../GrassCoverErosionInwardsCalculationServiceTest.cs) (revision 7fa4481428458d47cc3ec2fe6e75b12a1c539c8d) +++ Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Service.Test/GrassCoverErosionInwardsCalculationServiceTest.cs (.../GrassCoverErosionInwardsCalculationServiceTest.cs) (revision 0eb4a6e9f82ad1e6d0924c92e0e1a0a3825ff6b3) @@ -44,7 +44,7 @@ private static readonly string testDataPath = TestHelper.GetTestDataPath(TestDataPath.Ringtoets.Integration.Service, "HydraRingCalculation"); [Test] - public void Validate_NoHydraulicBoundaryDatabase_LogsErrorAndReturnsFalse() + public void Validate_NoHydraulicBoundaryLocation_LogsErrorAndReturnsFalse() { // Setup var grassCoverErosionInwardsFailureMechanism = new GrassCoverErosionInwardsFailureMechanism(); @@ -55,8 +55,6 @@ var assessmentSectionStub = AssessmentSectionHelper.CreateAssessmentSectionStub(grassCoverErosionInwardsFailureMechanism, mockRepository, filePath); mockRepository.ReplayAll(); - assessmentSectionStub.HydraulicBoundaryDatabase = null; - const string name = ""; GrassCoverErosionInwardsCalculation calculation = new GrassCoverErosionInwardsCalculation @@ -79,48 +77,6 @@ var msgs = messages.ToArray(); Assert.AreEqual(3, msgs.Length); StringAssert.StartsWith(string.Format("Validatie van '{0}' gestart om: ", name), msgs[0]); - StringAssert.StartsWith("Validatie mislukt: Er is geen hydraulische randvoorwaardendatabase geïmporteerd.", msgs[1]); - StringAssert.StartsWith(string.Format("Validatie van '{0}' beëindigd om: ", name), msgs[2]); - }); - Assert.IsFalse(isValid); - - mockRepository.VerifyAll(); - } - - [Test] - public void Validate_NoHydraulicBoundarLocation_LogsErrorAndReturnsFalse() - { - // Setup - var grassCoverErosionInwardsFailureMechanism = new GrassCoverErosionInwardsFailureMechanism(); - - var filePath = Path.Combine(testDataPath, "HRD dutch coast south.sqlite"); - - var mockRepository = new MockRepository(); - var assessmentSectionStub = AssessmentSectionHelper.CreateAssessmentSectionStub(grassCoverErosionInwardsFailureMechanism, mockRepository, filePath); - mockRepository.ReplayAll(); - - const string name = ""; - - GrassCoverErosionInwardsCalculation calculation = new GrassCoverErosionInwardsCalculation - { - Name = name, - InputParameters = - { - DikeProfile = new DikeProfile(new Point2D(0, 0), new RoughnessPoint[0], new Point2D[0], - null, new DikeProfile.ConstructionProperties()) - } - }; - - // Call - bool isValid = false; - Action call = () => isValid = GrassCoverErosionInwardsCalculationService.Validate(calculation, assessmentSectionStub); - - // Assert - TestHelper.AssertLogMessages(call, messages => - { - var msgs = messages.ToArray(); - Assert.AreEqual(3, msgs.Length); - StringAssert.StartsWith(string.Format("Validatie van '{0}' gestart om: ", name), msgs[0]); StringAssert.StartsWith("Validatie mislukt: Er is geen hydraulische randvoorwaardenlocatie geselecteerd.", msgs[1]); StringAssert.StartsWith(string.Format("Validatie van '{0}' beëindigd om: ", name), msgs[2]); });