Examples of Distributor


Examples of org.libreplan.business.planner.entities.allocationalgorithms.Distributor

                hasEfforts(hours(8), hours(8)));
    }

    @Test
    public void theOverAssignableCapacityGetsTheRest() {
        Distributor distributor = Distributor.among(Capacity.create(hours(8))
                .notOverAssignableWithoutLimit(), Capacity.create(hours(8))
                .overAssignableWithoutLimit());

        assertThat(distributor.distribute(hours(14)),
                hasEfforts(hours(7), hours(7)));
        assertThat(distributor.distribute(hours(16)),
                hasEfforts(hours(8), hours(8)));

        assertThat(distributor.distribute(hours(18)),
                hasEfforts(hours(8), hours(10)));
    }
View Full Code Here

Examples of org.libreplan.business.planner.entities.allocationalgorithms.Distributor

                hasEfforts(hours(8), hours(10)));
    }

    @Test
    public void mixingNotOverAssignableAndOverassignableToALimit() {
        Distributor distributor = Distributor.among(Capacity.create(hours(8))
                .withAllowedExtraEffort(hours(2)), Capacity.create(hours(8))
                .notOverAssignableWithoutLimit());

        assertThat(distributor.distribute(hours(16)),
                hasEfforts(hours(8), hours(8)));
        assertThat(distributor.distribute(hours(17)),
                hasEfforts(hours(9), hours(8)));
        assertThat(distributor.distribute(hours(18)),
                hasEfforts(hours(10), hours(8)));
        assertThat(distributor.distribute(hours(19)),
                hasEfforts(hours(10), hours(8)));
    }
View Full Code Here

Examples of org.libreplan.business.planner.entities.allocationalgorithms.Distributor

                hasEfforts(hours(10), hours(8)));
    }

    @Test
    public void ifNoCapacityItReturnsZeroHours() {
        Distributor distributor = Distributor.among(Capacity.create(hours(0))
                .notOverAssignableWithoutLimit());
        assertThat(distributor.distribute(hours(4)), hasEfforts(hours(0)));
    }
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.