Examples of DoubleTranslator


Examples of org.apache.hivemind.schema.rules.DoubleTranslator

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

    public void testDoubleLow()
    {
        DoubleTranslator t = new DoubleTranslator("min=5.25,max=200");

        try
        {
            t.translate(null, null, "3", null);
            unreachable();
        }
        catch (ApplicationRuntimeException ex)
        {
            assertExceptionSubstring(ex, RulesMessages.minDoubleValue("3", 5.25));
View Full Code Here

Examples of org.apache.hivemind.schema.rules.DoubleTranslator

        }
    }

    public void testDoubleHigh()
    {
        DoubleTranslator t = new DoubleTranslator("min=07,max=207.5");

        try
        {
            t.translate(null, null, "208.3", null);
            unreachable();
        }
        catch (ApplicationRuntimeException ex)
        {
            assertExceptionSubstring(ex, RulesMessages.maxDoubleValue("208.3", 207.5));
View Full Code Here

Examples of org.apache.hivemind.schema.rules.DoubleTranslator

        }
    }

    public void testDoubleDefaultValue()
    {
        DoubleTranslator t = new DoubleTranslator("default=7.77");

        assertEquals(new Double(7.77), t.translate(null, null, null, null));
    }
View Full Code Here

Examples of org.apache.hivemind.schema.rules.DoubleTranslator

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

    public void testDoubleInvalid()
    {
        DoubleTranslator t = new DoubleTranslator("default=13");

        try
        {
            t.translate(null, null, "qbert", null);
            unreachable();
        }
        catch (ApplicationRuntimeException ex)
        {
            assertExceptionSubstring(ex, "'qbert' is not a double value.");
View Full Code Here

Examples of org.apache.tapestry.translator.DoubleTranslator

            MappedConfiguration<Class, Translator> configuration)
    {
        configuration.add(Integer.class, new IntegerTranslator());
        configuration.add(String.class, new StringTranslator());
        configuration.add(Long.class, new LongTranslator());
        configuration.add(Double.class, new DoubleTranslator());
    }
View Full Code Here

Examples of org.apache.tapestry.translator.DoubleTranslator

        // identify a name and a match type).

        configuration.add("integer", new IntegerTranslator());
        configuration.add("string", new StringTranslator());
        configuration.add("long", new LongTranslator());
        configuration.add("double", new DoubleTranslator());
    }
View Full Code Here

Examples of org.apache.tapestry.translator.DoubleTranslator

        // identify a name and a match type).

        configuration.add("integer", new IntegerTranslator());
        configuration.add("string", new StringTranslator());
        configuration.add("long", new LongTranslator());
        configuration.add("double", new DoubleTranslator());
    }
View Full Code Here

Examples of org.apache.tapestry.translator.DoubleTranslator

            MappedConfiguration<Class, Translator> configuration)
    {
        configuration.add(Integer.class, new IntegerTranslator());
        configuration.add(String.class, new StringTranslator());
        configuration.add(Long.class, new LongTranslator());
        configuration.add(Double.class, new DoubleTranslator());
    }
View Full Code Here

Examples of org.apache.tapestry.translator.DoubleTranslator

            MappedConfiguration<Class, Translator> configuration)
    {
        configuration.add(Integer.class, new IntegerTranslator());
        configuration.add(String.class, new StringTranslator());
        configuration.add(Long.class, new LongTranslator());
        configuration.add(Double.class, new DoubleTranslator());
    }
View Full Code Here

Examples of org.apache.tapestry.translator.DoubleTranslator

        // identify a name and a match type).

        configuration.add("integer", new IntegerTranslator());
        configuration.add("string", new StringTranslator());
        configuration.add("long", new LongTranslator());
        configuration.add("double", new DoubleTranslator());
    }
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.