Package gumi.builders.url

Examples of gumi.builders.url.UrlParameterMultimap$Immutable


        assertEquals(m1.flatEntryList().get(2), newEntry("c", "3"));
    }

    @Test(expectedExceptions = UnsupportedOperationException.class)
    public void mutateImmutableParameterMap() {
        final UrlParameterMultimap m1 = UrlParameterMultimap.newMultimap();
        m1.add("a", "1").add("b", "2").add("c", "3");
        final UrlParameterMultimap.Immutable i1 = m1.immutable();
        i1.add("d", "4");
    }
View Full Code Here


        i1.add("d", "4");
    }
   
    @Test
    public void containsKey() {
        UrlParameterMultimap parameterMap = newMapWithContent();
        assertTrue(parameterMap.containsKey("key1"));
        assertFalse(parameterMap.containsKey("key2"));
    }
View Full Code Here

        assertFalse(parameterMap.containsKey("key2"));
    }

    @Test
    public void containsValue() {
        UrlParameterMultimap parameterMap = newMapWithContent();
        assertTrue(parameterMap.containsValue("value1"));
        assertFalse(parameterMap.containsValue("value2"));
    }
View Full Code Here

        assertFalse(parameterMap.containsValue("value2"));
    }

    @Test
    public void replaceValues() {
        UrlParameterMultimap parameterMap = newMapWithContent();
        parameterMap.replaceValues("key1", "value2");
        assertFalse(parameterMap.containsValue("value1"));
        assertTrue(parameterMap.containsValue("value2"));
    }
View Full Code Here

        newMapWithContent().remove(null, "");
    }

    @Test
    public void removeKey() {
        final UrlParameterMultimap parameterMap = newMapWithContent();
        final List<String> removedMap = parameterMap.remove("key1");
        assertFalse(parameterMap.containsKey("key1"));
        assertTrue(removedMap.contains("value1"));
    }
View Full Code Here

        assertTrue(removedMap.contains("value1"));
    }

    @Test
    public void removeKeyAndValue() {
        final UrlParameterMultimap parameterMap = newMapWithContent();
        parameterMap.add("key1", "value2");
        parameterMap.remove("key1", "value1");
        assertTrue(parameterMap.containsKey("key1"));
        parameterMap.remove("key1", "value2");
        assertFalse(parameterMap.containsKey("key1"));
    }
View Full Code Here

        assertFalse(parameterMap.containsKey("key1"));
    }

    @Test
    public void checkSizeIsEmptyAndClear() {
        final UrlParameterMultimap parameterMap = newMapWithContent();
        assertFalse(parameterMap.isEmpty());
        assertEquals(1, parameterMap.size());
        parameterMap.clear();
        assertTrue(parameterMap.isEmpty());
        assertEquals(0, parameterMap.size());
    }
View Full Code Here

        assertEquals(0, parameterMap.size());
    }

    @Test
    public void removeAllValues() {
        final UrlParameterMultimap parameterMap = newMapWithContent();
        parameterMap.add("key1", "value2");
        parameterMap.removeAllValues("key1");
        assertFalse(parameterMap.containsKey("key1"));
        assertFalse(parameterMap.containsValue("value1"));
        assertFalse(parameterMap.containsValue("value2"));
    }
View Full Code Here

TOP

Related Classes of gumi.builders.url.UrlParameterMultimap$Immutable

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.