Index: Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Plugin.Test/UpdateInfos/DikeProfilesContextUpdateInfoTest.cs =================================================================== diff -u -ra70cb733eb761229173777b9f6cd1b977830b24b -r6ea2281c03c04dfbfaa7742d533fc1f88b96f59c --- Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Plugin.Test/UpdateInfos/DikeProfilesContextUpdateInfoTest.cs (.../DikeProfilesContextUpdateInfoTest.cs) (revision a70cb733eb761229173777b9f6cd1b977830b24b) +++ Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Plugin.Test/UpdateInfos/DikeProfilesContextUpdateInfoTest.cs (.../DikeProfilesContextUpdateInfoTest.cs) (revision 6ea2281c03c04dfbfaa7742d533fc1f88b96f59c) @@ -33,6 +33,7 @@ using Rhino.Mocks; using Ringtoets.Common.Data.AssessmentSection; using Ringtoets.Common.Data.DikeProfiles; +using Ringtoets.Common.Data.TestUtil; using Ringtoets.Common.IO.FileImporters; using Ringtoets.GrassCoverErosionInwards.Data; using Ringtoets.GrassCoverErosionInwards.Data.TestUtil; @@ -277,6 +278,38 @@ } } + [Test] + public void CurrentPath_DikeProfileCollectionHasPathSet_ReturnsExpectedPath() + { + // Setup + var mocks = new MockRepository(); + var assessmentSection = mocks.Stub(); + mocks.ReplayAll(); + + const string expectedFilePath = "some/path"; + var surfaceLines = new DikeProfileCollection(); + surfaceLines.AddRange(new[] + { + new TestDikeProfile() + }, expectedFilePath); + + var failureMechanism = new GrassCoverErosionInwardsFailureMechanism(); + + var context = new DikeProfilesContext(surfaceLines, failureMechanism, assessmentSection); + + using (var plugin = new GrassCoverErosionInwardsPlugin()) + { + UpdateInfo updateInfo = GetUpdateInfo(plugin); + + // Call + string currentFilePath = updateInfo.CurrentPath(context); + + // Assert + Assert.AreEqual(expectedFilePath, currentFilePath); + mocks.VerifyAll(); + } + } + private static UpdateInfo GetUpdateInfo(GrassCoverErosionInwardsPlugin plugin) { return plugin.GetUpdateInfos().First(ii => ii.DataType == typeof(DikeProfilesContext));