예제 #1
0
 /** Test method for {@link com.dell.mensa.util.LoremIpsum#getParagraph(int)}. */
 @Test
 public void testGetParagraph() {
   for (int i = 0; i < EXPECTED_PARAGRAPHS.length; ++i) {
     Assert.assertEquals(
         String.format("unexpected paragraph[%d]; ", i),
         EXPECTED_PARAGRAPHS[i],
         loremIpsum.getParagraph(i));
   }
 }
예제 #2
0
 @Test(expected = IndexOutOfBoundsException.class)
 public void testGetParagraph_Overflow() {
   loremIpsum.getParagraph(loremIpsum.getNumParagraphs());
 }
예제 #3
0
 @Test(expected = IndexOutOfBoundsException.class)
 public void testGetParagraph_Underflow() {
   loremIpsum.getParagraph(-1);
 }