示例#1
0
        public void Can_GeoRadiusByMember_default()
        {
            redis.FlushDb();
            redis.GeoAdd("Sicily",
                         new RedisGeo(13.583333, 37.316667, "Agrigento"),
                         new RedisGeo(13.361389, 38.115556, "Palermo"),
                         new RedisGeo(15.087269, 37.502669, "Catania"));

            var results = redis.GeoRadiusByMember("Sicily", "Agrigento", 100, RedisGeoUnit.Kilometers);

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