コード例 #1
0
 @Test
 public void test1Save() {
   try {
     PasswordPolicy passwordpolicy = new PasswordPolicy();
     passwordpolicy.setAllowedSpecialLetters("zYyS5IzX5w1Xf42bwDlhCdQyMv4vWZXLkkWRNzzKZCqyHEwaEJ");
     passwordpolicy.setMaxPwdLength(13);
     passwordpolicy.setMinCapitalLetters(4);
     passwordpolicy.setMinNumericValues(6);
     passwordpolicy.setMinPwdLength(6);
     passwordpolicy.setMinSmallLetters(7);
     passwordpolicy.setMinSpecialLetters(0);
     passwordpolicy.setPolicyDescription("YtLY3ltCP6rzfG260dygDnGz5pqb15zSiYtt8vhTwHendmllaN");
     passwordpolicy.setPolicyName("l7ybvPQxa1FZ7SBDGQ6GGeTkaMkncbw2WPi603VHmCoVxDRy58");
     passwordpolicy.setEntityAudit(1, "xyz", RECORD_TYPE.ADD);
     passwordpolicy.setEntityValidator(entityValidator);
     passwordpolicy.isValid();
     passwordpolicyRepository.save(passwordpolicy);
     map.put("PasswordPolicyPrimaryKey", passwordpolicy._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("PasswordPolicyPrimaryKey"));
     PasswordPolicy passwordpolicy =
         passwordpolicyRepository.findById((java.lang.String) map.get("PasswordPolicyPrimaryKey"));
     passwordpolicy.setAllowedSpecialLetters("I1A2k0Gf8GXOox3Ay0bvI4BH1DNH0Y5MTgKxYTidqLi4If8c4R");
     passwordpolicy.setMaxPwdLength(28);
     passwordpolicy.setMinCapitalLetters(5);
     passwordpolicy.setMinNumericValues(0);
     passwordpolicy.setMinPwdLength(11);
     passwordpolicy.setMinSmallLetters(3);
     passwordpolicy.setMinSpecialLetters(6);
     passwordpolicy.setPolicyDescription("ZdZ3J9BWXcYDh2eOsfQX4GQhYkGaL9q9d8hk2icASR1K7hH9YF");
     passwordpolicy.setPolicyName("u6TFtDKmqJ8jTxLyDqmlw8v89IFagkL7d4UL9N0Wi4K8hRx95Y");
     passwordpolicy.setVersionId(1);
     passwordpolicy.setEntityAudit(1, "xyz", RECORD_TYPE.UPDATE);
     passwordpolicyRepository.update(passwordpolicy);
   } 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());
   }
 }