コード例 #1
0
 @Test
 public void test1Save() {
   try {
     AppCustomerType appcustomertype = new AppCustomerType();
     appcustomertype.setCustomerType("9V0MKayjd0dt3aqUVjHB46Xo1SEPa4DwbO3hSgCNpOA41TlMLH");
     appcustomertype.setDefaults(0);
     appcustomertype.setSequenceId(2147483647);
     appcustomertype.setEntityAudit(1, "xyz", RECORD_TYPE.ADD);
     appcustomertype.setEntityValidator(entityValidator);
     appcustomertype.isValid();
     appcustomertypeRepository.save(appcustomertype);
     map.put("AppCustomerTypePrimaryKey", appcustomertype._getPrimarykey());
   } catch (com.athena.framework.server.exception.biz.SpartanConstraintViolationException e) {
     org.junit.Assert.fail(e.getMessage());
   } catch (java.lang.Exception e) {
     org.junit.Assert.fail(e.getMessage());
   }
 }
コード例 #2
0
 @Test
 public void test2Update() {
   try {
     org.junit.Assert.assertNotNull(map.get("AppCustomerTypePrimaryKey"));
     AppCustomerType appcustomertype =
         appcustomertypeRepository.findById(
             (java.lang.String) map.get("AppCustomerTypePrimaryKey"));
     appcustomertype.setCustomerType("cOdy2xq8U8cRaewwIF3vaGBC5qnl5MgNJCma4FHV375LQabjY7");
     appcustomertype.setDefaults(1);
     appcustomertype.setSequenceId(2147483647);
     appcustomertype.setVersionId(1);
     appcustomertype.setEntityAudit(1, "xyz", RECORD_TYPE.UPDATE);
     appcustomertypeRepository.update(appcustomertype);
   } catch (com.athena.framework.server.exception.repository.SpartanPersistenceException e) {
     org.junit.Assert.fail(e.getMessage());
   } catch (java.lang.Exception e) {
     org.junit.Assert.fail(e.getMessage());
   }
 }