Package org.libreplan.business.planner.entities

Examples of org.libreplan.business.planner.entities.Share


    }

    @Test
    public void twoSharesEqualIfHaveTheSameHours() {
        givenHours(10);
        assertThat(share, equalTo(new Share(10)));
        assertThat(share.hashCode(), equalTo(new Share(10).hashCode()));
    }
View Full Code Here


        return max.getAllowedExtraEffort();

    }

    private static Share createNormalCapacityShare(Capacity each) {
        return new Share(-each.getStandardEffort().getSeconds());
    }
View Full Code Here

        if (each.getAllowedExtraEffort() == null && !each.isOverAssignableWithoutLimit()) {
            return noSpaceAvailable();
        }
        EffortDuration effort = each.getAllowedExtraEffort() != null ? each
                .getAllowedExtraEffort() : maxExtraEffort;
        return new Share(-effort.getSeconds());
    }
View Full Code Here

                .getAllowedExtraEffort() : maxExtraEffort;
        return new Share(-effort.getSeconds());
    }

    private Share noSpaceAvailable() {
        return new Share(Integer.MAX_VALUE);
    }
View Full Code Here

    }

    private List<Share> createUnlimitedShares(Capacity[] capacities) {
        List<Share> result = new ArrayList<Share>();
        for (Capacity each : capacities) {
            result.add(each.isOverAssignableWithoutLimit() ? new Share(0)
                    : noSpaceAvailable());
        }
        return result;
    }
View Full Code Here

TOP

Related Classes of org.libreplan.business.planner.entities.Share

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.