public async Task GetKeysAsync_Success() { var keyName1 = KeyName() + "ali" + KeyName(); var keyName2 = KeyName() + "ali" + KeyName(); var keyName3 = KeyName() + "ali" + KeyName(); var keyName4 = KeyName() + "li" + KeyName(); var keyName5 = KeyName() + "al" + KeyName(); await _redisService.SetStringAsync(keyName1, ""); await _redisService.SetStringAsync(keyName2, ""); await _redisService.SetStringAsync(keyName3, ""); await _redisService.SetStringAsync(keyName4, ""); await _redisService.SetStringAsync(keyName5, ""); var result = await _redisService.GetKeysAsync("*ali*"); Assert.NotNull(result); var enumerable = result.ToList(); Assert.NotNull(enumerable.FirstOrDefault(z => z.Contains(keyName1))); Assert.NotNull(enumerable.FirstOrDefault(z => z.Contains(keyName2))); Assert.NotNull(enumerable.FirstOrDefault(z => z.Contains(keyName3))); await _redisService.RemoveAsync(keyName1); await _redisService.RemoveAsync(keyName2); await _redisService.RemoveAsync(keyName3); await _redisService.RemoveAsync(keyName4); await _redisService.RemoveAsync(keyName5); }