Ejemplo n.º 1
0
  /*
   * This is a case for the reading from a file with empty locations partition
   */
  @Test
  public void testReadEmptyLocation() throws IOException {
    Display emptyDescriptionDisplay = storage.getDisplay(FILE_TEST_EMPTY_LOCATION);

    ArrayList<TaskFloat> emptyFloat = emptyDescriptionDisplay.getFloatTasks();
    ArrayList<TaskDeadline> emptyDeadline = emptyDescriptionDisplay.getDeadlineTasks();
    ArrayList<TaskEvent> emptyEvent = emptyDescriptionDisplay.getEventTasks();

    assertEquals(null, emptyFloat.get(0).getLocation());
    assertEquals(null, emptyDeadline.get(0).getLocation());
    assertEquals(null, emptyEvent.get(0).getLocation());
  }
Ejemplo n.º 2
0
  /* This is a case for the reading from a file with empty tags partition */
  @Test
  public void testReadEmptyTags() throws IOException {
    Display emptyDescriptionDisplay = storage.getDisplay(FILE_TEST_EMPTY_TAGS);

    ArrayList<TaskFloat> emptyFloat = emptyDescriptionDisplay.getFloatTasks();
    ArrayList<TaskDeadline> emptyDeadline = emptyDescriptionDisplay.getDeadlineTasks();
    ArrayList<TaskEvent> emptyEvent = emptyDescriptionDisplay.getEventTasks();

    ArrayList<Task> emptyTagList = new ArrayList<Task>();

    assertEquals(emptyTagList, emptyFloat.get(0).getTags());
    assertEquals(emptyTagList, emptyDeadline.get(0).getTags());
    assertEquals(emptyTagList, emptyEvent.get(0).getTags());
  }