@Test public void updateUniversityTest() { LOGGER.debug("updateUniversityTest()"); University university = universityService.get("htwkLeipzig"); Assert.assertNotNull(university); LOGGER.debug("change the lastname for updating {}", university.toString()); university.setStreet("doch nicht dahinten"); LOGGER.debug("the lastname is {}", university.getStreet()); Assert.assertEquals(true, universityService.updateUniversity(university)); }
@Test public void saveUniversityTest() { LOGGER.debug("saveUniversityTest"); University university = new University(); university.setUniversityId("htwkLeipzig"); university.setName("htwk Leipzig"); university.setStreet("dahinten"); university.setHousenumber("12"); university.setCity("Leipzig"); university.setCountry("Germany"); university.setPostcode("04277"); List<String> authorIds = new ArrayList<String>(); authorIds.add("author1"); authorIds.add("author2"); university.setAuthorIds(authorIds); LOGGER.debug("save the university"); Assert.assertEquals(true, universityService.save(university)); }
@Test public void saveUniversity2Test() { LOGGER.debug("saveUniversity2Test()"); University university = new University(); university.setUniversityId("UniDarmstadt"); university.setName("uni Darmstadt"); university.setStreet("andere"); university.setStreet2("Seite"); university.setHousenumber("23"); university.setCity("Darmstadt"); university.setCountry("Germany"); university.setPostcode("63364"); List<String> authorIds = new ArrayList<String>(); authorIds.add("author3"); authorIds.add("author2"); university.setAuthorIds(authorIds); LOGGER.debug("save the university"); Assert.assertEquals(true, universityService.save(university)); }