Package org.asciidoctor.ast

Examples of org.asciidoctor.ast.Author


  @Test
  public void author_info_should_be_bound_into_author_class() {
   
    DocumentHeader header = asciidoctor.readDocumentHeader(new File("target/test-classes/documentheaders.asciidoc"));
   
    Author author = header.getAuthor();
    assertThat(author.getEmail(), is("doc.writer@asciidoc.org"));
    assertThat(author.getFullName(), is("Doc Writer"));
    assertThat(author.getFirstName(), is("Doc"));
    assertThat(author.getLastName(), is("Writer"));
    assertThat(author.getInitials(), is("DW"));
   
  }
View Full Code Here


    DocumentHeader header = asciidoctor.readDocumentHeader(new File("target/test-classes/documentheaders.asciidoc"));
   
    List<Author> authors = header.getAuthors();
    assertThat(authors, hasSize(2));
   
    Author author1 = authors.get(0);
   
    assertThat(author1.getEmail(), is("doc.writer@asciidoc.org"));
    assertThat(author1.getFullName(), is("Doc Writer"));
    assertThat(author1.getFirstName(), is("Doc"));
    assertThat(author1.getLastName(), is("Writer"));
    assertThat(author1.getInitials(), is("DW"));
   
    Author author2 = authors.get(1);
   
    assertThat(author2.getEmail(), is("john.smith@asciidoc.org"));
    assertThat(author2.getFullName(), is("John Smith"));
    assertThat(author2.getFirstName(), is("John"));
    assertThat(author2.getLastName(), is("Smith"));
    assertThat(author2.getInitials(), is("JS"));
   
  }
View Full Code Here

TOP

Related Classes of org.asciidoctor.ast.Author

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.