@Test public void test_parsing_xml4() throws Exception { HeaderParser parser = new HeaderParser( new FileContent( new File("src/test/resources/doc/doc7.xml"), System.getProperty("file.encoding")), HeaderType.XML_STYLE.getDefinition(), new String[] {"copyright"}); assertFalse(parser.gotAnyHeader()); }
@Test public void test_has_header2() throws Exception { HeaderParser parser = new HeaderParser( new FileContent( new File("src/test/resources/doc/doc3.txt"), System.getProperty("file.encoding")), HeaderType.TEXT.getDefinition(), new String[] {"copyright"}); assertTrue(parser.gotAnyHeader()); assertEquals(parser.getBeginPosition(), 0); assertEquals(parser.getEndPosition(), 49); }