Package org.tamacat.core

Examples of org.tamacat.core.Param


    }

    @Test
    public void testGetBeanParamTestInitMethod() {
        di = new TamaCatDIContainer("test.xml", loader);
        Param t = (Param) di.getBean("ParamTestInitMethod");
        assertNotNull(t);
        //assertTrue(t instanceof Param);

        assertEquals("Initialized", t.getInitValue());

        t = (Param) di.getBean("ParamTestSetterNull");
        assertEquals(null, t.getInitValue());
    }
View Full Code Here


    }

    @Test
    public void testParamTestCDATA() {
        di = new TamaCatDIContainer("test.xml", loader);
        Param param = (Param) di.getBean("ParamTestCDATA");
        assertEquals("<html>TEST</html>", param.getStringValue().trim());
    }
View Full Code Here

    }

    @Test
    public void testSingleAliases() {
        di = new TamaCatDIContainer("test.xml", loader);
        Param param = (Param)di.getBean("AliasTest");
        assertEquals("Test", param.getStringValue());

        Param org = (Param) di.getBean("AliasTestSingle");
        assertEquals(org.getStringValue(), param.getStringValue());
    }
View Full Code Here

    }

    @Test
    public void testMultiAliases() {
        di = new TamaCatDIContainer("test.xml", loader);
        Param param1 = (Param)di.getBean("AliasTest1");
        assertEquals("Test", param1.getStringValue());

        Param param2 = (Param)di.getBean("AliasTest2");
        assertEquals("Test", param2.getStringValue());
    }
View Full Code Here

    }

    @Test
    public void testGetBeanParamTestSetterBasicType() {
        di = new TamaCatDIContainer(XML, loader);
        Param t = (Param) di.getBean("ParamTestSetterBasicType");
        assertNotNull(t);
        //assertTrue(t instanceof Param);

        assertEquals("Test", t.getStringValue());
        assertEquals(100, t.getIntValue());
        assertEquals(1234567890000L, t.getLongValue());
        assertEquals(123.456f, t.getFloatValue());
        assertEquals(123456789.123456789d, t.getDoubleValue());
        assertEquals('a', t.getCharValue());
        assertEquals(true, t.isBooleanValue());
    }
View Full Code Here

    }

    @Test
    public void testGetBeanParamTestConstructorArgString() {
        di = new TamaCatDIContainer(XML, loader);
        Param t = (Param) di.getBean("ParamTestConstructorArgsString");
        assertNotNull(t);
        //assertTrue(t instanceof Param);

        assertEquals("Test", t.getStringValue());
    }
View Full Code Here

    }

    @Test
    public void testGetBeanParamTestConstructorMultiArgsStringAutoTypes() {
        di = new TamaCatDIContainer(XML, loader);
        Param t = (Param) di.getBean("ParamTestConstructorMultiArgsStringAutoTypes");
        assertNotNull(t);
        //assertTrue(t instanceof Param);

        assertEquals("Test1", t.getStringValue());
        assertEquals("Test2", t.getStringValue2());
    }
View Full Code Here

    }

    @Test
    public void testGetBeanParamTestConstructorMultiArgsStringFixedTypes() {
        di = new TamaCatDIContainer(XML, loader);
        Param t = (Param) di.getBean("ParamTestConstructorMultiArgsStringFixedTypes");
        assertNotNull(t);
        //assertTrue(t instanceof Param);

        assertEquals("Test1", t.getStringValue());
        assertEquals("Test2", t.getStringValue2());
    }
View Full Code Here

    }

    @Test
    public void testGetBeanParamTestConstructorArgsRef() {
        di = new TamaCatDIContainer(XML, loader);
        Param t = (Param) di.getBean("ParamTestConstructorArgsRef");
        assertNotNull(t);
        //assertTrue(t instanceof Param);

        assertEquals("Test", t.getParamTest().getStringValue());
    }
View Full Code Here

    }

    @Test
    public void testGetBeanParamTestConstructorMultiArgsRefAutoTypes() {
        di = new TamaCatDIContainer(XML, loader);
        Param t = (Param) di.getBean("ParamTestConstructorMultiArgsRefAutoTypes");
        assertNotNull(t);
        //assertTrue(t instanceof Param);

        assertEquals("Test", t.getParamTest().getStringValue());
        assertEquals("Test", t.getParam2().getStringValue());
    }
View Full Code Here

TOP

Related Classes of org.tamacat.core.Param

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.