Package eu.scape_project.planning.model.scales

Examples of eu.scape_project.planning.model.scales.FloatScale


public class LeafPersistenceIT extends PersistenceTest{
   
    @Test
    public void testRemovingScale(){
        Leaf l = new Leaf();
        l.setScale(new FloatScale());
        l.setName("a float scale");

        em.getTransaction().begin();
        em.persist(l);
        em.getTransaction().commit();
View Full Code Here


        scales.add(new BooleanScale());
        scales.add(new YanScale());
        scales.add(new OrdinalScale());
        scales.add(new IntegerScale());
        scales.add(new IntRangeScale());
        scales.add(new FloatScale());
        scales.add(new FloatRangeScale());
        scales.add(new PositiveFloatScale());
        scales.add(new PositiveIntegerScale());
        scales.add(new FreeStringScale());
View Full Code Here

    }

    @Test
    public void testResetValues_Different_Scale_In_Alternatives() {
        Leaf l = new Leaf();
        l.setScale(new FloatScale());
        Alternative a = new Alternative("test", "test");
        List<Alternative> alternatives = new ArrayList<Alternative>();
        alternatives.add(a);

        Map<String, Values> map = new HashMap<String, Values>();
View Full Code Here

        Assert.assertTrue(ord.getMapping().containsKey("HORRIBLE"));
    }

    @Test
    public void testSetDefaultTransformer_Scale_Equals_NonOrdinal() {
        FloatScale o = new FloatScale();
        Leaf l = new Leaf();
        l.setScale(o);
        l.setDefaultTransformer();
        Assert.assertTrue(l.getTransformer() instanceof NumericTransformer);
    }
View Full Code Here

        if ("Boolean".equalsIgnoreCase(scaleName)) {
            return new BooleanScale();
        } else if ("FreeText".equalsIgnoreCase(scaleName)) {
            return new FreeStringScale();
        } else if ("Number".equalsIgnoreCase(scaleName)) {
            return new FloatScale();
        } else if ("PositiveNumber".equalsIgnoreCase(scaleName)) {
            return new PositiveFloatScale();
        } else if ("PositiveInteger".equalsIgnoreCase(scaleName)) {
            return new PositiveIntegerScale();
        } else if ("Ordinal".equalsIgnoreCase(scaleName)) {
View Full Code Here

TOP

Related Classes of eu.scape_project.planning.model.scales.FloatScale

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.