Ejemplo n.º 1
0
  @Test
  public void testSetDemoCustomer() {
    EntityManager em = mytools.DBUtil.getEmFactory().createEntityManager();
    try {

      DemoOrder order = em.find(DemoOrder.class, (long) 1);
      DemoCustomer cust = em.find(DemoCustomer.class, (long) 7);
      cust.setCustomerId((long) 100);
      assertEquals(order.getDemoCustomer().getCustomerId(), cust.getCustomerId());

    } catch (Exception e) {
      fail(e.getMessage());
      fail("Not yet implemented");
    }
  }