Package org.eclipse.xtext.xdoc.xdoc

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


      _builder_1.append(ParserTestConstants.CHAPTER_HEAD, "");
      _builder_1.append(anchor, "");
      _builder_1.append(fill, "");
      _builder_1.append(ref, "");
      final XdocFile file = this._parseHelperExtensions.parse(_builder_1);
      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(4, _size);
      EList<EObject> _contents_2 = textOrMarkup.getContents();
View Full Code Here


 
  @Test
  public void testCode() {
    try {
      final XdocFile file = this._parseHelperExtensions.getDocFromFile((ParserTestConstants.TEST_FILE_DIR + "codeTest.xdoc"));
      AbstractSection _mainSection = file.getMainSection();
      final Document doc = ((Document) _mainSection);
      EList<Chapter> _chapters = doc.getChapters();
      Chapter _head = IterableExtensions.<Chapter>head(_chapters);
      final EList<TextOrMarkup> contents = _head.getContents();
      TextOrMarkup textOrMarkup = IterableExtensions.<TextOrMarkup>head(contents);
View Full Code Here

  @Test
  public void testCodeWithLanguage() {
    try {
      final XdocFile file = this._parseHelperExtensions.getDocFromFile(
        (ParserTestConstants.TEST_FILE_DIR + "codeWithLanguageTest.xdoc"));
      AbstractSection _mainSection = file.getMainSection();
      final Document abstractSection = ((Document) _mainSection);
      EList<Chapter> _chapters = abstractSection.getChapters();
      Chapter _get = _chapters.get(0);
      EList<TextOrMarkup> _contents = _get.getContents();
      final TextOrMarkup textOrMarkup = _contents.get(0);
View Full Code Here

 
  @Test
  public void testComment() {
    try {
      final XdocFile file = this._parseHelperExtensions.getDocFromFile((ParserTestConstants.TEST_FILE_DIR + "commentTest.xdoc"));
      AbstractSection _mainSection = file.getMainSection();
      EList<TextOrMarkup> _contents = _mainSection.getContents();
      int _size = _contents.size();
      Assert.assertEquals(1, _size);
    } catch (Throwable _e) {
      throw Exceptions.sneakyThrow(_e);
    }
View Full Code Here

  }
 
  @Test
  public void testLink() throws Exception {
    final XdocFile file = this._parseHelperExtensions.getDocFromFile((ParserTestConstants.TEST_FILE_DIR + "linkTest.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 Link link = ((Link) _head_1);
    String _url = link.getUrl();
View Full Code Here

  @Test
  public void testNamedReference() {
    try {
      final XdocFile file = this._parseHelperExtensions.getDocFromFile(
        (ParserTestConstants.TEST_FILE_DIR + "namedRefAndTextTest.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 Ref r = ((Ref) _head_1);
      AbstractSection _mainSection_1 = file.getMainSection();
      Identifiable _ref = r.getRef();
      Assert.assertEquals(_mainSection_1, _ref);
      EList<TextOrMarkup> _contents_2 = r.getContents();
      TextOrMarkup _head_2 = IterableExtensions.<TextOrMarkup>head(_contents_2);
      EList<EObject> _contents_3 = _head_2.getContents();
View Full Code Here

    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

 
  @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

 
  @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

 
  @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

TOP

Related Classes of org.eclipse.xtext.xdoc.xdoc.AbstractSection

Copyright © 2018 www.massapicom. 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.