Package java.beans.beancontext

Examples of java.beans.beancontext.BeanContext


     * Class under test for void
     * BeanContextMembershipEvent(java.beans.beancontext.BeanContext,
     * java.lang.Object[])
     */
    public void testBeanContextMembershipEventBeanContextObjectArray() {
        BeanContext ctx = new MockBeanContext();
        String array[] = new String[] { "1", "2", "3" };
        new MockBeanContextMembershipEvent(ctx, array);
    }
View Full Code Here


        String array[] = new String[] { "1", "2", "3" };
        new MockBeanContextMembershipEvent(ctx, array);
    }

    public void testSize_Collection() {
        BeanContext ctx = new MockBeanContext();
        Collection<String> c = new ArrayList<String>();
        c.add("1");
        c.add("2");
        c.add("3");
        MockBeanContextMembershipEvent event = new MockBeanContextMembershipEvent(
View Full Code Here

                ctx, c);
        assertEquals(3, event.size());
    }

    public void testSize_Array() {
        BeanContext ctx = new MockBeanContext();
        String array[] = new String[] { "1", "2", "3" };
        MockBeanContextMembershipEvent event = new MockBeanContextMembershipEvent(
                ctx, array);
        assertEquals(3, event.size());
    }
View Full Code Here

                ctx, array);
        assertEquals(3, event.size());
    }

    public void testContains_Collection() {
        BeanContext ctx = new MockBeanContext();
        Collection<String> c = new ArrayList<String>();
        c.add("1");
        c.add("2");
        c.add("3");
        MockBeanContextMembershipEvent event = new MockBeanContextMembershipEvent(
View Full Code Here

        assertFalse(event.contains(null));
        assertFalse(event.contains("4"));
    }

    public void testContains_Array() {
        BeanContext ctx = new MockBeanContext();
        String array[] = new String[] { "1", "2", "3" };
        MockBeanContextMembershipEvent event = new MockBeanContextMembershipEvent(
                ctx, array);
        assertTrue(event.contains("1"));
        assertTrue(event.contains("2"));
View Full Code Here

        assertFalse(event.contains(null));
        assertFalse(event.contains("4"));
    }

    public void testToArray_Collection() {
        BeanContext ctx = new MockBeanContext();
        Collection<String> c = new ArrayList<String>();
        c.add("1");
        c.add("2");
        c.add("3");
        MockBeanContextMembershipEvent event = new MockBeanContextMembershipEvent(
View Full Code Here

        assertEquals("2", resultArray[1]);
        assertEquals("3", resultArray[2]);
    }

    public void testToArray_Array() {
        BeanContext ctx = new MockBeanContext();
        String array[] = new String[] { "1", "2", "3" };
        MockBeanContextMembershipEvent event = new MockBeanContextMembershipEvent(
                ctx, array);
        Object resultArray[] = event.toArray();
        assertEquals(3, resultArray.length);
View Full Code Here

        assertEquals("2", resultArray[1]);
        assertEquals("3", resultArray[2]);
    }

    public void testIterator_Collection() {
        BeanContext ctx = new MockBeanContext();
        Collection<String> c = new ArrayList<String>();
        c.add("1");
        c.add("2");
        c.add("3");
        MockBeanContextMembershipEvent event = new MockBeanContextMembershipEvent(
View Full Code Here

        assertEquals("3", it.next());
        assertFalse(it.hasNext());
    }

    public void testIterator_Array() {
        BeanContext ctx = new MockBeanContext();
        String array[] = new String[] { "1", "2", "3" };
        MockBeanContextMembershipEvent event = new MockBeanContextMembershipEvent(
                ctx, array);
        Iterator it = event.iterator();
        assertEquals("1", it.next());
View Full Code Here

            BeanContextMembershipEvent ser) {
        assertNull(ser.getSource());

        // check propagatedFrom
        if (orig.getPropagatedFrom() instanceof Serializable) {
            BeanContext origFrom = orig.getPropagatedFrom();
            BeanContext serFrom = ser.getPropagatedFrom();
            assertEquals(origFrom.getClass(), serFrom.getClass());
            if (origFrom instanceof MockBeanContextDelegateS) {
                assertEquals(((MockBeanContextDelegateS) origFrom).id,
                        ((MockBeanContextDelegateS) serFrom).id);
            }
        }
View Full Code Here

TOP

Related Classes of java.beans.beancontext.BeanContext

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.