Exemplo n.º 1
0
        public void MatchedMethod_SetAsAnyWithVaryingCase_AllMethodsReturnTrue(string setMethod)
        {
            // Arrange
            var action = new EndpointAction
            {
                Method = setMethod
            };

            // Act
            var matches = action.MatchesMethod("");

            // Assert
            Assert.True(matches);
        }
Exemplo n.º 2
0
        [InlineData("PoSt", "ANY")]         // If any is the given method, it should still fail
        public void MatchedMethod_MismatchingMethods_ReturnTrue(string setMethod, string givenMethod)
        {
            // Arrange
            var action = new EndpointAction
            {
                Method = setMethod
            };

            // Act
            var matches = action.MatchesMethod(givenMethod);

            // Assert
            Assert.False(matches);
        }
Exemplo n.º 3
0
        public void MatchedMethod_SetAsAny_AllMethodsReturnTrue(string givenMethod)
        {
            // Arrange
            var action = new EndpointAction
            {
                Method = "ANY"
            };

            // Act
            var matches = action.MatchesMethod(givenMethod);

            // Assert
            Assert.True(matches);
        }