Package ch.inftec.ju.testing.db.data.entity

Examples of ch.inftec.ju.testing.db.data.entity.Player


    q2.setParameter(2, "Team1");
    Assert.assertEquals(1, q2.getResultList().size());
  }
 
  public void objectCopiesAndMerge() {
    Player somePlayer = new Player();
    Assert.assertFalse(this.em.contains(somePlayer));
   
    Player allstar = this.getAllStar(this.em);
    Assert.assertTrue(this.em.contains(allstar));
  }
View Full Code Here


   * Tests if the JPA entities (Team, Player) have been created correctly.
   */
  @Test
  public final void testEntities() {   
    Query q = em.createQuery("select p from Player p where p.firstName='All' and p.lastName='Star'");
    Player allstar = (Player)q.getSingleResult();   
   
    Assert.assertEquals("AllStar", allstar.getFirstName() + allstar.getLastName());
    Assert.assertEquals(2, allstar.getTeams().size());
    Assert.assertEquals(3, allstar.getTeams().iterator().next().getPlayers().size());
  }
View Full Code Here

TOP

Related Classes of ch.inftec.ju.testing.db.data.entity.Player

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.