Package org.glassfish.jersey.internal.util.collection

Examples of org.glassfish.jersey.internal.util.collection.StringKeyIgnoreCaseMultivaluedMap


*/
public class StringKeyIgnoreCaseMultivaluedMapAsHeadersMapTest {

    @Before
    public void setUp() throws Exception {
        map = new StringKeyIgnoreCaseMultivaluedMap();
    }
View Full Code Here


        // TODO - detailed tests for the HeadersEntries methods
    }

    @Test
    public void testEqualsAndHashCode() {
        StringKeyIgnoreCaseMultivaluedMap map2 = new StringKeyIgnoreCaseMultivaluedMap();

        List valuesFoo = new ArrayList();
        valuesFoo.add("foo1");
        valuesFoo.add("foo2");

        map.put("foo", valuesFoo);
        map2.put("foo", valuesFoo);

        List valuesBar = new ArrayList();
        valuesBar.add("bar1");
        valuesBar.add("bar2");

        map.put("bar", valuesBar);
        map2.put("bar", valuesBar);

        assertTrue(map.equals(map2));
        assertTrue(map2.equals(map));
        assertEquals(map.hashCode(), map2.hashCode());

        map2.remove("bar");

        assertTrue(!map.equals(map2));
        assertTrue(!map2.equals(map));
    }
View Full Code Here

TOP

Related Classes of org.glassfish.jersey.internal.util.collection.StringKeyIgnoreCaseMultivaluedMap

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.