use of org.eclipse.mylyn.wikitext.parser.Attributes in project mylyn.docs by eclipse.
the class DocBookDocumentBuilderTest method testOrderedListUpperalphaType.
public void testOrderedListUpperalphaType() {
builder.beginDocument();
ListAttributes listAttributes = new ListAttributes();
listAttributes.setCssStyle("list-style-type: upper-alpha;");
builder.beginBlock(BlockType.NUMERIC_LIST, listAttributes);
builder.beginBlock(BlockType.LIST_ITEM, new Attributes());
builder.characters("item");
// LI
builder.endBlock();
// OL
builder.endBlock();
builder.endDocument();
String docbook = out.toString();
String expectedContent = "<orderedlist numeration=\"upperalpha\"><listitem><para>item</para></listitem></orderedlist>";
assertEquals(DOCBOOK_BEGIN_CHAPTER + expectedContent + DOCBOOK_END_CHAPTER, docbook);
}
use of org.eclipse.mylyn.wikitext.parser.Attributes in project mylyn.docs by eclipse.
the class DocBookDocumentBuilderTest method testOrderedListLowerromanType.
public void testOrderedListLowerromanType() {
builder.beginDocument();
ListAttributes listAttributes = new ListAttributes();
listAttributes.setCssStyle("list-style-type: lower-roman;");
builder.beginBlock(BlockType.NUMERIC_LIST, listAttributes);
builder.beginBlock(BlockType.LIST_ITEM, new Attributes());
builder.characters("item");
// LI
builder.endBlock();
// OL
builder.endBlock();
builder.endDocument();
String docbook = out.toString();
String expectedContent = "<orderedlist numeration=\"lowerroman\"><listitem><para>item</para></listitem></orderedlist>";
assertEquals(DOCBOOK_BEGIN_CHAPTER + expectedContent + DOCBOOK_END_CHAPTER, docbook);
}
use of org.eclipse.mylyn.wikitext.parser.Attributes in project mylyn.docs by eclipse.
the class EventDocumentBuilderTest method beginBlock.
@Test
public void beginBlock() {
builder.beginBlock(BlockType.PREFORMATTED, new Attributes());
assertEvents(new BeginBlockEvent(BlockType.PREFORMATTED, new Attributes()));
}
use of org.eclipse.mylyn.wikitext.parser.Attributes in project mylyn.docs by eclipse.
the class XslfoDocumentBuilderTest method testMark.
public void testMark() {
builder.beginDocument();
builder.characters("normal text ");
builder.beginSpan(SpanType.MARK, new Attributes());
builder.characters("marked text");
builder.endSpan();
builder.endDocument();
String generatedContent = out.toString();
String expectedContent = "normal text <inline font-style=\"italic\">marked text</inline>";
assertEquals(XSLFO_BEGIN + expectedContent + XSLFO_END, generatedContent);
}
use of org.eclipse.mylyn.wikitext.parser.Attributes in project mylyn.docs by eclipse.
the class LinkEventTest method equals.
@Test
public void equals() {
assertEquality(new LinkEvent(new Attributes(), "#name", "text"), new LinkEvent(new Attributes(), "#name", "text"));
assertInequality(new LinkEvent(new Attributes(), "#name", "text"), new LinkEvent(new Attributes(), "#name2", "text"));
assertInequality(new LinkEvent(new Attributes(), "#name", "text"), new LinkEvent(new Attributes(), "#name", "text2"));
}
Aggregations