assertTrue("Remove happened", fMyPart.hasRemoveHappened()); assertEquals("2 elements removed", 2, fMyPart.getRemovedObject().size()); assertTrue("Correct elements removed", fMyPart.getRemovedObject().contains(fCU2) && fMyPart.getRemovedObject().contains(fCU3)); assertEquals("No refreshes", 0, fMyPart.getRefreshedObject().size());
assertEquals("No refreshes", 1, fMyPart.getRefreshedObject().size());
	public void testRemoveCUsFromPackageFragment() throws Exception{				//send a delta indicating fragment deleted		IElementChangedListener listener= (IElementChangedListener) fProvider;		IJavaElementDelta delta= TestDelta.createCUDelta(new ICompilationUnit[] { fCU2, fCU3 }, fPack6, IJavaElementDelta.REMOVED);		listener.elementChanged(new ElementChangedEvent(delta, ElementChangedEvent.POST_CHANGE));				//force events from display		while(fMyPart.getTreeViewer().getControl().getDisplay().readAndDispatch());				assertTrue("Remove happened", fMyPart.hasRemoveHappened()); //$NON-NLS-1$		assertEquals("2 elements removed", 2, fMyPart.getRemovedObject().size()); //$NON-NLS-1$		assertTrue("Correct elements removed", fMyPart.getRemovedObject().contains(fCU2) && fMyPart.getRemovedObject().contains(fCU3)); //$NON-NLS-1$		assertEquals("No refreshes", 0, fMyPart.getRefreshedObject().size()); //$NON-NLS-1$	}