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"); }
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"); }
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"); }