@Test public void test2Update() { try { org.junit.Assert.assertNotNull(map.get("CommunicationGroupPrimaryKey")); CommunicationGroup communicationgroup = communicationgroupRepository.findById( (java.lang.String) map.get("CommunicationGroupPrimaryKey")); communicationgroup.setCommGroupDescription( "RopDMomtOt6pH0Fi9y1QC7osVLlO4FiJnIWHiNbl32DodtMZdS"); communicationgroup.setVersionId(1); communicationgroup.setCommGroupName("6L856A7qEFkVlpq0b5GQnahRdO8H64nFMRRCFTCDHGw7eau8ud"); communicationgroup.setEntityAudit(1, "xyz", RECORD_TYPE.UPDATE); communicationgroupRepository.update(communicationgroup); } catch (java.lang.Exception e) { org.junit.Assert.fail(e.getMessage()); } }
@Test public void test6Delete() { try { org.junit.Assert.assertNotNull(map.get("CommunicationGroupPrimaryKey")); communicationgroupRepository.delete( (java.lang.String) map.get("CommunicationGroupPrimaryKey")); } catch (Exception e) { org.junit.Assert.fail(e.getMessage()); } }
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); } }
@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()); } }