Пример #1
0
        public void Can_GeoRadius_default()
        {
            redis.FlushDb();
            redis.GeoAdd("Sicily",
                         new RedisGeo(13.361389, 38.115556, "Palermo"),
                         new RedisGeo(15.087269, 37.502669, "Catania"));

            var results = redis.GeoRadius("Sicily", 15, 37, 200, RedisGeoUnit.Kilometers);

            Assert.That(results.Count, Is.EqualTo(2));
            Assert.That(results[0].Member, Is.EqualTo("Palermo"));
            Assert.That(results[0].Unit, Is.Null);
            Assert.That(results[1].Member, Is.EqualTo("Catania"));
            Assert.That(results[1].Unit, Is.Null);
        }