예제 #1
0
        public void TypeExtractTest()
        {
            var validator = new AwsValidator();
            var headers   = Helpers.CreateSubscriptionHeaders();

            var expectedType = MessageType.SubscriptionConfirmation;
            var actual       = validator.ParseMessageType(headers);

            Assert.AreEqual(expectedType, actual, "Type Extractor failed");
        }
예제 #2
0
        public void TypeExtractTestMultiple()
        {
            var validator = new AwsValidator();
            var headers   = Helpers.CreateSubscriptionHeaders();

            headers.Append("x-amz-sns-message-type", "Notificaton");

            var expectedType = MessageType.None;
            var actual       = validator.ParseMessageType(headers);

            Assert.AreEqual(expectedType, actual, "Type Extractor failed");
        }
예제 #3
0
        public void TypeExtractTestEmptyString()
        {
            var validator = new AwsValidator();
            var headers   = Helpers.CreateSubscriptionHeaders();

            headers.Remove("x-amz-sns-message-type");
            headers.Add("x-amz-sns-message-type", string.Empty);

            var expectedType = MessageType.None;
            var actual       = validator.ParseMessageType(headers);

            Assert.AreEqual(expectedType, actual, "Type Extractor failed");
        }