name-parser-api/src/test/java/org/gbif/nameparser/NameParserTest.java
/**
   * Test all names in nonames.txt and makes sure they are NO_NAMEs.
   */
Test all names in nonames.txt and makes sure they are NO_NAMEs.
Test all names in nonames . txt and makes sure they are NO_NAMEs .
@Test
  public void placeholderFile() throws Exception {
    for (String name : iterResource("placeholder.txt")) {
      try {
        ParsedName pn = parser.parse(name);
        fail("Expected " + name + " to be an unparsable placeholder");
      } catch (UnparsableNameException ex) {
        assertEquals(NameType.PLACEHOLDER, ex.getType());
        assertEquals(name, ex.getName());
      }
    }
  }
@ Test public void placeholderFile ( ) throws Exception { for ( String name : iterResource ( "placeholder.txt" ) ) { try { ParsedName pn = parser . parse ( name ) ; fail ( "Expected " + name + " to be an unparsable placeholder" ) ; } catch ( UnparsableNameException ex ) { assertEquals ( NameType . PLACEHOLDER , ex . getType ( ) ) ; assertEquals ( name , ex . getName ( ) ) ; } } }
Test all names in nonames.txt and makes sure they are NO_NAMEs.
Test all names in nonames . txt and makes sure they are NO_NAMEs .