示例#1
0
        public void HandlesKeys()
        {
            // Arrange
            var secretDict   = CreateSecretDictionary(AllSecrets, AllSecrets);
            var keysToVerify = AllSecrets.Select(secret => secret.Key).ToList();

            // Act
            foreach (var secretKey in secretDict.Keys)
            {
                // Assert
                Assert.Contains(secretKey, keysToVerify);
                keysToVerify.Remove(secretKey);
            }
            Assert.Empty(keysToVerify);
        }
示例#2
0
        public void HandlesValues()
        {
            // Arrange
            var secretDict      = CreateSecretDictionary(AllSecrets, AllSecrets);
            var secretsToVerify = AllSecrets.Select(secret => secret.InjectedValue).ToList();

            // Act
            foreach (var secretValue in secretDict.Values)
            {
                // Assert
                Assert.Contains(secretValue, secretsToVerify);
                secretsToVerify.Remove(secretValue);
            }
            Assert.Empty(secretsToVerify);
        }