Пример #1
0
        public async Task Can_RemoveFromHash()
        {
            var mapValues = CreateMap();
            await mapValues.ForEachAsync(async (k, v) => await redis.SetEntryInHashAsync(Hash, k, v));

            var firstKey = mapValues.First().Key;

            await redis.RemoveEntryFromHashAsync(Hash, firstKey);

            mapValues.Remove(firstKey);

            var members = await redis.GetAllEntriesFromHashAsync(Hash);

            Assert.That(members, Is.EquivalentTo(mapValues));
        }