@Test public void shouldExtractIllustrationPath() throws Exception { String content = "[part \"parte um\" illustration=resources/image.png]\n" + "[chapter capitulo um]\n" + "introducao do capitulo um\n" + "[section secao um]\n" + "conteudo da secao um"; assertTrue(extractor.containsIllustration(content)); assertEquals("resources/image.png", extractor.extractIllustrationPathFrom(content)); }
@Test public void shouldNotFindPart() throws Exception { String content = "[chapter capitulo um]\n" + "introducao do capitulo um\n" + "[section secao um]\n" + "conteudo da secao um"; assertFalse(extractor.containsPartTag(content)); }
@Test public void shouldFindPart() throws Exception { String content = "[part \"parte um\" illustration=resources/image.png]\n" + "[chapter capitulo um]\n" + "introducao do capitulo um\n" + "[section secao um]\n" + "conteudo da secao um"; assertTrue(extractor.containsPartTag(content)); }