Index: Ringtoets/Common/test/Ringtoets.Common.Forms.TestUtil.Test/MapDataTestHelperTest.cs =================================================================== diff -u -rde55528705df446cc78761cd04d8ba8149e6540c -rfde2f5bd7dfb9f60e298ecf2afe9623dd540e16c --- Ringtoets/Common/test/Ringtoets.Common.Forms.TestUtil.Test/MapDataTestHelperTest.cs (.../MapDataTestHelperTest.cs) (revision de55528705df446cc78761cd04d8ba8149e6540c) +++ Ringtoets/Common/test/Ringtoets.Common.Forms.TestUtil.Test/MapDataTestHelperTest.cs (.../MapDataTestHelperTest.cs) (revision fde2f5bd7dfb9f60e298ecf2afe9623dd540e16c) @@ -1162,7 +1162,7 @@ public void AssertImageBasedMapData_WmtsMapDataNotEqual_ThrowAssertionException(WmtsMapData wmtsMapData) { // Setup - var mapData = WmtsMapData.CreateDefaultPdokMapData(); + WmtsMapData mapData = WmtsMapData.CreateDefaultPdokMapData(); // Call TestDelegate test = () => MapDataTestHelper.AssertImageBasedMapData(wmtsMapData, mapData); @@ -1203,8 +1203,8 @@ public void AssertImageBasedMapData_WmtsDataCorrect_DoesNotThrow() { // Setup - var expectedMapData = WmtsMapData.CreateUnconnectedMapData(); - var actualMapData = WmtsMapData.CreateUnconnectedMapData(); + WmtsMapData expectedMapData = WmtsMapData.CreateUnconnectedMapData(); + WmtsMapData actualMapData = WmtsMapData.CreateUnconnectedMapData(); // Call TestDelegate test = () => MapDataTestHelper.AssertImageBasedMapData(expectedMapData, actualMapData); @@ -1220,46 +1220,44 @@ private static IEnumerable NotEqualToDefaultPdokMapData() { - var defaultMapData = WmtsMapData.CreateDefaultPdokMapData(); + WmtsMapData defaultMapData = WmtsMapData.CreateDefaultPdokMapData(); var otherName = new WmtsMapData("otherName", defaultMapData.SourceCapabilitiesUrl, defaultMapData.SelectedCapabilityIdentifier, defaultMapData.PreferredFormat); yield return new TestCaseData(otherName).SetName("WmtsMapDataOtherName"); - var otherPreferredFormat = new WmtsMapData(defaultMapData.Name, - defaultMapData.SourceCapabilitiesUrl, - defaultMapData.SelectedCapabilityIdentifier, - "image/otherPreferredFormat"); - yield return new TestCaseData(otherPreferredFormat).SetName("WmtsMapDataOtherPreferredFormat"); + var otherSourceCapabilitiesUrl = new WmtsMapData(defaultMapData.Name, + "otherSourceCapabilitiesUrl", + defaultMapData.SelectedCapabilityIdentifier, + defaultMapData.PreferredFormat); + yield return new TestCaseData(otherSourceCapabilitiesUrl).SetName("WmtsMapDataOtherSourceCapabilitiesUrl"); var otherSelectedCapabilityIdentifier = new WmtsMapData(defaultMapData.Name, defaultMapData.SourceCapabilitiesUrl, "otherSelectedCapabilityIdentifier", defaultMapData.PreferredFormat); yield return new TestCaseData(otherSelectedCapabilityIdentifier).SetName("WmtsMapDataOtherSelectedCapabilityIdentifier"); - var otherSourceCapabilitiesUrl = new WmtsMapData(defaultMapData.Name, - "otherSourceCapabilitiesUrl", - defaultMapData.SelectedCapabilityIdentifier, - defaultMapData.PreferredFormat); - yield return new TestCaseData(otherSourceCapabilitiesUrl).SetName("WmtsMapDataSourceCapabilitiesUrl"); + var otherPreferredFormat = new WmtsMapData(defaultMapData.Name, + defaultMapData.SourceCapabilitiesUrl, + defaultMapData.SelectedCapabilityIdentifier, + "image/otherPreferredFormat"); + yield return new TestCaseData(otherPreferredFormat).SetName("WmtsMapDataOtherPreferredFormat"); - WmtsMapData otherVisibility = defaultMapData; + WmtsMapData otherVisibility = WmtsMapData.CreateDefaultPdokMapData(); otherVisibility.IsVisible = !otherVisibility.IsVisible; yield return new TestCaseData(otherVisibility); - WmtsMapData otherTransparency = defaultMapData; - otherTransparency.Transparency = (RoundedDouble) ((otherVisibility.Transparency + 0.5) % 1); + WmtsMapData otherTransparency = WmtsMapData.CreateDefaultPdokMapData(); + otherTransparency.Transparency = (RoundedDouble) ((otherTransparency.Transparency + 0.5) % 1); yield return new TestCaseData(otherTransparency); } private static IEnumerable NotEqualToBingAerial() { - var defaultMapData = new WellKnownTileSourceMapData(WellKnownTileSource.BingAerial); - - var otherName = new WellKnownTileSourceMapData(defaultMapData.TileSource) + var otherName = new WellKnownTileSourceMapData(WellKnownTileSource.BingAerial) { Name = "otherName" }; @@ -1271,12 +1269,12 @@ }; yield return new TestCaseData(otherPreferredFormat).SetName("WellKnownTileSourceOtherPreferredFormat"); - WellKnownTileSourceMapData otherVisibility = defaultMapData; + var otherVisibility = new WellKnownTileSourceMapData(WellKnownTileSource.BingAerial); otherVisibility.IsVisible = !otherVisibility.IsVisible; yield return new TestCaseData(otherVisibility).SetName("WellKnownTileSourceOtherVisibility"); - WellKnownTileSourceMapData otherTransparency = defaultMapData; - otherTransparency.Transparency = (RoundedDouble) ((otherVisibility.Transparency + 0.5) % 1); + var otherTransparency = new WellKnownTileSourceMapData(WellKnownTileSource.BingAerial); + otherTransparency.Transparency = (RoundedDouble) ((otherTransparency.Transparency + 0.5) % 1); yield return new TestCaseData(otherTransparency).SetName("WellKnownTileSourceOtherTransparency"); }