/** * Assumes that the folder item created in the previous method still exists and attempts to delete * it. Fails if the item did not exist and if it still exists after deleting it. * * @throws CoreException */ public final void testDeleteFolder() throws CoreException { AggregatorCollection collection = getCollection(); // Assume the folder was added in the method above AggregatorItem item = collection.getChildAt(EnumSet.allOf(ItemType.class), 0); if (item == null) { fail("Folder item could not be retrieved"); // $NON-NLS-1$ } item.getParent().trash(item); item = collection.getChildAt(EnumSet.allOf(ItemType.class), 0); if (item != null) { fail("Folder item was not deleted"); // $NON-NLS-1$ } }
protected void compareAggregatorItems(AggregatorItem item_a, AggregatorItem item_b) { if (!item_a.getUUID().equals(item_a.getUUID())) { failNotEquals( "Unique identifier differs", item_b.getUUID(), item_a //$NON-NLS-1$ .getUUID()); } if (!item_a.getFlags().equals(item_a.getFlags())) { failNotEquals( "Marks identifier differs", item_b.getFlags(), item_a //$NON-NLS-1$ .getFlags()); } if (!item_a.getParent().equals(item_a.getParent())) { failNotEquals( "Parent differs", item_b.getParent(), item_a //$NON-NLS-1$ .getParent()); } if (!item_a.getTitle().equals(item_a.getTitle())) { failNotEquals( "Title differs", item_b.getTitle(), item_a //$NON-NLS-1$ .getTitle()); } if (item_a.isSystem() != item_b.isSystem()) { failNotEquals( "System differs", item_b.isSystem(), item_a //$NON-NLS-1$ .isSystem()); } }