Skip to content

Commit

Permalink
centered paragraph is a p with class center.
Browse files Browse the repository at this point in the history
  • Loading branch information
ceci committed Jun 6, 2011
1 parent ada593f commit 3ac273c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 21 deletions.
Expand Up @@ -8,6 +8,6 @@ public class CenteredParagraphTagTest {
public void testCenteredParagraphTest() {
CenteredParagraphTag tag = new CenteredParagraphTag();
String result = tag.parse("texto centralizado", null);
Assert.assertEquals("<div style=\"text-align:center\">texto centralizado</div>", result);
Assert.assertEquals("<p class=\"center\">texto centralizado</p>", result);
}
}
Expand Up @@ -133,37 +133,25 @@ public void testGeneratorWithDoubledImage() throws TubainaException, IOException
Book b = builder.build();
try {
generator.generate(b, temp);
} catch (TubainaException t) {
Assert.fail("Should not raise an exception");
} catch (TubainaException e) {
Assert.fail("Should not complain if one uses twice the same image");
}
// OK
}

@Test
@Test(expected=TubainaException.class)
public void testGeneratorWithUnexistantImage() throws TubainaException, IOException {
BookBuilder builder = new BookBuilder("Com imagens");
builder.add(new StringReader("[chapter qualquer um]\n" + "[img src/test/resources/someImage.gif]"));
try {
Book b = builder.build();
generator.generate(b, temp);
Assert.fail("Should raise an exception");
} catch (TubainaException t) {
// OK
}
Book b = builder.build();
generator.generate(b, temp);
}

@Test
@Test(expected=TubainaException.class)
public void testGeneratorWithDuppedChapterName() throws TubainaException, IOException {
BookBuilder builder = new BookBuilder("teste");
builder.add(new StringReader("[chapter qualquer um]\n" + "alguma coisa\n[chapter qualquer um]outra coisa"));
try {
Book b = builder.build();
generator.generate(b, temp);
Assert.fail("Should raise an exception");
} catch (TubainaException t) {
System.out.println(t.getMessage());
// OK
}
Book b = builder.build();
generator.generate(b, temp);
}

@Test
Expand Down

0 comments on commit 3ac273c

Please sign in to comment.