@Test
 public void test1Save() {
   try {
     UserAccessLevel useraccesslevel = new UserAccessLevel();
     useraccesslevel.setLevelDescription("i6jjebjISpLQYCtYSbbOlPoQQgLrBYMHOvdLpGnKBXyeuRCgPo");
     useraccesslevel.setLevelHelp("wnjcToyMYu1Gr9fUq58GZhwKrVodRkmt1yJ3tksXhAr2bACoUB");
     useraccesslevel.setLevelIcon("qS71cCbXnxyLjDWV6nWVHcpG4YHjwsEfE4h6mfKqrm4wYYIWyU");
     useraccesslevel.setLevelName("vfBDQk3xBHHDq97uYxqMKH9mY2tATz8I9ZwCnmnFMs1wAUAPWv");
     useraccesslevel.setUserAccessLevel(valueGenerator.getRandomInteger(99999, 0));
     useraccesslevel.setEntityAudit(1, "xyz", RECORD_TYPE.ADD);
     useraccesslevel.setEntityValidator(entityValidator);
     useraccesslevel.isValid();
     useraccesslevelRepository.save(useraccesslevel);
     map.put("UserAccessLevelPrimaryKey", useraccesslevel._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());
   }
 }
Exemplo n.º 2
0
 @Test
 public void test1Save() {
   try {
     UserAccessDomain useraccessdomain = new UserAccessDomain();
     useraccessdomain.setDomainDescription("KBqyXqN9vA7jkwNfXBUIHufPNQBBcBYMl6k9CXXIpIEuduEDlS");
     useraccessdomain.setDomainHelp("XdjfsJIcPHhKmzt26Vm14mOWjP16ppJCgKaUWHwqH8Qv5dLRSG");
     useraccessdomain.setDomainIcon("8kZIOD4w8S5agSoosuDXON7hgj3dMbkzSGbZqNS7PhHBEwY36u");
     useraccessdomain.setDomainName("9wNkrrB4RSF6u4tNC489uPjg7UYAeviFnxqPPtFtqeFE18nEOH");
     useraccessdomain.setUserAccessDomain(valueGenerator.getRandomInteger(99999, 0));
     UserAccessDomain UserAccessDomainTest = useraccessdomainRepository.save(useraccessdomain);
     map.put("UserAccessDomainPrimaryKey", useraccessdomain._getPrimarykey());
     UserAccessLevel useraccesslevel = new UserAccessLevel();
     useraccesslevel.setLevelDescription("RO0kpPYvWvUBhtmXGQD30TegZCYpsyEXhJoOULObuvOnFhlsW3");
     useraccesslevel.setLevelHelp("y5lfxTmezxUVqVzE9DA5I5HhJBmoMlc8Y5k4qNXjEYUpD7TcJX");
     useraccesslevel.setLevelIcon("zkxo1gyVjR7J7QhgtekZhguk4FYIKrz5PNxTGgNqkLTkzbCn4C");
     useraccesslevel.setLevelName("qoc0AMfJpzrlmUL1se1PxT0kjlVPm9ZHq5joQBQqf4FOnIeMvh");
     useraccesslevel.setUserAccessLevel(valueGenerator.getRandomInteger(99999, 0));
     UserAccessLevel UserAccessLevelTest = useraccesslevelRepository.save(useraccesslevel);
     map.put("UserAccessLevelPrimaryKey", useraccesslevel._getPrimarykey());
     User user = new User();
     user.setAllowMultipleLogin(0);
     user.setChangePasswordNextLogin(1);
     user.setGenTempOneTimePassword(1);
     user.setIsDeleted(0);
     user.setIsLocked(1);
     user.setLastPasswordChangeDate(new java.sql.Timestamp(123456789));
     user.setMultiFactorAuthEnabled(0);
     user.setPasswordAlgo("DvVnyGY3mzlNf0iveyXKPah57bh8W1qwmc43hPEdwdo07ZJ0Sp");
     user.setPasswordExpiryDate(new java.sql.Timestamp(123456789));
     user.setSessionTimeout(895);
     user.setUserAccessCode(5);
     user.setUserAccessDomainId(
         (java.lang.String)
             UserAccessDomainTest._getPrimarykey()); /* ******Adding refrenced table data */
     user.setUserAccessLevelId((java.lang.String) UserAccessLevelTest._getPrimarykey());
     user.setEntityAudit(1, "xyz", RECORD_TYPE.ADD);
     user.setEntityValidator(entityValidator);
     user.isValid();
     userRepository.save(user);
     map.put("UserPrimaryKey", user._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());
   }
 }
 @Test
 public void test2Update() {
   try {
     org.junit.Assert.assertNotNull(map.get("UserAccessLevelPrimaryKey"));
     UserAccessLevel useraccesslevel =
         useraccesslevelRepository.findById(
             (java.lang.String) map.get("UserAccessLevelPrimaryKey"));
     useraccesslevel.setLevelDescription("x2CXcbAwM8NqLfOxo6Mc1IVX8EltlyJyeDghDWnRr5vEcTXGnx");
     useraccesslevel.setLevelHelp("3OB7cHCWbm9nyMbUAixIwKzn3y6o7QPO6mmVWDim6yRdsEtNrk");
     useraccesslevel.setLevelIcon("E3vWSOr0KasvkARV7PaxwVh26RkVWiP3VexPWPaPehvELlNFUF");
     useraccesslevel.setLevelName("mtYFosjFMAToYlnnfUBXyTFLZ7kvT1p1zSDQjvoz3Nx42DlinP");
     useraccesslevel.setUserAccessLevel(79269);
     useraccesslevel.setVersionId(1);
     useraccesslevel.setEntityAudit(1, "xyz", RECORD_TYPE.UPDATE);
     useraccesslevelRepository.update(useraccesslevel);
   } 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());
   }
 }