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

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


        }
        matchers.add(notFavIcon);
        matchers.add(notJson);
        matchers.add(notXRequestedWith);

        return new AndRequestMatcher(matchers);
    }
View Full Code Here


    private RequestMatcher matcher;

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

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

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

        new AndRequestMatcher((RequestMatcher)null);
    }

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

        new AndRequestMatcher(new RequestMatcher[0]);
    }

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

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

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

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

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

    }

    @Test
    public void matchesSingleTrue() {
        when(delegate.matches(request)).thenReturn(true);
        matcher = new AndRequestMatcher(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 AndRequestMatcher(delegate, delegate2);

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


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

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

TOP

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

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.