public void TestVectorLayer() { var vlayerS = new VectorLayer("Test", ProviderTest.CreateProvider()); VectorLayer vlayerD = null; Assert.DoesNotThrow(() => vlayerD = SandD(vlayerS, GetFormatter()), "Exception"); Assert.IsNotNull(vlayerD, "Deserialized VectorLayer is null"); var vlec = new VectorLayerEqualityComparer(); Assert.IsTrue(vlec.Equals(vlayerS, vlayerD), vlec.ToString()); }
public void TestPuntalLayer() { var lS = new SharpMap.Layers.Symbolizer.PuntalVectorLayer("PuntalTest", ProviderTest.CreateProvider()); var rsS = (RasterPointSymbolizer)lS.Symbolizer; rsS.Transparency = 0.2f; SharpMap.Layers.Symbolizer.PuntalVectorLayer lD = null; Assert.DoesNotThrow(() => lD = SandD(lS, GetFormatter())); Assert.IsNotNull(lD); Assert.IsInstanceOf(lS.Symbolizer.GetType(), lD.Symbolizer); var rsD = (RasterPointSymbolizer)lD.Symbolizer; Assert.AreEqual(rsS.Transparency, rsD.Transparency); }