Пример #1
0
        public async Task SetTestAsync()
        {
            const string key = "cameras";

            Assert.True(await _redis.SetAddAsync(key, 0));
            Assert.True(await _redis.SetAddAsync(key, 1));
            Assert.True(await _redis.SetContainsAsync(key, 1));
            Assert.False(await _redis.SetAddAsync(key, 1));

            var cameras = await _redis.SetMembersAsync <string>(key);

            foreach (var camera in cameras)
            {
                _testOutputHelper.WriteLine(camera);
            }

            Assert.Equal(2, await _redis.SetRemoveAsync(key, new[] { 0, 1 }));
        }