Examples of AbstractSection


Examples of org.eclipse.xtext.xdoc.xdoc.AbstractSection

    assertEquals("some item", ((TextPart)itemContents.get(0).getContents().get(0)).getText());
  }

  public void testSimpleRef() throws Exception {
    XdocFile file = getDocFromFile(TEST_FILE_DIR + "simpleRefTest.xdoc");
    AbstractSection section = file.getMainSection();
    List<TextOrMarkup> contents = section.getContents();
    assertEquals(1, contents.size());
    TextOrMarkup textOrMarkup = contents.get(0);
    assertEquals(2, textOrMarkup.getContents().size());
    assertEquals("This is ", ((TextPart)textOrMarkup.getContents().get(0)).getText());
    assertEquals(section, ((Ref)textOrMarkup.getContents().get(1)).getRef());
View Full Code Here

Examples of org.eclipse.xtext.xdoc.xdoc.AbstractSection

 
  @Test
  public void testNestedList() {
    try {
      final XdocFile file = this._parseHelperExtensions.getDocFromFile((ParserTestConstants.TEST_FILE_DIR + "nestedListTest.xdoc"));
      AbstractSection _mainSection = file.getMainSection();
      EList<TextOrMarkup> _contents = _mainSection.getContents();
      TextOrMarkup _head = IterableExtensions.<TextOrMarkup>head(_contents);
      EList<EObject> _contents_1 = _head.getContents();
      EObject _head_1 = IterableExtensions.<EObject>head(_contents_1);
      final UnorderedList outer = ((UnorderedList) _head_1);
      EList<Item> items = outer.getItems();
View Full Code Here

Examples of org.eclipse.xtext.xdoc.xdoc.AbstractSection

 
  @Test
  public void testSimpleRef() {
    try {
      final XdocFile file = this._parseHelperExtensions.getDocFromFile((ParserTestConstants.TEST_FILE_DIR + "simpleRefTest.xdoc"));
      final AbstractSection section = file.getMainSection();
      final EList<TextOrMarkup> contents = section.getContents();
      int _size = contents.size();
      Assert.assertEquals(1, _size);
      final TextOrMarkup textOrMarkup = IterableExtensions.<TextOrMarkup>head(contents);
      EList<EObject> _contents = textOrMarkup.getContents();
      int _size_1 = _contents.size();
View Full Code Here

Examples of org.eclipse.xtext.xdoc.xdoc.AbstractSection

 
  @Test
  public void testEscape() {
    try {
      final XdocFile file = this._parseHelperExtensions.getDocFromFile((ParserTestConstants.TEST_FILE_DIR + "testEscape.xdoc"));
      AbstractSection _mainSection = file.getMainSection();
      EList<TextOrMarkup> _contents = _mainSection.getContents();
      final TextOrMarkup textOrMarkup = IterableExtensions.<TextOrMarkup>head(_contents);
      EList<EObject> _contents_1 = textOrMarkup.getContents();
      int _size = _contents_1.size();
      Assert.assertEquals(1, _size);
      EList<EObject> _contents_2 = textOrMarkup.getContents();
View Full Code Here

Examples of org.eclipse.xtext.xdoc.xdoc.AbstractSection

 
  @Test
  public void testUL() {
    try {
      final XdocFile file = this._parseHelperExtensions.getDocFromFile((ParserTestConstants.TEST_FILE_DIR + "ulTest.xdoc"));
      AbstractSection _mainSection = file.getMainSection();
      final Chapter chapter = ((Chapter) _mainSection);
      EList<TextOrMarkup> contents = chapter.getContents();
      int _size = contents.size();
      Assert.assertEquals(1, _size);
      TextOrMarkup textOrMarkup = IterableExtensions.<TextOrMarkup>head(contents);
View Full Code Here

Examples of org.eclipse.xtext.xdoc.xdoc.AbstractSection

 
  @Test
  public void testOL() {
    try {
      final XdocFile file = this._parseHelperExtensions.getDocFromFile((ParserTestConstants.TEST_FILE_DIR + "olTest.xdoc"));
      AbstractSection _mainSection = file.getMainSection();
      final Chapter chapter = ((Chapter) _mainSection);
      EList<TextOrMarkup> contents = chapter.getContents();
      int _size = contents.size();
      Assert.assertEquals(1, _size);
      TextOrMarkup textOrMarkup = IterableExtensions.<TextOrMarkup>head(contents);
View Full Code Here

Examples of org.eclipse.xtext.xdoc.xdoc.AbstractSection

      _builder.append("td[]");
      _builder.append(ParserTestConstants.CLOSE_BRACKET, "");
      _builder.append(ParserTestConstants.CLOSE_BRACKET, "");
      _builder.newLineIfNotEmpty();
      final XdocFile file = this._parseHelperExtensions.parse(_builder);
      AbstractSection _mainSection = file.getMainSection();
      final EList<TextOrMarkup> textOrMarkup = _mainSection.getContents();
      int _size = textOrMarkup.size();
      Assert.assertEquals(1, _size);
      TextOrMarkup _head = IterableExtensions.<TextOrMarkup>head(textOrMarkup);
      EList<EObject> _contents = _head.getContents();
      EObject _head_1 = IterableExtensions.<EObject>head(_contents);
View Full Code Here

Examples of org.eclipse.xtext.xdoc.xdoc.AbstractSection

      _builder.append("chapter[foo]");
      _builder.newLine();
      _builder.newLine();
      _builder.newLine();
      final XdocFile file = this._parseHelperExtensions.parse(_builder);
      AbstractSection _mainSection = file.getMainSection();
      final Document doc = ((Document) _mainSection);
      final EList<LangDef> defs = doc.getLangDefs();
      int _size = defs.size();
      Assert.assertEquals(1, _size);
      final LangDef def = IterableExtensions.<LangDef>head(defs);
View Full Code Here

Examples of org.eclipse.xtext.xdoc.xdoc.AbstractSection

 
  @Test
  public void testFullSectionHirarchy() {
    try {
      final XdocFile file = this._parseHelperExtensions.getDocFromFile((ParserTestConstants.TEST_FILE_DIR + "downToSection4Test.xdoc"));
      AbstractSection _mainSection = file.getMainSection();
      final Document doc = ((Document) _mainSection);
      TextOrMarkup _title = doc.getTitle();
      EList<EObject> _contents = _title.getContents();
      int _size = _contents.size();
      Assert.assertEquals(1, _size);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.