public void ParseAsync_HeaderNull_ReturnsNull()
        {
            var secretStoreFake = A.Fake <IVaultSecretStore>();
            var parserFake      = A.Fake <IRequestParser>();

            A.CallTo(() => parserFake.HeaderDictionary(A <IDictionary <string, object> > ._)).Returns(null);

            var parser = new VaultBasicAuthenticationSecretParser(secretStoreFake, parserFake);

            var result = parser.ParseAsync(new Dictionary <string, object>()).Result;

            result.Should().BeNull();
        }
        public void ParseAsync_AuthorizationHeaderInvalid_ReturnsNull(string headerValue)
        {
            var secretStoreFake = A.Fake <IVaultSecretStore>();
            var parserFake      = A.Fake <IRequestParser>();

            A.CallTo(() => parserFake.HeaderDictionary(A <IDictionary <string, object> > ._))
            .Returns(new HeaderDictionary(new Dictionary <string, string[]>
            {
                { "Authorization", new [] { headerValue } }
            }));

            var parser = new VaultBasicAuthenticationSecretParser(secretStoreFake, parserFake);

            var result = parser.ParseAsync(new Dictionary <string, object>()).Result;
        }