Exemplo n.º 1
0
        public async Task Test_SetMultipleHash()
        {
            var dut = new AsyncRedisClient();
            await dut.Connect(LocalHostDefaultPort.AsConnectionSettings());

            var additionalFields = new Dictionary <string, string>
            {
                { Field1, Value1 },
                { Field2, Value2 },
                { Field3, Value3 }
            };

            await dut.HMSet(_keys[1], additionalFields);

            var res1 = await dut.HGet(_keys[1], Field1);

            var res2 = await dut.HGet(_keys[1], Field2);

            var res3 = await dut.HGet(_keys[1], Field3);

            Assert.AreEqual(Value1, res1);
            Assert.AreEqual(Value2, res2);
            Assert.AreEqual(Value3, res3);
        }