DATAGRAPH-330 : Added missing @transactional annotations

This commit is contained in:
Nicki Watt
2013-07-11 23:32:35 +01:00
parent d8d08a1ff6
commit cba0037455

View File

@@ -145,13 +145,13 @@ public class GraphRepositoryTests {
assertThat(personRepository.exists(testTeam.michael.getId()), is(false));
}
@Test
@Test @Transactional
public void findAll() {
Iterable<Person> allPersons = personRepository.findAll();
assertThat(asCollection(allPersons), hasItems(testTeam.michael, testTeam.david, testTeam.emil));
}
@Test
@Test @Transactional
public void findAllSortedAscending() {
Sort sort = new Sort(Sort.Direction.ASC, "name");
Iterable<Person> allPersons = personRepository.findAll(sort);
@@ -172,14 +172,14 @@ public class GraphRepositoryTests {
assertEquals(asList(testTeam.david, testTeam.emil, testTeam.michael), asCollection(allPersons));
}
@Test
@Test @Transactional
public void findAllSortedDescending() {
Sort sort = new Sort(Sort.Direction.DESC, "name");
Iterable<Person> allPersons = personRepository.findAll(sort);
assertEquals(asList(testTeam.michael, testTeam.emil, testTeam.david), asCollection(allPersons));
}
@Test
@Test @Transactional
public void findAllPageableWithSortDescending() {
Sort sort = new Sort(Sort.Direction.DESC, "name");
PageRequest page1Request = new PageRequest(0, 1, sort);