use of org.eclipse.mylyn.wikitext.parser.Attributes in project mylyn.docs by eclipse.
the class TextileDocumentBuilderTest method testParagraph_MultipleLineBreaksInParagraph.
public void testParagraph_MultipleLineBreaksInParagraph() {
builder.beginDocument();
builder.beginBlock(BlockType.PARAGRAPH, new Attributes());
builder.characters("text");
builder.lineBreak();
builder.lineBreak();
builder.characters("more text");
builder.endBlock();
builder.endDocument();
String markup = out.toString();
assertEquals("text\nmore text\n\n", markup);
}
use of org.eclipse.mylyn.wikitext.parser.Attributes in project mylyn.docs by eclipse.
the class TextileDocumentBuilderTest method testParagraphWithId.
public void testParagraphWithId() {
builder.beginDocument();
builder.beginBlock(BlockType.PARAGRAPH, new Attributes("123", null, null, null));
builder.characters("text\n\nmore text");
builder.endBlock();
builder.endDocument();
String markup = out.toString();
assertEquals("p(#123). text more text\n\n", markup);
}
use of org.eclipse.mylyn.wikitext.parser.Attributes in project mylyn.docs by eclipse.
the class TextileDocumentBuilderTest method testHeading1.
public void testHeading1() {
builder.beginDocument();
builder.beginHeading(1, new Attributes());
builder.characters("text\n\nmore text");
builder.endHeading();
builder.beginBlock(BlockType.PARAGRAPH, new Attributes());
builder.characters("text");
builder.endBlock();
builder.endDocument();
String markup = out.toString();
assertEquals("h1. text more text\n\ntext\n\n", markup);
}
use of org.eclipse.mylyn.wikitext.parser.Attributes in project mylyn.docs by eclipse.
the class TextileDocumentBuilderTest method testEmptySpan.
public void testEmptySpan() {
builder.beginDocument();
builder.characters("prefix ");
builder.beginSpan(SpanType.BOLD, new Attributes());
builder.endBlock();
builder.characters(" suffix");
builder.endBlock();
builder.endDocument();
String markup = out.toString();
assertEquals("prefix suffix\n\n", markup);
}
use of org.eclipse.mylyn.wikitext.parser.Attributes in project mylyn.docs by eclipse.
the class TextileDocumentBuilderTest method doHeadingAttributesTest.
private String doHeadingAttributesTest() {
builder.beginDocument();
Attributes headingAttributes = new Attributes();
headingAttributes.setCssClass("classTest");
headingAttributes.setId("idTest");
builder.beginHeading(1, headingAttributes);
builder.characters("text\n\nmore text");
builder.endHeading();
builder.endDocument();
String markup = out.toString();
return markup;
}
Aggregations