Index: test/DeltaShell/DeltaShell.Plugins.SharpMapGis.Tests/Commands/MapZoomToFeatureCommandTest.cs =================================================================== diff -u -reac97eab4acc4d2698cdc33a310e4fe843d54607 -rb8c9215624ba0c9c6247451431371ec70de31b57 --- test/DeltaShell/DeltaShell.Plugins.SharpMapGis.Tests/Commands/MapZoomToFeatureCommandTest.cs (.../MapZoomToFeatureCommandTest.cs) (revision eac97eab4acc4d2698cdc33a310e4fe843d54607) +++ test/DeltaShell/DeltaShell.Plugins.SharpMapGis.Tests/Commands/MapZoomToFeatureCommandTest.cs (.../MapZoomToFeatureCommandTest.cs) (revision b8c9215624ba0c9c6247451431371ec70de31b57) @@ -1,4 +1,5 @@ using DelftTools.Shell.Gui; +using DelftTools.Utils.Reflection; using DeltaShell.Plugins.SharpMapGis.Gui; using DeltaShell.Plugins.SharpMapGis.Gui.Commands; using DeltaShell.Plugins.SharpMapGis.Gui.Forms; @@ -51,7 +52,7 @@ var gui = mocks.Stub(); IViewList viewList = mocks.Stub(); MapView mapView = mocks.Stub(); - mapView.Stub(mv => mv.MapControl).Return(mocks.Stub()); // to set readonly property + TypeUtils.SetPrivatePropertyValue(mapView, "MapControl", mocks.Stub()); Map map = mocks.DynamicMock(); IFeature feature = mocks.Stub(); @@ -89,7 +90,7 @@ var gui = mocks.Stub(); IViewList viewList = mocks.Stub(); MapView mapView = mocks.Stub(); - mapView.Stub(mv => mv.MapControl).Return(mocks.Stub()); // to set readonly property + TypeUtils.SetPrivatePropertyValue(mapView, "MapControl", mocks.Stub()); //mapView.Expect(mv => mv.EnsureVisible(null)).IgnoreArguments().Repeat.Any(); Map map = mocks.DynamicMock(); IFeature feature = mocks.Stub();