@Test(expected = IllegalArgumentException.class) @edu.umd.cs.findbugs.annotations.SuppressFBWarnings( value = "NP_NULL_PARAM_DEREF_ALL_TARGETS_DANGEROUS", justification = "Testing null argument") public void testLoadTextResourceString_IllegalArgument() throws IOException { loremIpsum.loadTextResource(null); }
/** * Test method for {@link com.dell.mensa.util.LoremIpsum#loadTextResource(java.lang.String)}. * * @throws IOException if thrown by code under test */ @Test public void testLoadTextResourceString() throws IOException { loremIpsum.loadTextResource(LoremIpsum.LOREM_IPSUM_RESOURCE); sanityCheckDefaultText(loremIpsum); }
@Test(expected = FileNotFoundException.class) public void testLoadTextResourceString_BadResource() throws IOException { loremIpsum.loadTextResource("bad-resource"); }
/** * Test method for {@link com.dell.mensa.util.LoremIpsum#loadTextResource()}. * * @throws IOException if thrown by code under test */ @Test public void testLoadTextResource() throws IOException { loremIpsum.loadTextResource(); sanityCheckDefaultText(loremIpsum); }