Example #1
0
        public void ParseSignatureAlgorithmParameter()
        {
            // Arrange
            var expectedKey   = ParamValue.Param.signature_alg;
            var expectedValue = "RSA-SHA256";
            var paramValue    = $"{expectedKey}=\"{expectedValue}\"";

            // Act
            var actual = ParamFormatter.Parse(paramValue);

            // Assert
            Assert.AreEqual(expectedKey, actual.Key);
            Assert.AreEqual(expectedValue, actual.Value);
        }
Example #2
0
        public void ParseBodyHashParameter()
        {
            // Arrange
            var expectedKey   = ParamValue.Param.bodyhash;
            var expectedValue = "k9kbtCIy0CkI3/FEfpS/oIDjk6k=";
            var paramValue    = $"{expectedKey}=\"{expectedValue}\"";

            // Act
            var actual = ParamFormatter.Parse(paramValue);

            // Assert
            Assert.AreEqual(expectedKey, actual.Key);
            Assert.AreEqual(expectedValue, actual.Value);
        }
Example #3
0
        public void ParseSignatureParameter()
        {
            // Arrange
            var expectedKey   = ParamValue.Param.signature;
            var expectedValue = "k9kbtCIy0CkI3FEfpoIDjk6k";
            var paramValue    = $"{expectedKey}=\"{expectedValue}\"";

            // Act
            var actual = ParamFormatter.Parse(paramValue);

            // Assert
            Assert.AreEqual(expectedKey, actual.Key);
            Assert.AreEqual(expectedValue, actual.Value);
        }
Example #4
0
        public void ParseValidNonceParameter()
        {
            // Arrange
            var expectedKey   = ParamValue.Param.nonce;
            var expectedValue = "137131200:dj83hs9s";
            var paramValue    = $"{expectedKey}=\"{expectedValue}\"";

            // Act
            var actual = ParamFormatter.Parse(paramValue);

            // Assert
            Assert.AreEqual(expectedKey, actual.Key);
            Assert.AreEqual(expectedValue, actual.Value);
        }