public void GetKeysCount_Success() { var randomName = new Faker().Name.FirstName(); var anotherRandomName = new Faker().Name.FirstName(); var keyName1 = KeyName() + randomName + KeyName(); var keyName2 = KeyName() + randomName + KeyName(); var keyName3 = KeyName() + randomName + KeyName(); var keyName4 = KeyName() + anotherRandomName + KeyName(); var keyName5 = KeyName() + anotherRandomName + KeyName(); _redisService.SetString(keyName1, ""); _redisService.SetString(keyName2, ""); _redisService.SetString(keyName3, ""); _redisService.SetString(keyName4, ""); _redisService.SetString(keyName5, ""); var result = _redisService.GetKeysCount("*" + randomName + "*"); Assert.Equal(3, result); _redisService.Remove(keyName1); _redisService.Remove(keyName2); _redisService.Remove(keyName3); _redisService.Remove(keyName4); _redisService.Remove(keyName5); }