*/
@Test
public void testFetchSimpleName() {
{
DefaultJavadocScanner scanner = string("java.lang.String");
IrDocSimpleName elem = JavadocBlockParserUtil.fetchSimpleName(scanner, null);
assertNotNull(elem);
assertEquals("java", elem.getIdentifier());
assertEquals(0, elem.getLocation().getStartPosition());
assertEquals("java".length(), elem.getLocation().getLength());
assertEquals(DOT, scanner.lookahead(0).getKind());
}
{
DefaultJavadocScanner scanner = string(".String");
IrDocSimpleName elem = JavadocBlockParserUtil.fetchSimpleName(scanner, null);
assertNull(elem);
assertEquals(DOT, scanner.lookahead(0).getKind());
}
{
DefaultJavadocScanner scanner = string("java.lang.String");
IrDocSimpleName elem = JavadocBlockParserUtil.fetchSimpleName(scanner, EnumSet.of(WHITE_SPACES));
assertNull(elem);
assertEquals(IDENTIFIER, scanner.lookahead(0).getKind());
}
}