Package org.zkoss.ganttz.data

Examples of org.zkoss.ganttz.data.ITaskFundamentalProperties


    private final LocalDate START = new LocalDate(2009, 12, 1);

    private ITaskFundamentalProperties createTask(LocalDate start,
            int durationDays) {
        ITaskFundamentalProperties result = createNiceMock(ITaskFundamentalProperties.class);
        expect(result.getBeginDate()).andReturn(toDate(start)).anyTimes();
        expect(result.getEndDate()).andReturn(
                toDate(start.plusDays(durationDays))).anyTimes();
        replay(result);
        return result;
    }
View Full Code Here


        return CriticalPathCalculator.create(false);
    }

    private ITaskFundamentalProperties createTaskWithBiggerOrEqualThanConstraint(
            LocalDate start, int durationDays, LocalDate date) {
        ITaskFundamentalProperties result = createNiceMock(ITaskFundamentalProperties.class);
        expect(result.getBeginDate()).andReturn(toDate(start)).anyTimes();
        expect(result.getEndDate()).andReturn(
                toDate(start.plusDays(durationDays))).anyTimes();
        GanttDate ganttDate = GanttDate.createFrom(date);
        Constraint<GanttDate> constraint = biggerOrEqualThan(ganttDate);
        expect(result.getStartConstraints()).andReturn(
                Arrays.asList(constraint)).anyTimes();

        replay(result);
        return result;
    }
View Full Code Here

        return result;
    }

    private ITaskFundamentalProperties createTaskWithEqualConstraint(
            LocalDate start, int durationDays, LocalDate date) {
        ITaskFundamentalProperties result = createNiceMock(ITaskFundamentalProperties.class);
        expect(result.getBeginDate()).andReturn(toDate(start)).anyTimes();
        expect(result.getEndDate()).andReturn(
                toDate(start.plusDays(durationDays))).anyTimes();

        GanttDate ganttDate = GanttDate.createFrom(date);
        Constraint<GanttDate> constraint = ConstraintOnComparableValues
                .equalTo(ganttDate);
        expect(result.getStartConstraints()).andReturn(
                Arrays.asList(constraint)).anyTimes();

        replay(result);
        return result;
    }
View Full Code Here

     * </pre>
     */
    private void givenPairOfTasks(int daysTask1, int daysSubtask1) {
        diagramGraphExample = createNiceMock(ICriticalPathCalculable.class);

        ITaskFundamentalProperties task1 = createTask(START, daysTask1);
        ITaskFundamentalProperties subtask1 = createTask(START, daysSubtask1);

        List<ITaskFundamentalProperties> listOfTasks = Arrays.asList(task1,
                subtask1);

        expect(diagramGraphExample.getTasks()).andReturn(listOfTasks)
View Full Code Here

     */
    private void givenTwoPairOfTasksNotConnected(int daysTask1,
            int daysSubtask1, int daysTask2, int daysSubtask2) {
        diagramGraphExample = createNiceMock(ICriticalPathCalculable.class);

        ITaskFundamentalProperties task1 = createTask(START, daysTask1);
        ITaskFundamentalProperties task2 = createTask(START, daysTask2);
        ITaskFundamentalProperties subtask1 = createTask(START, daysSubtask1);
        ITaskFundamentalProperties subtask2 = createTask(START, daysSubtask2);

        List<ITaskFundamentalProperties> listOfTasks = Arrays.asList(task1,
                subtask1, task2, subtask2);

        expect(diagramGraphExample.getTasks()).andReturn(listOfTasks)
View Full Code Here

     */
    private void givenTwoTaskConnectedAndOneIndependentTask(int daysTask1,
            int daysTask2, int daysIndependentTask) {
        diagramGraphExample = createNiceMock(ICriticalPathCalculable.class);

        ITaskFundamentalProperties task1 = createTask(START, daysTask1);
        ITaskFundamentalProperties task2 = createTask(START, daysTask2);
        ITaskFundamentalProperties independentTask = createTask(START,
                daysIndependentTask);

        List<ITaskFundamentalProperties> listOfTasks = Arrays.asList(task1,
                task2, independentTask);

View Full Code Here

     */
    private void givenOneTaskWithTwoDependantTasks(int daysTask1,
            int daysSubtask1, int daysSubtask2) {
        diagramGraphExample = createNiceMock(ICriticalPathCalculable.class);

        ITaskFundamentalProperties task = createTask(START, daysTask1);
        ITaskFundamentalProperties subtask1 = createTask(START, daysSubtask1);
        ITaskFundamentalProperties subtask2 = createTask(START, daysSubtask2);

        List<ITaskFundamentalProperties> listOfTasks = Arrays.asList(task,
                subtask1, subtask2);

        expect(diagramGraphExample.getTasks()).andReturn(listOfTasks)
View Full Code Here

     */
    private void givenTwoTaskWithOneCommonDependantTask(int daysTask1,
            int daysTask2, int daysSubtask1) {
        diagramGraphExample = createNiceMock(ICriticalPathCalculable.class);

        ITaskFundamentalProperties task1 = createTask(START, daysTask1);
        ITaskFundamentalProperties task2 = createTask(START, daysTask2);
        ITaskFundamentalProperties subtask1 = createTask(START, daysSubtask1);

        List<ITaskFundamentalProperties> listOfTasks = Arrays.asList(task1,
                task2, subtask1);

        expect(diagramGraphExample.getTasks()).andReturn(listOfTasks)
View Full Code Here

    private void givenOneTaskWithTwoDependantTasksAndOneCommonDependantTask(
            int daysTask1, int daysSubtask1, int daysSubtask2,
            int daysFinalTask1) {
        diagramGraphExample = createNiceMock(ICriticalPathCalculable.class);

        ITaskFundamentalProperties task = createTask(START, daysTask1);
        ITaskFundamentalProperties subtask1 = createTask(START, daysSubtask1);
        ITaskFundamentalProperties subtask2 = createTask(START, daysSubtask2);
        ITaskFundamentalProperties finalTask = createTask(START, daysFinalTask1);

        List<ITaskFundamentalProperties> listOfTasks = Arrays.asList(task,
                subtask1, subtask2, finalTask);

        expect(diagramGraphExample.getTasks()).andReturn(listOfTasks)
View Full Code Here

    private void givenTwoTaskWithOneCommonDependantTaskWithTwoDependantTasks(
            int daysTask1, int daysTask2, int daysSubtask1, int daysFinalTask1,
            int daysFinalTask2) {
        diagramGraphExample = createNiceMock(ICriticalPathCalculable.class);

        ITaskFundamentalProperties task1 = createTask(START, daysTask1);
        ITaskFundamentalProperties task2 = createTask(START, daysTask2);
        ITaskFundamentalProperties subtask1 = createTask(START, daysSubtask1);
        ITaskFundamentalProperties finalTask1 = createTask(START,
                daysFinalTask1);
        ITaskFundamentalProperties finalTask2 = createTask(START,
                daysFinalTask2);

        List<ITaskFundamentalProperties> listOfTasks = Arrays.asList(task1,
                task2, subtask1, finalTask1, finalTask2);
View Full Code Here

TOP

Related Classes of org.zkoss.ganttz.data.ITaskFundamentalProperties

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.