@Test public void convertDelimitedStringWithTwoItemsReturnsTwoItems() { List<String> idList = webGroupDao.convertDelimitedIDString(group1 + "," + group2); assertEquals(2, idList.size()); assertTrue(idList.contains(group1)); assertTrue(idList.contains(group2)); }
@Test public void convertDelimitedStringWithOneItemReturnsOneItem() { List<String> idList = webGroupDao.convertDelimitedIDString(group1); assertEquals(1, idList.size()); assertTrue(idList.contains(group1)); }
@Test public void convertDelimitedStringWithWhitespaceStringReturnsEmpty() { assertEquals(0, webGroupDao.convertDelimitedIDString(" ").size()); }
@Test public void convertDelimitedStringWithNullReturnsEmpty() { assertEquals(0, webGroupDao.convertDelimitedIDString(null).size()); }
@Test public void convertDelimitedStringNeverReturnsNull() { assertNotNull(webGroupDao.convertDelimitedIDString("")); }