Examples of AndRequestMatcher


Examples of com.github.dreamhead.moco.matcher.AndRequestMatcher

    @Override
    @SuppressWarnings("unchecked")
    public Setting<HttpResponseSetting> apply(final MocoConfig config) {
        RequestMatcher appliedMatcher = configItem(this.matcher, config);
        if (config.isFor("uri") && this.matcher == appliedMatcher) {
            appliedMatcher = new AndRequestMatcher(of(appliedMatcher, InternalApis.context((String) config.apply(""))));
        }

        HttpSetting setting = new HttpSetting(appliedMatcher);
        setting.handler = configItem(this.handler, config);
        setting.eventTriggers = configItems(eventTriggers, config);
View Full Code Here

Examples of com.github.dreamhead.moco.matcher.AndRequestMatcher

            case 0:
                throw new IllegalArgumentException("illegal request setting:" + request);
            case 1:
                return matchers.get(0);
            default:
                return new AndRequestMatcher(matchers);
        }
    }
View Full Code Here

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

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

    private RequestMatcher matcher;

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

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

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

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

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

        new AndRequestMatcher((RequestMatcher)null);
    }

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

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

        new AndRequestMatcher(new RequestMatcher[0]);
    }

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

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

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

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

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

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

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

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

    }

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

        assertThat(matcher.matches(request)).isTrue();
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.