Exemple #1
0
        public async Task HashTest()
        {
            using var db = await _connection.GetDatabaseAsync("0");

            int c = 5;

            for (int i = 0; i < c; i++)
            {
                await db.Value.HashSetAsync("h1", "f" + i, i);
            }
            var r = await db.Value.HashGetAllAsync("h1");

            for (int i = 0; i < c; i++)
            {
                Assert.True(r[i].Name == "f" + i);
                Assert.True(Database.ToInt(r[i].Value) == i);
            }
        }