Ejemplo n.º 1
0
        public void LargeCompressionTest()
        {
            var compressor = new GeohashCompressor();

            var hasher = new Geohasher();

            var compressed = compressor.Compress(GetHashes().ToArray());

            Assert.AreEqual(152, compressed.Count);
        }
Ejemplo n.º 2
0
        public void SmallCompressionTest()
        {
            var compressor = new GeohashCompressor();

            var hasher = new Geohasher();

            var list = new List <string>();

            list.AddRange(hasher.GetSubhashes("ABC"));

            list.AddRange(hasher.GetSubhashes("ABF"));

            list.AddRange(hasher.GetSubhashes("AFF"));

            list.AddRange(new List <string> {
                "KK", "F", "FKUVC", "FKUVX"
            });

            var compressed = compressor.Compress(list.ToArray());

            Assert.AreEqual(7, compressed.Count);
        }