Ejemplo n.º 1
0
  public void testInsertFail() throws Exception {
    CRFBean cb = new CRFBean();
    cb.setName("test CRF -- please delete");
    cb.setStatus(Status.AVAILABLE);
    cb.setDescription("test CRF -- please delete");
    cb.setOwner(new UserAccountBean());
    CRFBean cbc = (CRFBean) cdao.create(cb);
    assertNotNull("test insert", cbc);

    assertEquals("check primarykey", cb.getId(), 0);
  }
Ejemplo n.º 2
0
 // testInsert
 public void testInsertSuccess() throws Exception {
   CRFBean cb = new CRFBean();
   cb.setName("test CRF -- please delete");
   cb.setStatus(Status.AVAILABLE);
   cb.setDescription("test CRF -- please delete");
   UserAccountBean ub = new UserAccountBean();
   ub.setId(1);
   cb.setOwner(ub);
   CRFBean cbc = (CRFBean) cdao.create(cb);
   assertNotNull("test insert", cbc);
 }