Examples of ObservableDictionary


Examples of org.apache.felix.useradmin.impl.role.ObservableDictionary

        super.setUp();
       
        m_securityManager = new TestSecurityManager();
        System.setSecurityManager(m_securityManager);
       
        m_dict = new ObservableDictionary(GET_ACTION, CHANGE_ACTION);
    }
View Full Code Here

Examples of org.apache.felix.useradmin.impl.role.ObservableDictionary

     */
    public void testCreateWithNonNullDictionaryFail() {
        m_dict.put("foo", "bar");
        m_dict.put("bar", "foo");
       
        m_dict = new ObservableDictionary("foo", "bar", m_dict);
       
        assertEquals("bar", m_dict.get("foo"));
        assertEquals("foo", m_dict.get("bar"));
    }
View Full Code Here

Examples of org.apache.felix.useradmin.impl.role.ObservableDictionary

    /**
     * Tests that creating a new {@link ObservableDictionary} with a <code>null</code> dictionary fails.
     */
    public void testCreateWithNullDictionaryFail() {
        try {
            new ObservableDictionary("foo", "bar", null);
            fail("Expected IllegalArgumentException!");
        } catch (Exception e) {
            // Ok; expected
        }
    }
View Full Code Here

Examples of org.apache.felix.useradmin.impl.role.ObservableDictionary

    /**
     * Tests that {@link ObservableDictionary#equals(Object)} and {@link ObservableDictionary#hashCode()} work correctly.
     */
    public void testEqualsAndHashcode() {
        ObservableDictionary d1 = new ObservableDictionary(null, null);
        ObservableDictionary d2 = new ObservableDictionary(null, null);
       
        assertTrue(d1.hashCode() == d2.hashCode());
        assertTrue(d1.equals(d2));
        assertTrue(d1.equals(d1));
       
        d2.put("foo", "bar");
       
        assertFalse(d1.hashCode() == d2.hashCode());
        assertFalse(d1.equals(d2));
        assertFalse(d1.equals(null));
        assertFalse(d1.equals("bar"));
        assertTrue(d1.equals(d1));
    }
View Full Code Here

Examples of org.apache.felix.useradmin.impl.role.ObservableDictionary

     * {@inheritDoc}
     */
    protected void setUp() throws Exception {
        super.setUp();
       
        m_dict = new ObservableDictionary(null, null);
        m_listener = new StateCheckingDictionaryChangeListener();

    }
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.