Index: Core/Components/src/Core.Components.DotSpatial/BaseMap.cs =================================================================== diff -u -r8605d66cdc1266af3a372af46c9d32008f1261e4 -r4e50b5b9df5cafb3e6ea879b5b7d1963de68430d --- Core/Components/src/Core.Components.DotSpatial/BaseMap.cs (.../BaseMap.cs) (revision 8605d66cdc1266af3a372af46c9d32008f1261e4) +++ Core/Components/src/Core.Components.DotSpatial/BaseMap.cs (.../BaseMap.cs) (revision 4e50b5b9df5cafb3e6ea879b5b7d1963de68430d) @@ -10,7 +10,7 @@ namespace Core.Components.DotSpatial { /// - /// This class describes a map view + /// The map view /// public sealed class BaseMap : Control { Index: Core/Components/test/Core.Components.DotSpatial.Test/BaseMapTest.cs =================================================================== diff -u -r8605d66cdc1266af3a372af46c9d32008f1261e4 -r4e50b5b9df5cafb3e6ea879b5b7d1963de68430d --- Core/Components/test/Core.Components.DotSpatial.Test/BaseMapTest.cs (.../BaseMapTest.cs) (revision 8605d66cdc1266af3a372af46c9d32008f1261e4) +++ Core/Components/test/Core.Components.DotSpatial.Test/BaseMapTest.cs (.../BaseMapTest.cs) (revision 4e50b5b9df5cafb3e6ea879b5b7d1963de68430d) @@ -8,7 +8,6 @@ using Core.Components.DotSpatial.Properties; using DotSpatial.Controls; using NUnit.Framework; -using Rhino.Mocks; namespace Core.Components.DotSpatial.Test { @@ -18,18 +17,11 @@ [Test] public void DefaultConstructor_PropertiesSet() { - // Setup - var mocks = new MockRepository(); - var map = mocks.StrictMock(); - mocks.ReplayAll(); - // Call var baseMap = new BaseMap(); // Assert Assert.IsInstanceOf(baseMap); - Assert.IsNotNull(map); - mocks.VerifyAll(); } [Test] Index: Core/Plugins/src/Core.Plugins.DotSpatial/Forms/MapDataView.cs =================================================================== diff -u -r04c70d10f22ba007f8210813d3d02697e42f8a5d -r4e50b5b9df5cafb3e6ea879b5b7d1963de68430d --- Core/Plugins/src/Core.Plugins.DotSpatial/Forms/MapDataView.cs (.../MapDataView.cs) (revision 04c70d10f22ba007f8210813d3d02697e42f8a5d) +++ Core/Plugins/src/Core.Plugins.DotSpatial/Forms/MapDataView.cs (.../MapDataView.cs) (revision 4e50b5b9df5cafb3e6ea879b5b7d1963de68430d) @@ -6,15 +6,15 @@ namespace Core.Plugins.DotSpatial.Forms { /// - /// This class describes the user control for the Map. + /// The user control for the Map. /// public partial class MapDataView : UserControl, IView { private readonly BaseMap baseMap; private MapData data; /// - /// Creates a new instance of MapDataView and adds the to the . + /// Creates a new instance of MapDataView and adds the map view to the . /// public MapDataView() { @@ -34,7 +34,11 @@ set { data = (MapData) value; - baseMap.SetMapData(data); + + if (data != null) + { + baseMap.SetMapData(data); + } } } } Index: Core/Plugins/test/Core.Plugins.DotSpatial.Test/Forms/MapDataViewTest.cs =================================================================== diff -u -r9aa9d4c3668f1ce3abcd566bc9598347fbee0679 -r4e50b5b9df5cafb3e6ea879b5b7d1963de68430d --- Core/Plugins/test/Core.Plugins.DotSpatial.Test/Forms/MapDataViewTest.cs (.../MapDataViewTest.cs) (revision 9aa9d4c3668f1ce3abcd566bc9598347fbee0679) +++ Core/Plugins/test/Core.Plugins.DotSpatial.Test/Forms/MapDataViewTest.cs (.../MapDataViewTest.cs) (revision 4e50b5b9df5cafb3e6ea879b5b7d1963de68430d) @@ -19,8 +19,7 @@ // Assert Assert.IsInstanceOf(mapView); - var interfaceImplementation = mapView as IView; - Assert.IsNotNull(interfaceImplementation); + Assert.IsInstanceOf(mapView); } [Test] @@ -39,7 +38,7 @@ } [Test] - public void Data_SetToNull_ThrowsArgumentNullException() + public void Data_SetToNull_DoesNotThrowException() { // Setup var mapView = new MapDataView(); @@ -48,7 +47,7 @@ TestDelegate testDelegate = () => mapView.Data = null; // Assert - Assert.Throws(testDelegate); + Assert.DoesNotThrow(testDelegate); } [Test]