Package org.libreplan.business.planner.entities.allocationalgorithms

Examples of org.libreplan.business.planner.entities.allocationalgorithms.Distributor.distribute()


                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)));
    }

    @Test
    public void ifNoCapacityItReturnsZeroHours() {
View Full Code Here


    @Test
    public void ifNoCapacityItReturnsZeroHours() {
        Distributor distributor = Distributor.among(Capacity.create(hours(0))
                .notOverAssignableWithoutLimit());
        assertThat(distributor.distribute(hours(4)), hasEfforts(hours(0)));
    }

    private Matcher<List<EffortDuration>> hasEfforts(
            final EffortDuration... efforts) {
        return new BaseMatcher<List<EffortDuration>>() {
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.