Package com.hascode.tutorial.xbeam.projection

Examples of com.hascode.tutorial.xbeam.projection.Books$Book$Author


    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        Book b = new Book("Lolity", "james callog", 1998);
        ExtBook eb = new ExtBook("title", "author", 1020, "publisher");
    }
View Full Code Here


import com.hascode.tutorial.xbeam.projection.Books;

public class SimpleXmlFileParsingExample {
  public static void main(final String[] args) throws IOException {
    Books bookProjection = new XBProjector().io().fromURLAnnotation(Books.class);
    bookProjection.getBooks().forEach(book -> {
      System.out.println("book -> title: " + book.getTitle() + " and authors: ");
      System.out.println(book.getAuthors().stream().map(a -> {
        return a.getFirstname() + " " + a.getLastname();
      }).collect(Collectors.joining(", ")));
    });
View Full Code Here

  public static void main() {
    List<Update> lu = new ArrayList<Update>();
    String text = "";
    final Update.Builder ub = new Update.Builder();
    final Author a = new Author("Tallulah");

    for (int i = 0; i < 256; i++) {
      text = text + "X";
      long now = System.currentTimeMillis();
      lu.add(ub.author(a).updateText(text).createTime(now).build());
View Full Code Here

   * @throws Exception
   */
  @Test
  public void viewBook() throws Exception
  {
    Book mockBook = new Book("xxId", "xxName");
    Page page = new ViewBook(mockBook);
    tester.startPage(page);

    // assertion
    tester.assertRenderedPage(ViewBook.class);
View Full Code Here

  @Test
  public void bookmarkableLink() throws Exception
  {
    // for WebPage without default constructor, I define a TestPageSource to
    // let the page be instatiated lately.
    Book mockBook = new Book("xxId", "xxName");
    tester.startPage(new ViewBook(mockBook));

    // assertion
    tester.assertRenderedPage(ViewBook.class);
    tester.clickLink("link");
View Full Code Here

   * @throws Exception
   */
  @Test
  public void pageConstructor() throws Exception
  {
    Book mockBook = new Book("xxId", "xxName");
    Page page = new ViewBook(mockBook);
    tester.startPage(page);

    // assertion
    tester.assertRenderedPage(ViewBook.class);
View Full Code Here

   * @throws Exception
   */
  @Test
  public void viewBook() throws Exception
  {
    Book mockBook = new Book("xxId", "xxName");
    Page page = new ViewBook(mockBook);
    tester.startPage(page);

    // assertion
    tester.assertRenderedPage(ViewBook.class);
View Full Code Here

  @Test
  public void bookmarkableLink() throws Exception
  {
    // for WebPage without default constructor, I define a TestPageSource to
    // let the page be instatiated lately.
    Book mockBook = new Book("xxId", "xxName");
    tester.startPage(new ViewBook(mockBook));

    // assertion
    tester.assertRenderedPage(ViewBook.class);
    tester.clickLink("link");
View Full Code Here

   * @throws Exception
   */
  @Test
  public void pageConstructor() throws Exception
  {
    Book mockBook = new Book("xxId", "xxName");
    Page page = new ViewBook(mockBook);
    tester.startPage(page);

    // assertion
    tester.assertRenderedPage(ViewBook.class);
View Full Code Here

   * @throws Exception
   */
  @Test
  public void viewBook() throws Exception
  {
    Book mockBook = new Book("xxId", "xxName");
    Page page = new ViewBook(mockBook);
    tester.startPage(page);

    // assertion
    tester.assertRenderedPage(ViewBook.class);
View Full Code Here

TOP

Related Classes of com.hascode.tutorial.xbeam.projection.Books$Book$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.