Example #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));
   }
 }
Example #2
0
 @Test(expected = IndexOutOfBoundsException.class)
 public void testGetParagraph_Overflow() {
   loremIpsum.getParagraph(loremIpsum.getNumParagraphs());
 }
Example #3
0
 @Test(expected = IndexOutOfBoundsException.class)
 public void testGetParagraph_Underflow() {
   loremIpsum.getParagraph(-1);
 }