Package java.beans

Examples of java.beans.AppletInitializer


    public void testInstantiateClassLoaderStringBeanContextAppletInitializer_Ser()
            throws Exception {

        ClassLoader loader = new SerClassLoader();
        BeanContext context = new BeanContextSupport();
        AppletInitializer appInit = new MockAppletInitializer();
        Object bean = Beans.instantiate(loader, MOCK_JAVA_BEAN2, context,
                appInit);

        assertEquals("as_object", (String) bean.getClass().getMethod(
                "getPropertyOne", (Class[]) null).invoke(bean, (Object[]) null));
View Full Code Here


    public void testInstantiateClassLoaderStringBeanContextAppletInitializer_LoaderNull()
            throws Exception {
        String beanName = "org.apache.harmony.beans.tests.support.mock.MockJavaBean";
        BeanContext context = new BeanContextSupport();
        AppletInitializer appInit = new MockAppletInitializer();

        Object bean = Beans.instantiate(null, beanName, context, appInit);

        assertSame(ClassLoader.getSystemClassLoader(), bean.getClass()
                .getClassLoader());
View Full Code Here

    public void testInstantiateClassLoaderStringBeanContextAppletInitializer_BeanNull()
            throws Exception {
        ClassLoader loader = createSpecificClassLoader();
        BeanContext context = new BeanContextSupport();
        AppletInitializer appInit = new MockAppletInitializer();

        try {
            Beans.instantiate(loader, null, context, appInit);
            fail("Should throw NullPointerException.");
        } catch (NullPointerException e) {
View Full Code Here

    public void testInstantiateClassLoaderStringBeanContextAppletInitializer_ContextNull()
            throws Exception {
        ClassLoader loader = createSpecificClassLoader();
        String beanName = "org.apache.harmony.beans.tests.support.mock.MockJavaBean";
        AppletInitializer appInit = new MockAppletInitializer();
        Object bean = Beans.instantiate(loader, beanName, null, appInit);

        assertSame(ClassLoader.getSystemClassLoader(), bean.getClass()
                .getClassLoader());
        assertEquals(beanName, bean.getClass().getName());
View Full Code Here

     */
    public void testInstantiateClassLoaderStringBeanContextAppletInitializer_Class()
            throws Exception {
        ClassLoader loader = new BinClassLoader();
        BeanContext context = new BeanContextSupport();
        AppletInitializer appInit = new MockAppletInitializer();
        Object bean = Beans.instantiate(loader, MOCK_JAVA_BEAN2, context,
                appInit);

        assertEquals("as_class", (String) bean.getClass().getMethod(
                "getPropertyOne", (Class[]) null).invoke(bean, (Object[]) null));
View Full Code Here

    public void testInstantiateClassLoaderStringBeanContextAppletInitializer_Ser()
            throws Exception {

        ClassLoader loader = new SerClassLoader();
        BeanContext context = new BeanContextSupport();
        AppletInitializer appInit = new MockAppletInitializer();
        Object bean = Beans.instantiate(loader, MOCK_JAVA_BEAN2, context,
                appInit);

        assertEquals("as_object", (String) bean.getClass().getMethod(
                "getPropertyOne", (Class[]) null).invoke(bean, (Object[]) null));
View Full Code Here

    public void testInstantiateClassLoaderStringBeanContextAppletInitializer_LoaderNull()
            throws Exception {
        String beanName = "org.apache.harmony.beans.tests.support.mock.MockJavaBean";
        BeanContext context = new BeanContextSupport();
        AppletInitializer appInit = new MockAppletInitializer();

        Object bean = Beans.instantiate(null, beanName, context, appInit);

        assertSame(ClassLoader.getSystemClassLoader(), bean.getClass()
                .getClassLoader());
View Full Code Here

    public void testInstantiateClassLoaderStringBeanContextAppletInitializer_BeanNull()
            throws Exception {
        ClassLoader loader = createSpecificClassLoader();
        BeanContext context = new BeanContextSupport();
        AppletInitializer appInit = new MockAppletInitializer();

        try {
            Beans.instantiate(loader, null, context, appInit);
            fail("Should throw NullPointerException.");
        } catch (NullPointerException e) {
View Full Code Here

    public void testInstantiateClassLoaderStringBeanContextAppletInitializer_ContextNull()
            throws Exception {
        ClassLoader loader = createSpecificClassLoader();
        String beanName = "org.apache.harmony.beans.tests.support.mock.MockJavaBean";
        AppletInitializer appInit = new MockAppletInitializer();
        Object bean = Beans.instantiate(loader, beanName, null, appInit);

        assertSame(ClassLoader.getSystemClassLoader(), bean.getClass()
                .getClassLoader());
        assertEquals(beanName, bean.getClass().getName());
View Full Code Here

TOP

Related Classes of java.beans.AppletInitializer

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.