@Test public void testFindByName() throws Exception { List<SystemProperty> properties = recreateProperties(); assertEquals(repository.findByName(START_DOC), properties.get(0)); assertEquals(repository.findByName(DEFAULT_LANGUAGE_ID), properties.get(1)); }
List<SystemProperty> recreateProperties() { repository.deleteAll(); SystemProperty p1 = new SystemProperty(1, START_DOC, "1001"); SystemProperty p2 = new SystemProperty(8, DEFAULT_LANGUAGE_ID, "1"); return Arrays.asList(repository.saveAndFlush(p1), repository.saveAndFlush(p2)); }
@Test public void testFindAll() throws Exception { List<SystemProperty> properties = recreateProperties(); assertEquals(2, repository.findAll().size()); }