@Test public void testLoremCtorString_Null() throws IOException { loremIpsum = new LoremIpsum(null); Assert.assertNull(loremIpsum.getText()); Assert.assertEquals(0, loremIpsum.getNumParagraphs()); Assert.assertEquals(0, loremIpsum.getNumSentences()); Assert.assertEquals(0, loremIpsum.getNumWords()); }
/** * Test method for {@link com.dell.mensa.util.LoremIpsum#LoremIpsum(java.lang.String)}. * * @throws IOException if thrown by code under test */ @Test public void testLoremCtorString() throws IOException { final String text = "hi"; loremIpsum = new LoremIpsum(text); Assert.assertEquals(text, loremIpsum.getText()); Assert.assertEquals(1, loremIpsum.getNumParagraphs()); Assert.assertEquals(1, loremIpsum.getNumSentences()); Assert.assertEquals(1, loremIpsum.getNumWords()); }
/** Test method for {@link com.dell.mensa.util.LoremIpsum#getText()}. */ @Test public void testGetText() { Assert.assertEquals(NORMALIZED_TEXT, loremIpsum.getText()); }