Package ma.glasnost.orika.test.common.types.TestCaseClasses

Examples of ma.glasnost.orika.test.common.types.TestCaseClasses.BookImpl


  }
 
  @Test
  @Concurrent(20)
  public void testGenerateMappers() {
    BookImpl book = new BookImpl("The Book Title", new AuthorImpl("The Author Name"));
    Library lib = new LibraryImpl("The Library", Arrays.<Book>asList(book));
   
    LibraryDTO mappedLib = mapper.map(lib, LibraryDTO.class);
   
    // Just to be sure things mapped as expected
    Assert.assertEquals(lib.getTitle(),mappedLib.getTitle());
    Assert.assertEquals(book.getTitle(),mappedLib.getBooks().get(0).getTitle());
    Assert.assertEquals(book.getAuthor().getName(),mappedLib.getBooks().get(0).getAuthor().getName());
 
  }
View Full Code Here


      List<Book> books = new ArrayList<Book>(4);
     
      Author author1 = new AuthorImpl("Author #1");
      Author author2 = new AuthorImpl("Author #2");
     
      books.add(new BookImpl("Book #1", author1));
      books.add(new BookImpl("Book #2", author1));
      books.add(new BookImpl("Book #3", author2));
      books.add(new BookImpl("Book #4", author2));
     
      Library library = new LibraryImpl("Library #1", books);
     
      MapperFactory factory = MappingUtil.getMapperFactory();
      MapperFacade mapper = factory.getMapperFacade();
View Full Code Here

      List<Book> books = new ArrayList<Book>(4);
     
      Author author1 = new AuthorImpl("Author #1");
      Author author2 = new AuthorImpl("Author #2");
     
      books.add(new BookImpl("Book #1", author1));
      books.add(new BookImpl("Book #2", author1));
      books.add(new BookImpl("Book #3", author2));
      books.add(new BookImpl("Book #4", author2));
     
      Library library = new LibraryImpl("Library #1", books);
     
      MapperFactory factory = MappingUtil.getMapperFactory();
      MapperFacade mapper = factory.getMapperFacade();
View Full Code Here

TOP

Related Classes of ma.glasnost.orika.test.common.types.TestCaseClasses.BookImpl

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.