Skip to content
Browse files

Fixed unit test

  • Loading branch information...
1 parent 7b40851 commit 12ffda3943997d92ac48e8a1f53b634733b6a047 @pkainulainen committed Apr 27, 2012
View
5 ...rc/test/java/net/petrikainulainen/spring/datajpa/service/RepositoryPersonServiceTest.java
@@ -1,5 +1,6 @@
package net.petrikainulainen.spring.datajpa.service;
+import com.mysema.query.types.Predicate;
import com.mysema.query.types.expr.BooleanExpression;
import net.petrikainulainen.spring.datajpa.dto.PersonDTO;
import net.petrikainulainen.spring.datajpa.model.Person;
@@ -110,11 +111,11 @@ public void findById() {
@Test
public void search() {
List<Person> expected = new ArrayList<Person>();
- when(personRepositoryMock.findAll(any(BooleanExpression.class))).thenReturn(expected);
+ when(personRepositoryMock.findAll(any(Predicate.class))).thenReturn(expected);
List<Person> actual = personService.search(SEARCH_TERM);
- verify(personRepositoryMock, times(1)).findAll(any(BooleanExpression.class));
+ verify(personRepositoryMock, times(1)).findAll(any(Predicate.class));
verifyNoMoreInteractions(personRepositoryMock);
assertEquals(expected, actual);

0 comments on commit 12ffda3

Please sign in to comment.
Something went wrong with that request. Please try again.