Esempio n. 1
0
        public async Task Can_SetRangeInHash()
        {
            var mapValues = CreateMap();
            await mapValues.ForEachAsync(async (k, v) => await redis.SetEntryInHashAsync(Hash, k, v));

            var newMapValues = CreateMap2();

            await redis.SetRangeInHashAsync(Hash, newMapValues);

            newMapValues.Each(x => mapValues[x.Key] = x.Value);

            var members = await redis.GetAllEntriesFromHashAsync(Hash);

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