コード例 #1
0
 @Test
 public void test2Update() {
   try {
     org.junit.Assert.assertNotNull(map.get("RolesPrimaryKey"));
     Roles roles = rolesRepository.findById((java.lang.String) map.get("RolesPrimaryKey"));
     roles.setRoleDescription("mnyvDGwGmlcunCKEbr61EOaAJLnqvscy7gFNkusWbhkAwLcZxv");
     roles.setRoleHelp("jmLxassP4NCPfGLTeWHlp0m7qJvJY1rpLkiX1q1hc3FQ65FkMB");
     roles.setRoleIcon("1D3maXhPXnYY6tR9oXjMiG5s4U8sAE0OcWbkrhKgxraCfqcVOw");
     roles.setRoleName("Ff6EQT0H5naWYxlRnn9jZdtz03SIrxn9nLTkhdUuhyDkjFdAtl");
     roles.setVersionId(1);
     roles.setEntityAudit(1, "xyz", RECORD_TYPE.UPDATE);
     rolesRepository.update(roles);
   } 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());
   }
 }
コード例 #2
0
 @Test
 public void test3FindById() {
   try {
     org.junit.Assert.assertNotNull(map.get("RolesPrimaryKey"));
     rolesRepository.findById((java.lang.String) map.get("RolesPrimaryKey"));
   } catch (com.athena.framework.server.exception.repository.SpartanPersistenceException e) {
     org.junit.Assert.fail(e.getMessage());
   } catch (Exception e) {
     org.junit.Assert.fail(e.getMessage());
   }
 }
コード例 #3
0
 @Test
 public void test4Delete() {
   try {
     org.junit.Assert.assertNotNull(map.get("RolesPrimaryKey"));
     rolesRepository.delete(
         (java.lang.String) map.get("RolesPrimaryKey")); /* Deleting refrenced data */
     appmenusRepository.delete((java.lang.String) map.get("AppMenusPrimaryKey"));
   } catch (com.athena.framework.server.exception.repository.SpartanPersistenceException e) {
     org.junit.Assert.fail(e.getMessage());
   } catch (Exception e) {
     org.junit.Assert.fail(e.getMessage());
   }
 }
コード例 #4
0
 @Test
 public void test1Save() {
   try {
     Roles roles = new Roles();
     roles.setRoleDescription("xJve90mRmx40aZOEFQVZGBjxXS6EmVeNRb0JRVv43GB2FpzabG");
     roles.setRoleHelp("iCO03VJqt8etBLfWDiSr5o4RPUFlOAHrGJF7CmfQCBC5T5hiai");
     roles.setRoleIcon("k1F6wPu73ABw1B5KpP9yCaweBLv3ebnk5oce83yW27h1ASJJBt");
     roles.setRoleName("WU7Ifu0xggOx2rEEGKhEjNqexS4T9rQqEVSEHUJPxS7VFt44ZQ");
     java.util.List<RoleMenuBridge> listOfRoleMenuBridge =
         new java.util.ArrayList<RoleMenuBridge>();
     RoleMenuBridge rolemenubridge = new RoleMenuBridge();
     rolemenubridge.setIsExecute(true);
     rolemenubridge.setIsRead(true);
     rolemenubridge.setIsWrite(true);
     AppMenus appmenus = new AppMenus();
     appmenus.setAppId("C2wTjDWngc2XErBNBrrrpFWr6tMrvBoeEaDCjUvHptmTjQCmC9");
     appmenus.setAppType(2);
     appmenus.setAutoSave(true);
     appmenus.setMenuAccessRights(11);
     appmenus.setMenuAction("dU75QtYfEWyk94yfhQC0ZSalcquLuVSAGjHr50bID5kjcGCx1h");
     appmenus.setMenuCommands("qD9b64KJCdW61ZxB0fEKBikHzq5JDTdRq6ImgUT7ffD9zGqPAn");
     appmenus.setMenuDisplay(true);
     appmenus.setMenuHead(true);
     appmenus.setMenuIcon("H6OWN8P2fnDKlpEZvGPLHheCpQS4XY1vnsTgpfxMOmkNHhn5jm");
     appmenus.setMenuLabel("sq1OWxITiBq5z3JaPCWvkNEjXiP2sLZPQev0DGnUf9JeYHyS24");
     appmenus.setMenuTreeId("GrmuKlO5ZLt7bwhxRQvqyEGCQoaOwky89yALp8UdhmpsenSlLu");
     appmenus.setRefObjectId("HwLNzEPs0RJZmRmQ3NcfcmfG9tMxvqpa2Wt1sIO1FioB5Om4L7");
     appmenus.setUiType("kOy");
     AppMenus AppMenusTest = appmenusRepository.save(appmenus);
     map.put("AppMenusPrimaryKey", appmenus._getPrimarykey());
     rolemenubridge.setIsExecute(true);
     rolemenubridge.setIsRead(true);
     rolemenubridge.setIsWrite(true);
     rolemenubridge.setMenuId((java.lang.String) AppMenusTest._getPrimarykey());
     rolemenubridge.setRoles(roles);
     listOfRoleMenuBridge.add(rolemenubridge);
     roles.addAllRoleMenuBridge(listOfRoleMenuBridge);
     roles.setEntityAudit(1, "xyz", RECORD_TYPE.ADD);
     roles.setEntityValidator(entityValidator);
     roles.isValid();
     rolesRepository.save(roles);
     map.put("RolesPrimaryKey", roles._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());
   }
 }