Example #1
0
 @SuppressWarnings("deprecation")
 public void testDeleteCategoryAfterRename() {
   String newDesc = "newDescription";
   assertNotNull(taskList);
   assertEquals(1, taskList.getCategories().size());
   TaskCategory category = new TaskCategory("cat");
   taskList.addCategory(category);
   assertEquals(2, taskList.getCategories().size());
   taskList.renameContainer(category, newDesc);
   taskList.deleteCategory(category);
   assertEquals(1, taskList.getCategories().size());
 }
Example #2
0
 @SuppressWarnings("deprecation")
 public void testRenameCategory() {
   TaskCategory category = new TaskCategory("handle", "cat");
   taskList.addCategory(category);
   assertEquals(2, taskList.getCategories().size());
   taskList.renameContainer(category, "newDescription");
   AbstractTaskCategory container = taskList.getContainerForHandle("handle");
   assertNotNull(container);
   assertEquals("newDescription", container.getSummary());
   taskList.deleteCategory(container);
   assertEquals(1, taskList.getCategories().size());
 }