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