Package org.mockserver.model

Examples of org.mockserver.model.KeyToMultiValue


        // given
        multimap.put("FOO1", ".*1");
        multimap.put("foo2", ".*2");

        // when
        keyToMultiValues.add(new KeyToMultiValue("foo1", "bar1"));
        keyToMultiValues.add(new KeyToMultiValue("FOO2", "bar2"));

        // then
        assertTrue(mapMatcher.matches(keyToMultiValues));
    }
View Full Code Here


    public void doesNotMatchDifferentKeys() {
        // given
        multimap.put("foo", "bar");

        // when
        keyToMultiValues.add(new KeyToMultiValue("foo2", "bar"));

        // then
        assertFalse(mapMatcher.matches(keyToMultiValues));
    }
View Full Code Here

    public void doesNotMatchDifferentValues() {
        // given
        multimap.put("foo", "bar");

        // when
        keyToMultiValues.add(new KeyToMultiValue("foo", "bar2"));

        // then
        assertFalse(mapMatcher.matches(keyToMultiValues));
    }
View Full Code Here

    public void doesNotMatchDifferentEmptyValue() {
        // given
        multimap.put("foo", "bar");

        // when
        keyToMultiValues.add(new KeyToMultiValue("foo", ""));

        // then
        assertFalse(mapMatcher.matches(keyToMultiValues));
    }
View Full Code Here

    public void doesNotMatchIncorrectRegexValue() {
        // given
        multimap.put("foo1", "a.*1");

        // when
        keyToMultiValues.add(new KeyToMultiValue("foo0", "bar0"));
        keyToMultiValues.add(new KeyToMultiValue("foo1", "bar1"));
        keyToMultiValues.add(new KeyToMultiValue("foo2", "bar2"));

        // then
        assertFalse(mapMatcher.matches(keyToMultiValues));
    }
View Full Code Here

    public void doesNotMatchIncorrectRegexKey() {
        // given
        multimap.put("g.*1", "bar1");

        // when
        keyToMultiValues.add(new KeyToMultiValue("foo0", "bar0"));
        keyToMultiValues.add(new KeyToMultiValue("foo1", "bar1"));
        keyToMultiValues.add(new KeyToMultiValue("foo2", "bar2"));

        // then
        assertFalse(mapMatcher.matches(keyToMultiValues));
    }
View Full Code Here

    public void doesNotMatchIncorrectRegexKeyAndValue() {
        // given
        multimap.put("g.*1", "a.*1");

        // when
        keyToMultiValues.add(new KeyToMultiValue("foo0", "bar0"));
        keyToMultiValues.add(new KeyToMultiValue("foo1", "bar1"));
        keyToMultiValues.add(new KeyToMultiValue("foo2", "bar2"));

        // then
        assertFalse(mapMatcher.matches(keyToMultiValues));
    }
View Full Code Here

    public void shouldHandleIllegalRegexValuePattern() {
        // given
        multimap.put("foo", "/{}");

        // when
        keyToMultiValues.add(new KeyToMultiValue("foo", "/{}/"));

        // then
        assertFalse(mapMatcher.matches(keyToMultiValues));
    }
View Full Code Here

    public void shouldHandleIllegalRegexKeyPattern() {
        // given
        multimap.put("/{}", "bar");

        // when
        keyToMultiValues.add(new KeyToMultiValue("foo", "/{}/"));

        // then
        assertFalse(mapMatcher.matches(keyToMultiValues));
    }
View Full Code Here

TOP

Related Classes of org.mockserver.model.KeyToMultiValue

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.