Пример #1
0
  @Test
  public void testBasicCreation() {
    AnnotationType cvt = new AnnotationType(testName);
    EntityTransaction tns = em.getTransaction();
    tns.begin();
    dao.create(cvt);
    tns.commit();

    assertNotNull("Persisted cv-term has a null ID!", cvt.getId());

    CVTerm cvtDB = dao.find(testName);

    assertNotNull("Cannot find persisted cvterm!", cvtDB);
    assertEquals("Bad name for retrieved cvterm!", testName, cvtDB.getName());
  }