コード例 #1
0
 @Test
 public void test2Update() {
   try {
     org.junit.Assert.assertNotNull(map.get("StatePrimaryKey"));
     State state = stateRepository.findById((java.lang.String) map.get("StatePrimaryKey"));
     state.setStateCapital("6r371mXo4DMFNpgYYfpUpXqxiXcWGY3CySCbw23tO5mfXLETbP");
     state.setStateCapitalLatitude(4);
     state.setStateCapitalLongitude(4);
     state.setStateCode(2);
     state.setStateCodeChar2("r2lmD8vFxVBHJ31UAtZX6gVApNf8VOfU");
     state.setStateCodeChar3("9nqIydnckHVzHYdH8j0t7PeaIxXC907m");
     state.setStateDescription("XBTmDzTUjFixM1K2T1orGdeW0uNYWESe6UwlvoQaWTYE33h6M9");
     state.setStateFlag("f72zlUly5TrWHCyBUu9FNS4d2ubFOU042sxLJGJVQ5Rl9BpAH6");
     state.setStateName("Qvqe2LjHKhn5XTTB3fXQ4U4Xm2RdeKZz4xIYKkLbIqh7dA1DwR");
     state.setVersionId(1);
     state.setEntityAudit(1, "xyz", RECORD_TYPE.UPDATE);
     stateRepository.update(state);
   } 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 test1Save() {
   try {
     Country country = new Country();
     country.setCapital("rJTxJk2BJx7VGHOnpFU6A9yOc3fCgaw9");
     country.setCapitalLatitude(11);
     country.setCapitalLongitude(8);
     country.setCountryCode1("WnH");
     country.setCountryCode2("Ato");
     country.setCountryFlag("veFWgO6qz7elsSLx2T5kjuCHBtU46zJZ3m4RMYjy1vVGHDrps3");
     country.setCountryName("xEzBBYkQjwbMgeJA6BwSRzzLzUoXiU4tQvlqg4atSR0SWMFeIo");
     country.setCurrencyCode("xOB");
     country.setCurrencyName("IemWkJBUoPh2MaBCrXstklXG0NUxSKrPdzV8KwU6dTlp031zXM");
     country.setCurrencySymbol("263dEjCOnDwyAVchNVkWa4E4y0RvnojC");
     country.setIsoNumeric(2);
     Country CountryTest = countryRepository.save(country);
     map.put("CountryPrimaryKey", country._getPrimarykey());
     State state = new State();
     state.setCountryId((java.lang.String) CountryTest._getPrimarykey());
     state.setStateCapital("9hOlpqUiJbaGLHiGJ9flM2iChpFOhK6723l46cBVHWMFZ0Og0T");
     state.setStateCapitalLatitude(4);
     state.setStateCapitalLongitude(6);
     state.setStateCode(0);
     state.setStateCodeChar2("sZkzZypcJwGo9K3uId694v9o7L3SZg9J");
     state.setStateCodeChar3("3vfcuvx7NZlnAMVPHFL8dFs96KxeHZ55");
     state.setStateDescription("M5NLUSN0K0qoDvJKnBQsC4IhnX3RqixhkDLc7NPhzkN9yo0hs8");
     state.setStateFlag("WMPJ8ImKbs8U9zVIZaRtkQ1ICjwKhxEyPhWArLysdFzpMW4gdT");
     state.setStateName("5ZgOfNJrMyJQcFbNVCWk35TJRU0aPnp5EdcTsCxQHSDmuDy9TE");
     state.setEntityAudit(1, "xyz", RECORD_TYPE.ADD);
     state.setEntityValidator(entityValidator);
     state.isValid();
     stateRepository.save(state);
     map.put("StatePrimaryKey", state._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());
   }
 }