Package org.springframework.security.web.util.matcher

Examples of org.springframework.security.web.util.matcher.OrRequestMatcher


     * @since 3.2
     */
    public final class RequestMatcherConfigurer extends AbstractRequestMatcherRegistry<RequestMatcherConfigurer> {

        protected RequestMatcherConfigurer chainRequestMatchers(List<RequestMatcher> requestMatchers) {
            requestMatcher(new OrRequestMatcher(requestMatchers));
            return this;
        }
View Full Code Here


    private RequestMatcher matcher;

    @Test(expected = NullPointerException.class)
    public void constructorNullArray() {
        new OrRequestMatcher((RequestMatcher[]) null);
    }
View Full Code Here

        new OrRequestMatcher((RequestMatcher[]) null);
    }

    @Test(expected = IllegalArgumentException.class)
    public void constructorArrayContainsNull() {
        new OrRequestMatcher((RequestMatcher)null);
    }
View Full Code Here

        new OrRequestMatcher((RequestMatcher)null);
    }

    @Test(expected = IllegalArgumentException.class)
    public void constructorEmptyArray() {
        new OrRequestMatcher(new RequestMatcher[0]);
    }
View Full Code Here

        new OrRequestMatcher(new RequestMatcher[0]);
    }

    @Test(expected = IllegalArgumentException.class)
    public void constructorNullList() {
        new OrRequestMatcher((List<RequestMatcher>) null);
    }
View Full Code Here

        new OrRequestMatcher((List<RequestMatcher>) null);
    }

    @Test(expected = IllegalArgumentException.class)
    public void constructorListContainsNull() {
        new OrRequestMatcher(Arrays.asList((RequestMatcher)null));
    }
View Full Code Here

        new OrRequestMatcher(Arrays.asList((RequestMatcher)null));
    }

    @Test(expected = IllegalArgumentException.class)
    public void constructorEmptyList() {
        new OrRequestMatcher(Collections.<RequestMatcher>emptyList());
    }
View Full Code Here

    }

    @Test
    public void matchesSingleTrue() {
        when(delegate.matches(request)).thenReturn(true);
        matcher = new OrRequestMatcher(delegate);

        assertThat(matcher.matches(request)).isTrue();
    }
View Full Code Here

    @Test
    public void matchesMultiTrue() {
        when(delegate.matches(request)).thenReturn(true);
        when(delegate2.matches(request)).thenReturn(true);
        matcher = new OrRequestMatcher(delegate, delegate2);

        assertThat(matcher.matches(request)).isTrue();
    }
View Full Code Here


    @Test
    public void matchesSingleFalse() {
        when(delegate.matches(request)).thenReturn(false);
        matcher = new OrRequestMatcher(delegate);

        assertThat(matcher.matches(request)).isFalse();
    }
View Full Code Here

TOP

Related Classes of org.springframework.security.web.util.matcher.OrRequestMatcher

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.