コード例 #1
0
 /**
  * Test method for {@link FollowsNamedTypeBlockParser#parse(java.lang.String, JavadocScanner)}.
  *
  * @throws Exception If occurred
  */
 @Test
 public void testParseMissing() throws Exception {
   FollowsNamedTypeBlockParser parser = new FollowsNamedTypeBlockParser("throws");
   IrDocBlock block = parser.parse("throws", string(" /IllegalArgumentException"));
   assertEquals("@throws", block.getTag());
   List<? extends IrDocFragment> fragments = block.getFragments();
   assertKinds(fragments, TEXT);
   assertTextEquals(" /IllegalArgumentException", fragments.get(0));
 }
コード例 #2
0
 /**
  * Test method for {@link FollowsNamedTypeBlockParser#parse(java.lang.String, JavadocScanner)}.
  *
  * @throws Exception If occurred
  */
 @Test
 public void testParseJust() throws Exception {
   FollowsNamedTypeBlockParser parser = new FollowsNamedTypeBlockParser("throws");
   IrDocBlock block = parser.parse("throws", string("IllegalArgumentException"));
   assertEquals("@throws", block.getTag());
   List<? extends IrDocFragment> fragments = block.getFragments();
   assertKinds(fragments, NAMED_TYPE);
   assertEquals(
       "IllegalArgumentException", ((IrDocNamedType) fragments.get(0)).getName().asString());
 }