public async Task Working_with_int_values() { const string intKey = "intkey"; const int intValue = 1; //STORING AN INT USING THE BASIC CLIENT await using (var redisClient = new RedisClient(TestConfig.SingleHost).ForAsyncOnly()) { await redisClient.SetValueAsync(intKey, intValue.ToString()); string strGetIntValue = await redisClient.GetValueAsync(intKey); int toIntValue = int.Parse(strGetIntValue); Assert.That(toIntValue, Is.EqualTo(intValue)); } //STORING AN INT USING THE GENERIC CLIENT await using (var redisClient = new RedisClient(TestConfig.SingleHost).ForAsyncOnly()) { //Create a generic client that treats all values as ints: IRedisTypedClientAsync <int> intRedis = redisClient.As <int>(); await intRedis.SetValueAsync(intKey, intValue); var toIntValue = await intRedis.GetValueAsync(intKey); Assert.That(toIntValue, Is.EqualTo(intValue)); } }