Index: Core/Components/src/Core.Components.DotSpatial/BaseMap.cs =================================================================== diff -u -r4e50b5b9df5cafb3e6ea879b5b7d1963de68430d -rb1b49c693efe7922bb723c350eeb66494460d8bd --- Core/Components/src/Core.Components.DotSpatial/BaseMap.cs (.../BaseMap.cs) (revision 4e50b5b9df5cafb3e6ea879b5b7d1963de68430d) +++ Core/Components/src/Core.Components.DotSpatial/BaseMap.cs (.../BaseMap.cs) (revision b1b49c693efe7922bb723c350eeb66494460d8bd) @@ -51,7 +51,7 @@ } else { - throw new MapDataException("The data available in MapData is not valid."); + throw new MapDataException(Resources.BaseMap_SetMapData_The_data_available_in_MapData_is_not_valid_); } } Index: Core/Components/src/Core.Components.DotSpatial/Exceptions/MapDataException.cs =================================================================== diff -u -r8605d66cdc1266af3a372af46c9d32008f1261e4 -rb1b49c693efe7922bb723c350eeb66494460d8bd --- Core/Components/src/Core.Components.DotSpatial/Exceptions/MapDataException.cs (.../MapDataException.cs) (revision 8605d66cdc1266af3a372af46c9d32008f1261e4) +++ Core/Components/src/Core.Components.DotSpatial/Exceptions/MapDataException.cs (.../MapDataException.cs) (revision b1b49c693efe7922bb723c350eeb66494460d8bd) @@ -1,9 +1,10 @@ using System; +using Core.Components.DotSpatial.Data; namespace Core.Components.DotSpatial.Exceptions { /// - /// The exception that is thrown when an entity is not found. + /// The exception that is thrown when the is not valid. /// public class MapDataException : Exception { Index: Core/Components/src/Core.Components.DotSpatial/Properties/Resources.Designer.cs =================================================================== diff -u -r04c70d10f22ba007f8210813d3d02697e42f8a5d -rb1b49c693efe7922bb723c350eeb66494460d8bd --- Core/Components/src/Core.Components.DotSpatial/Properties/Resources.Designer.cs (.../Resources.Designer.cs) (revision 04c70d10f22ba007f8210813d3d02697e42f8a5d) +++ Core/Components/src/Core.Components.DotSpatial/Properties/Resources.Designer.cs (.../Resources.Designer.cs) (revision b1b49c693efe7922bb723c350eeb66494460d8bd) @@ -70,6 +70,15 @@ } /// + /// Looks up a localized string similar to De data in MapData is niet valide.. + /// + public static string BaseMap_SetMapData_The_data_available_in_MapData_is_not_valid_ { + get { + return ResourceManager.GetString("BaseMap_SetMapData_The_data_available_in_MapData_is_not_valid_", resourceCulture); + } + } + + /// /// Looks up a localized string similar to Bestand op pad {0} bestaat niet.. /// public static string MapData_IsPathValid_File_on_path__0__does_not_exist { Index: Core/Components/src/Core.Components.DotSpatial/Properties/Resources.resx =================================================================== diff -u -r04c70d10f22ba007f8210813d3d02697e42f8a5d -rb1b49c693efe7922bb723c350eeb66494460d8bd --- Core/Components/src/Core.Components.DotSpatial/Properties/Resources.resx (.../Resources.resx) (revision 04c70d10f22ba007f8210813d3d02697e42f8a5d) +++ Core/Components/src/Core.Components.DotSpatial/Properties/Resources.resx (.../Resources.resx) (revision b1b49c693efe7922bb723c350eeb66494460d8bd) @@ -126,4 +126,7 @@ Shape file op pad {0} is aan de kaart toegevoegd. + + De data in MapData is niet valide. + \ No newline at end of file Index: Core/Components/test/Core.Components.DotSpatial.Test/Data/MapDataTest.cs =================================================================== diff -u -r8605d66cdc1266af3a372af46c9d32008f1261e4 -rb1b49c693efe7922bb723c350eeb66494460d8bd --- Core/Components/test/Core.Components.DotSpatial.Test/Data/MapDataTest.cs (.../MapDataTest.cs) (revision 8605d66cdc1266af3a372af46c9d32008f1261e4) +++ Core/Components/test/Core.Components.DotSpatial.Test/Data/MapDataTest.cs (.../MapDataTest.cs) (revision b1b49c693efe7922bb723c350eeb66494460d8bd) @@ -11,6 +11,17 @@ [TestFixture] public class MapDataTest { + [TestFixtureTearDown] + public void CleanRenamedFile() + { + var newPath = string.Format("{0}\\Resources\\DR10_binnenteen.shp", Environment.CurrentDirectory + var oldPath = string.Format("{0}\\Resources\\DR10_teen.shp", Environment.CurrentDirectory); + + RenameFile(newPath, oldPath); + + File.Delete(oldPath); + } + [Test] public void Constructor_Always_CreatesHashSet() { @@ -35,10 +46,10 @@ // Assert Assert.IsTrue(succeeded); - CollectionAssert.AreEquivalent(data.FilePaths, new[] + CollectionAssert.AreEquivalent(new[] { filePath - }); + }, data.FilePaths); } [Test] @@ -55,10 +66,10 @@ // Assert Assert.IsTrue(succeededFirst); Assert.IsFalse(succeededSecond); - CollectionAssert.AreEquivalent(data.FilePaths, new[] + CollectionAssert.AreEquivalent(new[] { filePath - }); + }, data.FilePaths); } [Test] @@ -128,7 +139,7 @@ addedPaths.Add(path); // Assert - CollectionAssert.AreEqual(data.FilePaths, addedPaths); + CollectionAssert.AreEqual(addedPaths, data.FilePaths); } } @@ -143,8 +154,7 @@ // Assert Assert.IsFalse(result); - CollectionAssert.AreEqual(new string[] - {}, data.FilePaths); + CollectionAssert.IsEmpty(data.FilePaths); } [Test] @@ -160,10 +170,10 @@ // Assert Assert.IsTrue(result); - CollectionAssert.AreEqual(data.FilePaths, new[] + CollectionAssert.AreEqual(new[] { path - }); + }, data.FilePaths); } [Test] @@ -181,16 +191,21 @@ RenameFile(newPath, path); - // Call - bool resultAfterDelete = data.IsValid(); + try + { + // Call + bool resultAfterRename = data.IsValid(); - // Place original file back for other tests. - RenameFile(path, newPath); - - // Assert - Assert.AreNotEqual(result, resultAfterDelete); - Assert.IsTrue(result); - Assert.IsFalse(resultAfterDelete); + // Assert + Assert.AreNotEqual(result, resultAfterRename); + Assert.IsTrue(result); + Assert.IsFalse(resultAfterRename); + } + finally + { + // Place original file back for other tests. + RenameFile(path, newPath); + } } [Test] @@ -215,17 +230,22 @@ RenameFile(newPath, paths[0]); - // Call - bool resultAfterDelete = data.IsValid(); + try + { + // Call + bool resultAfterRename = data.IsValid(); - // Place the original file back for other tests. - RenameFile(paths[0], newPath); - - // Assert - Assert.AreNotEqual(result, resultAfterDelete); - Assert.IsTrue(result); - Assert.IsFalse(resultAfterDelete); - CollectionAssert.AreEquivalent(paths, data.FilePaths); + // Assert + Assert.AreNotEqual(result, resultAfterRename); + Assert.IsTrue(result); + Assert.IsFalse(resultAfterRename); + CollectionAssert.AreEquivalent(paths, data.FilePaths); + } + finally + { + // Place the original file back for other tests. + RenameFile(paths[0], newPath); + } } private static void RenameFile(string newPath, string path) Index: Demo/Ringtoets/src/Demo.Ringtoets/Ribbons/RingtoetsDemoProjectRibbon.xaml =================================================================== diff -u -rd182ae6d1a6590c4b52b17fd1f59c5b7c3780b48 -rb1b49c693efe7922bb723c350eeb66494460d8bd --- Demo/Ringtoets/src/Demo.Ringtoets/Ribbons/RingtoetsDemoProjectRibbon.xaml (.../RingtoetsDemoProjectRibbon.xaml) (revision d182ae6d1a6590c4b52b17fd1f59c5b7c3780b48) +++ Demo/Ringtoets/src/Demo.Ringtoets/Ribbons/RingtoetsDemoProjectRibbon.xaml (.../RingtoetsDemoProjectRibbon.xaml) (revision b1b49c693efe7922bb723c350eeb66494460d8bd) @@ -23,7 +23,7 @@ - +