@Test public void imagePresentTest() { // check that all images are not null when there should be an image present assertNotNull(myLabelProvider.getColumnImage(myTaskReview1, 0)); assertNotNull(myLabelProvider.getColumnImage(myTaskReview1, 1)); assertNotNull(myLabelProvider.getColumnImage(myTaskReview1, 2)); assertNotNull(myLabelProvider.getColumnImage(myTaskReview1, 3)); }
@Test public void columnTextTests() { assertEquals(summaryString, myTaskReview2.getSummary()); assertEquals(summaryString, myLabelProvider.getColumnText(myTaskReview2, 0)); assertEquals(incomingString, myLabelProvider.getColumnText(myTaskReview2, 3)); // columns that should be blank assertEquals("", myLabelProvider.getColumnText(myTaskReview2, 1)); assertEquals("", myLabelProvider.getColumnText(myTaskReview2, 2)); // columns that do not exist assertEquals("", myLabelProvider.getColumnText(myTaskReview2, 5)); assertEquals("", myLabelProvider.getColumnText(myTaskReview2, 4)); }
@Test public void imageNotPresentTests() { // check that all images are null when they should be assertNotNull(myLabelProvider.getColumnImage(myTaskReview1, 0)); assertNotNull(myLabelProvider.getColumnImage(myTaskReview1, 1)); assertNotNull(myLabelProvider.getColumnImage(myTaskReview1, 2)); assertNotNull(myLabelProvider.getColumnImage(myTaskReview1, 3)); assertEquals( CommonImages.getImage(CommonImages.OVERLAY_CLEAR), myLabelProvider.getColumnImage(myTaskReview1, 0)); assertEquals( CommonImages.getImage(CommonImages.OVERLAY_CLEAR), myLabelProvider.getColumnImage(myTaskReview1, 0)); assertEquals( CommonImages.getImage(CommonImages.OVERLAY_CLEAR), myLabelProvider.getColumnImage(myTaskReview1, 0)); assertEquals( CommonImages.getImage(CommonImages.OVERLAY_CLEAR), myLabelProvider.getColumnImage(myTaskReview1, 0)); }