Package eu.scape_project.planning.model.kbrowser

Examples of eu.scape_project.planning.model.kbrowser.VPlanLeaf


import eu.scape_project.planning.model.values.OrdinalValue;

public class VPlanLeafTest {
    @Test
    public void hasKOPotential_ordinalTrans_independentOfAggregation() {
        VPlanLeaf avgAggLeaf = createLeafWithOrdinalTransformer(SampleAggregationMode.AVERAGE);
        VPlanLeaf worstAggLeaf = createLeafWithOrdinalTransformer(SampleAggregationMode.WORST);

        assertEquals(false, avgAggLeaf.hasKOPotential());
        assertEquals(false, worstAggLeaf.hasKOPotential());
    }
View Full Code Here


        assertEquals(false, worstAggLeaf.hasKOPotential());
    }

    @Test
    public void hasKOPotential_numericTransformer_independentOfAggregation() {
        VPlanLeaf avgAggLeaf = createLeafWithNumericTransformer(SampleAggregationMode.AVERAGE);
        VPlanLeaf worstAggLeaf = createLeafWithNumericTransformer(SampleAggregationMode.WORST);

        assertEquals(true, avgAggLeaf.hasKOPotential());
        assertEquals(true, worstAggLeaf.hasKOPotential());
    }
View Full Code Here

        assertEquals(true, worstAggLeaf.hasKOPotential());
    }

    @Test
    public void getActualKO_ordinalTransformerNotMappingTo0_average() {
        VPlanLeaf leaf = createLeafWithOrdinalTransformer(SampleAggregationMode.AVERAGE);

        assertEquals(0, leaf.getActualKO(), 0.001);
    }
View Full Code Here

        assertEquals(0, leaf.getActualKO(), 0.001);
    }

    @Test
    public void getActualKO_ordinalTransformerNotMappingTo0_worst() {
        VPlanLeaf leaf = createLeafWithOrdinalTransformer(SampleAggregationMode.WORST);

        assertEquals(0, leaf.getActualKO(), 0.001);
    }
View Full Code Here

        assertEquals(0, leaf.getActualKO(), 0.001);
    }

    @Test
    public void getActualKO_numericTransformer_average() {
        VPlanLeaf leaf = createLeafWithNumericTransformer(SampleAggregationMode.AVERAGE);

        assertEquals(0, leaf.getActualKO(), 0.001);
    }
View Full Code Here

        assertEquals(0, leaf.getActualKO(), 0.001);
    }

    @Test
    public void getActualKO_numericTransformer_worst() {
        VPlanLeaf leaf = createLeafWithNumericTransformer(SampleAggregationMode.WORST);

        assertEquals(1, leaf.getActualKO(), 0.001);
    }
View Full Code Here

        assertEquals(1, leaf.getActualKO(), 0.001);
    }

    @Test
    public void getPotentialOutputRange_ordinalTransformer_independentOfAggregation() {
        VPlanLeaf avgAggLeaf = createLeafWithOrdinalTransformer(SampleAggregationMode.AVERAGE);
        VPlanLeaf worstAggLeaf = createLeafWithOrdinalTransformer(SampleAggregationMode.WORST);

        assertEquals(4, avgAggLeaf.getPotentialOutputRange(), 0.001);
        assertEquals(4, worstAggLeaf.getPotentialOutputRange(), 0.001);
    }
View Full Code Here

        assertEquals(4, worstAggLeaf.getPotentialOutputRange(), 0.001);
    }

    @Test
    public void getPotentialOutputRange_numericTransformer_independentOfAggregation() {
        VPlanLeaf avgAggLeaf = createLeafWithNumericTransformer(SampleAggregationMode.AVERAGE);
        VPlanLeaf worstAggLeaf = createLeafWithNumericTransformer(SampleAggregationMode.WORST);

        assertEquals(5, avgAggLeaf.getPotentialOutputRange(), 0.001);
        assertEquals(5, worstAggLeaf.getPotentialOutputRange(), 0.001);
    }
View Full Code Here

        assertEquals(5, worstAggLeaf.getPotentialOutputRange(), 0.001);
    }

    @Test
    public void getActualOutputRange_ordinalTransformer_average() {
        VPlanLeaf leaf = createLeafWithOrdinalTransformer(SampleAggregationMode.AVERAGE);

        assertEquals(3, leaf.getActualOutputRange(), 0.001);
    }
View Full Code Here

        assertEquals(3, leaf.getActualOutputRange(), 0.001);
    }

    @Test
    public void getActualOutputRange_ordinalTransformer_worst() {
        VPlanLeaf leaf = createLeafWithOrdinalTransformer(SampleAggregationMode.WORST);

        assertEquals(0, leaf.getActualOutputRange(), 0.001);
    }
View Full Code Here

TOP

Related Classes of eu.scape_project.planning.model.kbrowser.VPlanLeaf

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.