Exemplo n.º 1
0
        public void VectorTile_Clear()
        {
            VectorTile v = new VectorTile(9, 112, 195);

            byte[] bytes = File.ReadAllBytes(@".\data\9.112.195.pbf");
            v.SetData(bytes);
            Assert.IsFalse(v.Empty());
            Assert.IsTrue(v.Painted());
            CollectionAssert.AreEquivalent(new List <string>()
            {
                "world"
            }, v.Names().ToList());
            byte[] actual = v.GetData();
            Assert.AreEqual(bytes.Length, actual.Length);

            v.Clear();
            Assert.IsTrue(v.Empty());
            Assert.IsFalse(v.Painted());
            Assert.AreEqual("", v.IsSolid());
            CollectionAssert.AreEquivalent(new List <string>(), v.Names().ToList());
            actual = v.GetData();
            Assert.AreEqual(0, actual.Length);
        }
Exemplo n.º 2
0
        public void VectorTile_Clear()
        {
            VectorTile v = new VectorTile(9,112,195);
            byte[] bytes = File.ReadAllBytes(@".\data\9.112.195.pbf");
            v.SetData(bytes);
            Assert.IsFalse(v.Empty());
            Assert.IsTrue(v.Painted());
            CollectionAssert.AreEquivalent(new List<string>() { "world" }, v.Names().ToList());
            byte[] actual = v.GetData();
            Assert.AreEqual(bytes.Length, actual.Length);

            v.Clear();
            Assert.IsTrue(v.Empty());
            Assert.IsFalse(v.Painted());
            Assert.AreEqual("",v.IsSolid());
            CollectionAssert.AreEquivalent(new List<string>(), v.Names().ToList());
            actual = v.GetData();
            Assert.AreEqual(0, actual.Length);
        }