Package org.tamacat.groovy.test

Examples of org.tamacat.groovy.test.Core


    }

    @Test
    public void testGetBeanSingleton() {
        di = new GroovyDIContainer("test.xml", loader);
        Core core = (Core) di.getBean("Core");
        assertNotNull(core);
        assertTrue(core instanceof Core);
        Core core2 = (Core) di.getBean("Core");
        assertEquals(core2, core);
       
        Core core3 = (Core) di.getBean("Core-singleton");
        assertNotNull(core3);
        assertTrue(core instanceof Core);
        Core core4 = (Core) di.getBean("Core-singleton");
        assertEquals(core3, core4);
       
        Core core5 = di.getBean("Core", Core.class);
        assertNotNull(core5);
    }
View Full Code Here


    @Test
    public void testGetBeanScopeSingleton() {
        di = new GroovyDIContainer("test.xml", loader);

        Core core1 = di.getBean("Core-scope-singleton", Core.class);
        assertNotNull(core1);
        assertTrue(core1 instanceof Core);
        Core core2 = di.getBean("Core-scope-singleton", Core.class);
        assertEquals(core1, core2);
    }
View Full Code Here

    }

    @Test
    public void testGetBeanPrototype() {
        di = new GroovyDIContainer("test.xml", loader);
        Core core = di.getBean("Core2", Core.class);
        assertNotNull(core);
        assertTrue(core instanceof Core);

        Core core2 = di.getBean("Core2", Core.class);
        assertNotSame(core2, core);
    }
View Full Code Here

    }

    @Test
    public void testGetBeanScopePrototype() {
        di = new GroovyDIContainer("test.xml", loader);
        Core core = di.getBean("Core-scope-prototype", Core.class);
        assertNotNull(core);
        assertTrue(core instanceof Core);

        Core core2 = di.getBean("Core-scope-prototype", Core.class);
        assertNotSame(core2, core);
    }
View Full Code Here

    }
   
    @Test
    public void testGetGroovySampleCore() {
        di = new GroovyDIContainer("test.xml", loader);
        Core core = (Core) di.getBean("GroovySampleCore");
        assertNotNull(core);
        assertTrue(core instanceof Core);
    }
View Full Code Here

    }
   
    @Test
    public void testGetGroovySampleCore2() {
        di = new GroovyDIContainer("test.xml", loader);
        Core core = (Core) di.getBean("GroovySampleCore2");
        assertNotNull(core);
        assertTrue(core instanceof Core);
    }
View Full Code Here

TOP

Related Classes of org.tamacat.groovy.test.Core

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.