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