コード例 #1
0
 private void validateCommunicationGroup(
     EntityTestCriteria contraints, CommunicationGroup communicationgroup) throws Exception {
   if (contraints.getRuleType() == MIN_MAX) {
     communicationgroup.isValid();
   } else if (contraints.getRuleType() == NOT_NULL) {
     communicationgroup.isValid();
   } else if (contraints.getRuleType() == REGEX) {
     communicationgroup.isValid();
   } else if (contraints.getRuleType() == UNIQUE) {
     communicationgroupRepository.save(communicationgroup);
   }
 }
コード例 #2
0
 @Test
 public void test1Save() {
   try {
     CommunicationGroup communicationgroup = createCommunicationGroup(true);
     communicationgroup.setEntityAudit(1, "xyz", RECORD_TYPE.ADD);
     communicationgroup.isValid();
     communicationgroupRepository.save(communicationgroup);
     map.put("CommunicationGroupPrimaryKey", communicationgroup._getPrimarykey());
   } catch (java.lang.Exception e) {
     org.junit.Assert.fail(e.getMessage());
   }
 }