Examples of XdocFile


Examples of org.eclipse.xtext.xdoc.xdoc.XdocFile

  @Test
  public void testsmallestDoc() {
    try {
      StringConcatenation _builder = new StringConcatenation();
      _builder.append("chapter[foo bar]");
      XdocFile _parse = this._parseHelperExtensions.parse(_builder);
      this._validationTestHelper.assertNoErrors(_parse);
      StringConcatenation _builder_1 = new StringConcatenation();
      _builder_1.append("section[foo]");
      _builder_1.newLine();
      _builder_1.newLine();
      _builder_1.append("bar");
      _builder_1.newLine();
      XdocFile _parse_1 = this._parseHelperExtensions.parse(_builder_1);
      this._validationTestHelper.assertNoErrors(_parse_1);
      StringConcatenation _builder_2 = new StringConcatenation();
      _builder_2.append("section2[foo]");
      _builder_2.newLine();
      _builder_2.newLine();
      _builder_2.append("bar");
      _builder_2.newLine();
      XdocFile _parse_2 = this._parseHelperExtensions.parse(_builder_2);
      this._validationTestHelper.assertNoErrors(_parse_2);
    } catch (Throwable _e) {
      throw Exceptions.sneakyThrow(_e);
    }
  }
View Full Code Here

Examples of org.eclipse.xtext.xdoc.xdoc.XdocFile

      StringConcatenation _builder_1 = new StringConcatenation();
      _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);
View Full Code Here

Examples of org.eclipse.xtext.xdoc.xdoc.XdocFile

  }
 
  @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

Examples of org.eclipse.xtext.xdoc.xdoc.XdocFile

  }
 
  @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

Examples of org.eclipse.xtext.xdoc.xdoc.XdocFile

  }
 
  @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

Examples of org.eclipse.xtext.xdoc.xdoc.XdocFile

    }
  }
 
  @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);
View Full Code Here

Examples of org.eclipse.xtext.xdoc.xdoc.XdocFile

  }
 
  @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

Examples of org.eclipse.xtext.xdoc.xdoc.XdocFile

  }
 
  @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);
View Full Code Here

Examples of org.eclipse.xtext.xdoc.xdoc.XdocFile

  }
 
  @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();
View Full Code Here

Examples of org.eclipse.xtext.xdoc.xdoc.XdocFile

  }
 
  @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);
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.