Package com.inspiresoftware.lib.dto.geda.adapter

Examples of com.inspiresoftware.lib.dto.geda.adapter.ExtensibleBeanFactory


    }

    @Test(expected = IllegalArgumentException.class)
    public void testRegisterDtoDuplicateKey() throws Exception {

        final ExtensibleBeanFactory fb = new ClassLoaderBeanFactory(ClassLoaderBeanFactoryTest.class.getClassLoader());

        fb.registerDto("myDto", DtoClass.class.getCanonicalName());
        fb.registerDto("myDto", DtoClass.class.getCanonicalName());
    }
View Full Code Here


    }

    @Test
    public void testRegisterEntityWithInterface() throws Exception {

        final ExtensibleBeanFactory fb = new ClassLoaderBeanFactory(ClassLoaderBeanFactoryTest.class.getClassLoader());

        fb.registerEntity("myEntity", EntityClass.class.getCanonicalName(), EntityInterface.class.getCanonicalName());

        final Class myEntityClass = fb.getClazz("myEntity");
        assertNotNull(myEntityClass);
        assertEquals(myEntityClass, EntityInterface.class);

        final Object myEntityInstance = fb.get("myEntity");
        assertNotNull(myEntityInstance);
        assertEquals(myEntityInstance.getClass(), EntityClass.class);


    }
View Full Code Here

    }

    @Test
    public void testRegisterEntityWithClass() throws Exception {

        final ExtensibleBeanFactory fb = new ClassLoaderBeanFactory(ClassLoaderBeanFactoryTest.class.getClassLoader());

        fb.registerEntity("myEntity", EntityClass.class.getCanonicalName(), EntityClass.class.getCanonicalName());

        final Class myEntityClass = fb.getClazz("myEntity");
        assertNotNull(myEntityClass);
        assertEquals(myEntityClass, EntityClass.class);

        final Object myEntityInstance = fb.get("myEntity");
        assertNotNull(myEntityInstance);
        assertEquals(myEntityInstance.getClass(), EntityClass.class);


    }
View Full Code Here

    }

    @Test(expected = IllegalArgumentException.class)
    public void testRegisterEntityNullKey() throws Exception {

        final ExtensibleBeanFactory fb = new ClassLoaderBeanFactory(ClassLoaderBeanFactoryTest.class.getClassLoader());

        fb.registerEntity(null, EntityClass.class.getCanonicalName(), EntityClass.class.getCanonicalName());

    }
View Full Code Here

    }

    @Test(expected = IllegalArgumentException.class)
    public void testRegisterEntityEmptyKey() throws Exception {

        final ExtensibleBeanFactory fb = new ClassLoaderBeanFactory(ClassLoaderBeanFactoryTest.class.getClassLoader());

        fb.registerEntity("", EntityClass.class.getCanonicalName(), EntityClass.class.getCanonicalName());

    }
View Full Code Here

    }

    @Test(expected = IllegalArgumentException.class)
    public void testRegisterEntityNullClass() throws Exception {

        final ExtensibleBeanFactory fb = new ClassLoaderBeanFactory(ClassLoaderBeanFactoryTest.class.getClassLoader());

        fb.registerEntity("myEntity", null, EntityClass.class.getCanonicalName());

    }
View Full Code Here

    }

    @Test(expected = IllegalArgumentException.class)
    public void testRegisterEntityEmptyClass() throws Exception {

        final ExtensibleBeanFactory fb = new ClassLoaderBeanFactory(ClassLoaderBeanFactoryTest.class.getClassLoader());

        fb.registerEntity("myEntity", "", EntityClass.class.getCanonicalName());

    }
View Full Code Here

    }

    @Test(expected = IllegalArgumentException.class)
    public void testRegisterEntityNullRep() throws Exception {

        final ExtensibleBeanFactory fb = new ClassLoaderBeanFactory(ClassLoaderBeanFactoryTest.class.getClassLoader());

        fb.registerEntity("myEntity", EntityClass.class.getCanonicalName(), null);

    }
View Full Code Here

    }

    @Test(expected = IllegalArgumentException.class)
    public void testRegisterEntityEmptyRep() throws Exception {

        final ExtensibleBeanFactory fb = new ClassLoaderBeanFactory(ClassLoaderBeanFactoryTest.class.getClassLoader());

        fb.registerEntity("myEntity", EntityClass.class.getCanonicalName(), "");

    }
View Full Code Here

    }

    @Test(expected = IllegalArgumentException.class)
    public void testRegisterEntityDuplicate() throws Exception {

        final ExtensibleBeanFactory fb = new ClassLoaderBeanFactory(ClassLoaderBeanFactoryTest.class.getClassLoader());

        fb.registerEntity("myEntity", EntityClass.class.getCanonicalName(), EntityInterface.class.getCanonicalName());
        fb.registerEntity("myEntity", EntityClass.class.getCanonicalName(), EntityInterface.class.getCanonicalName());
    }
View Full Code Here

TOP

Related Classes of com.inspiresoftware.lib.dto.geda.adapter.ExtensibleBeanFactory

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.