Пример #1
0
        public async Task Can_AddGeoMember_and_GetGeoCoordinates()
        {
            await redis.FlushDbAsync();

            var count = await redis.AddGeoMemberAsync("Sicily", 13.361389, 38.115556, "Palermo");

            Assert.That(count, Is.EqualTo(1));
            var results = await redis.GetGeoCoordinatesAsync("Sicily", new[] { "Palermo" });

            Assert.That(results.Count, Is.EqualTo(1));
            Assert.That(results[0].Longitude, Is.EqualTo(13.361389).Within(.1));
            Assert.That(results[0].Latitude, Is.EqualTo(38.115556).Within(.1));
            Assert.That(results[0].Member, Is.EqualTo("Palermo"));
        }