src/test/java/guitests/guihandles/DeadlineTaskListPanelHandle.java
/**
     * Returns true if the list is showing the task details correctly and in
     * correct order.
     *
     * @param startPosition
     *            The starting position of the sub list.
     * @param persons
     *            A list of task in the correct order.
     */
Returns true if the list is showing the task details correctly and in
correct order.

@param startPosition
The starting position of the sub list.
@param persons
A list of task in the correct order.
Returns true if the list is showing the task details correctly and in correct order . @param startPosition The starting position of the sub list . @param persons A list of task in the correct order .
public boolean isListMatching(int startPosition, ReadOnlyTask... tasks) throws IllegalArgumentException {
        List<ReadOnlyTask> deadlineTasks = new ArrayList<>(Arrays.asList(tasks));
        for (int index = 0; index < deadlineTasks.size(); index++) {
            if (!deadlineTasks.get(index).isDeadlineTask()) {
                deadlineTasks.remove(index);
                index--;
            }
        }
        if (deadlineTasks.size() + startPosition != getDeadlineListView().getItems().size()) {
            throw new IllegalArgumentException(
                    "List size mismatched\n" + "Expected " + (getDeadlineListView().getItems().size() - 1) + " tasks");
        }
        ReadOnlyTask[] taskArray = deadlineTasks.toArray(new ReadOnlyTask[deadlineTasks.size()]);
        assertTrue(this.containsInOrder(startPosition, taskArray));
        for (int i = 0; i < deadlineTasks.size(); i++) {
            final int scrollTo = i + startPosition;
            guiRobot.interact(() -> getDeadlineListView().scrollTo(scrollTo));
            guiRobot.sleep(200);
            if (!TestUtil.compareCardAndTask(getDeadlineTaskCardHandle(startPosition + i), deadlineTasks.get(i))) {
                return false;
            }
        }
        return true;
    }
public boolean isListMatching ( int startPosition , ReadOnlyTask ... tasks ) throws IllegalArgumentException { List < ReadOnlyTask > deadlineTasks = new ArrayList < > ( Arrays . asList ( tasks ) ) ; for ( int index = 0 ; index < deadlineTasks . size ( ) ; index ++ ) { if ( ! deadlineTasks . get ( index ) . isDeadlineTask ( ) ) { deadlineTasks . remove ( index ) ; index -- ; } } if ( deadlineTasks . size ( ) + startPosition != getDeadlineListView ( ) . getItems ( ) . size ( ) ) { throw new IllegalArgumentException ( "List size mismatched\n" + "Expected " + ( getDeadlineListView ( ) . getItems ( ) . size ( ) - 1 ) + " tasks" ) ; } ReadOnlyTask [ ] taskArray = deadlineTasks . toArray ( new ReadOnlyTask [ deadlineTasks . size ( ) ] ) ; assertTrue ( this . containsInOrder ( startPosition , taskArray ) ) ; for ( int i = 0 ; i < deadlineTasks . size ( ) ; i ++ ) { final int scrollTo = i + startPosition ; guiRobot . interact ( ( ) -> getDeadlineListView ( ) . scrollTo ( scrollTo ) ) ; guiRobot . sleep ( 200 ) ; if ( ! TestUtil . compareCardAndTask ( getDeadlineTaskCardHandle ( startPosition + i ) , deadlineTasks . get ( i ) ) ) { return false ; } } return true ; }
Returns true if the list is showing the task details correctly and in
 correct order.
Returns true if the list is showing the task details correctly and in correct order .