@Test public void addJourneyToApplication() { service.createApplicationNamed(TEST_APP); service.addJourneyTo(TEST_APP, "j", 12, 14); Application found = new ApplicationDao().findByName(TEST_APP); assertTrue(found.getJourneys().iterator().hasNext()); }
@Test public void canAddJoruinesToApplication() { Application found = dao.findByName(TEST_APP); Journey j = new Journey("j", 12, 4); found.add(j); dao.update(found); Application updated = dao.findByName(TEST_APP); assertTrue(updated.getJourneys().iterator().hasNext()); }