Package org.apache.torque.test.bean

Examples of org.apache.torque.test.bean.BookBean


        // check one roundtrip from author
        assertTrue("author from book should be the same object as author",
                author == book.getAuthor());

        AuthorBean authorBean = author.getBean();
        BookBean bookBean = (BookBean) authorBean.getBookBeans().get(0);
        assertTrue("authorBean from BookBean should be the same "
                + "object as authorBean",
                bookBean.getAuthorBean() == authorBean);

        author = Author.createAuthor(authorBean);
        book = (Book) author.getBooks().get(0);

        assertTrue("author from book should be the same object as author "
                + "after creating from bean",
                author == book.getAuthor());

        // check one roundtrip from book
        assertTrue("book from author should be the same object as book",
                book == author.getBooks().get(0));

        bookBean = book.getBean();
        authorBean = bookBean.getAuthorBean();
        assertTrue("bookBean from authorBean should be the same "
                + "object as bookBean",
                authorBean.getBookBeans().get(0) == bookBean);

        book = Book.createBook(bookBean);
View Full Code Here


        // check one roundtrip from author
        assertTrue("author from book should not be the same object as author",
                author != book.getAuthor());

        AuthorBean authorBean = author.getBean();
        BookBean bookBean = (BookBean) authorBean.getBookBeans().get(0);
        assertTrue("authorBean from BookBean should not be the same "
                + "object as authorBean",
                bookBean.getAuthorBean() != authorBean);

        author = Author.createAuthor(authorBean);
        book = (Book) author.getBooks().get(0);

        assertTrue("author from book should not be the same object as author "
                + "after creating from bean",
                author != book.getAuthor());

        // check one roundtrip from book
        assertTrue("book from differentAuthor should not be "
                + "the same object as book",
                book != differentAuthor.getBooks().get(0));

        bookBean = book.getBean();
        AuthorBean differentAuthorBean = bookBean.getAuthorBean();
        assertTrue("bookBean from differentAuthorBean should not be the same "
                + "object as bookBean",
                differentAuthorBean.getBookBeans().get(0) != bookBean);

        book = Book.createBook(bookBean);
View Full Code Here

        assertEquals("name from read Author is " + readAuthor.getName()
                +" but should be " + authorBean.getName(),
                readAuthor.getName(),
                authorBean.getName());

        BookBean bookBean = new BookBean();
        bookBean.setTitle(BOOK_1_TITLE);
        bookBean.setIsbn(BOOK_1_ISBN);

        Book book = Book.createBook(bookBean);
        assertTrue("isModified() should return true after creation of object "
                + " from new bean",
                book.isModified());
View Full Code Here

        // check one roundtrip from author
        assertTrue("author from book should be the same object as author",
                author == book.getAuthor());
       
        AuthorBean authorBean = author.getBean();
        BookBean bookBean = (BookBean) authorBean.getBookBeans().get(0);
        assertTrue("authorBean from BookBean should be the same "
                + "object as authorBean",
                bookBean.getAuthorBean() == authorBean);
       
        author = Author.createAuthor(authorBean);
        book = (Book) author.getBooks().get(0);
       
        assertTrue("author from book should be the same object as author "
                + "after creating from bean",
                author == book.getAuthor());
       
        // check one roundtrip from book
        assertTrue("book from author should be the same object as book",
                book == author.getBooks().get(0));

        bookBean = book.getBean();
        authorBean = bookBean.getAuthorBean();
        assertTrue("bookBean from authorBean should be the same "
                + "object as bookBean",
                authorBean.getBookBeans().get(0) == bookBean);

        book = Book.createBook(bookBean);
View Full Code Here

        // check one roundtrip from author
        assertTrue("author from book should not be the same object as author",
                author != book.getAuthor());

        AuthorBean authorBean = author.getBean();
        BookBean bookBean = (BookBean) authorBean.getBookBeans().get(0);
        assertTrue("authorBean from BookBean should not be the same "
                + "object as authorBean",
                bookBean.getAuthorBean() != authorBean);

        author = Author.createAuthor(authorBean);
        book = (Book) author.getBooks().get(0);

        assertTrue("author from book should not be the same object as author "
                + "after creating from bean",
                author != book.getAuthor());

        // check one roundtrip from book
        assertTrue("book from differentAuthor should not be "
                + "the same object as book",
                book != differentAuthor.getBooks().get(0));

        bookBean = book.getBean();
        AuthorBean differentAuthorBean = bookBean.getAuthorBean();
        assertTrue("bookBean from differentAuthorBean should not be the same "
                + "object as bookBean",
                differentAuthorBean.getBookBeans().get(0) != bookBean);

        book = Book.createBook(bookBean);
View Full Code Here

        assertEquals("name from read Author is " + readAuthor.getName()
                +" but should be " + authorBean.getName(),
                readAuthor.getName(),
                authorBean.getName());
       
        BookBean bookBean = new BookBean();
        bookBean.setTitle(BOOK_1_TITLE);
        bookBean.setIsbn(BOOK_1_ISBN);
       
        Book book = Book.createBook(bookBean);
        assertTrue("isModified() should return true after creation of object "
                + " from new bean",
                book.isModified());
View Full Code Here

        assertEquals("name from read Author is " + readAuthor.getName()
                +" but should be " + authorBean.getName(),
                readAuthor.getName(),
                authorBean.getName());

        BookBean bookBean = new BookBean();
        bookBean.setTitle(BOOK_1_TITLE);
        bookBean.setIsbn(BOOK_1_ISBN);

        Book book = Book.createBook(bookBean);
        assertTrue("isModified() should return true after creation of object "
                + " from new bean",
                book.isModified());
View Full Code Here

        // check one roundtrip from author
        assertTrue("author from book should be the same object as author",
                author == book.getAuthor());

        AuthorBean authorBean = author.getBean();
        BookBean bookBean = authorBean.getBookBeans().get(0);
        assertTrue("authorBean from BookBean should be the same "
                + "object as authorBean",
                bookBean.getAuthorBean() == authorBean);

        author = Author.createAuthor(authorBean);
        book = author.getBooks().get(0);

        assertTrue("author from book should be the same object as author "
                + "after creating from bean",
                author == book.getAuthor());

        // check one roundtrip from book
        assertTrue("book from author should be the same object as book",
                book == author.getBooks().get(0));

        bookBean = book.getBean();
        authorBean = bookBean.getAuthorBean();
        assertTrue("bookBean from authorBean should be the same "
                + "object as bookBean",
                authorBean.getBookBeans().get(0) == bookBean);

        book = Book.createBook(bookBean);
View Full Code Here

        // check one roundtrip from author
        assertTrue("author from book should not be the same object as author",
                author != book.getAuthor());

        AuthorBean authorBean = author.getBean();
        BookBean bookBean = authorBean.getBookBeans().get(0);
        assertTrue("authorBean from BookBean should not be the same "
                + "object as authorBean",
                bookBean.getAuthorBean() != authorBean);

        author = Author.createAuthor(authorBean);
        book = author.getBooks().get(0);

        assertTrue("author from book should not be the same object as author "
                + "after creating from bean",
                author != book.getAuthor());

        // check one roundtrip from book
        assertTrue("book from differentAuthor should not be "
                + "the same object as book",
                book != differentAuthor.getBooks().get(0));

        bookBean = book.getBean();
        AuthorBean differentAuthorBean = bookBean.getAuthorBean();
        assertTrue("bookBean from differentAuthorBean should not be the same "
                + "object as bookBean",
                differentAuthorBean.getBookBeans().get(0) != bookBean);

        book = Book.createBook(bookBean);
View Full Code Here

TOP

Related Classes of org.apache.torque.test.bean.BookBean

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.