Examples of translate()


Examples of org.apache.hivemind.schema.rules.ClassTranslator.translate()

        replayControls();

        ClassTranslator t = new ClassTranslator();

        Class c = (Class) t.translate(m, null, getClass().getName());

        assertEquals(getClass(), c);

        verifyControls();
    }
View Full Code Here

Examples of org.apache.hivemind.schema.rules.ConfigurationTranslator.translate()

        Module m = (Module) newMock(Module.class);

        replayControls();
        ConfigurationTranslator t = new ConfigurationTranslator();

        assertNull(t.translate(m, null, null));

        verifyControls();
    }

    public void testConfigurationTranslator() throws Exception
View Full Code Here

Examples of org.apache.hivemind.schema.rules.DoubleTranslator.translate()

     */
    public void testDoubleTranslator()
    {
        DoubleTranslator t = new DoubleTranslator();

        assertEquals(new Double(10.7), t.translate(null, null, "10.7"));
    }

    public void testDoubleDefault()
    {
        DoubleTranslator t = new DoubleTranslator();
View Full Code Here

Examples of org.apache.hivemind.schema.rules.EnumerationTranslator.translate()

        replayControls();

        EnumerationTranslator t =
            new EnumerationTranslator("java.lang.Boolean,true=TRUE,false=FALSE");

        assertEquals(null, t.translate(m, null, null));

        verifyControls();
    }

    public void testMatch()
View Full Code Here

Examples of org.apache.hivemind.schema.rules.IdListTranslator.translate()

    public void testNullList()
    {
        Translator t = new IdListTranslator();

        assertEquals(null, t.translate(null, null, null, null));
    }

    public void testNonNullList()
    {
        Module m = getModule();
View Full Code Here

Examples of org.apache.hivemind.schema.rules.InstanceTranslator.translate()

    public void testNull()
    {
        InstanceTranslator t = new InstanceTranslator();

        assertNull(t.translate(null, null, null, null));
    }

    protected Module newModule()
    {
        return (Module) newMock(Module.class);
View Full Code Here

Examples of org.apache.hivemind.schema.rules.IntTranslator.translate()

    */
    public void testIntTranslator()
    {
        IntTranslator t = new IntTranslator();

        assertEquals(new Integer(10), t.translate(null, null, "10"));
    }

    public void testIntDefault()
    {
        IntTranslator t = new IntTranslator();
View Full Code Here

Examples of org.apache.hivemind.schema.rules.LongTranslator.translate()

    public void testLongTranslator()
    {
        LongTranslator t = new LongTranslator();

        assertEquals(new Long(10), t.translate(null, null, "10"));
    }

    public void testLongDefault()
    {
        LongTranslator t = new LongTranslator();
View Full Code Here

Examples of org.apache.hivemind.schema.rules.ObjectTranslator.translate()

    public void testNull()
    {
        ObjectTranslator t = new ObjectTranslator();

        assertNull(t.translate(null, null, null));
    }

    public void testBadClass() throws Exception
    {
        ObjectTranslator t = new ObjectTranslator();
View Full Code Here

Examples of org.apache.hivemind.schema.rules.QualifiedIdTranslator.translate()

{
    public void testNullId()
    {
        Translator t = new QualifiedIdTranslator();

        assertNull(t.translate(null, null, null, null));
    }

    private Module getModule()
    {
        MockControl c = newControl(Module.class);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.