minor fix

This commit is contained in:
DOHA 2016-10-13 00:14:52 +02:00
parent 96bd33715a
commit d2ede5b6ce
2 changed files with 5 additions and 5 deletions

View File

@ -98,7 +98,7 @@ public class JPACriteriaQueryTest {
@Test
public void givenPartialFirst_whenGettingListOfUsers_thenCorrect() {
final List<SearchCriteria> params = new ArrayList<SearchCriteria>();
params.add(new SearchCriteria("firstName", ":", "jo"));
params.add(new SearchCriteria("firstName", ":", "Jo"));
final List<User> results = userApi.searchUser(params);

View File

@ -54,8 +54,8 @@ public class JPASpecificationTest {
@Test
public void givenFirstAndLastName_whenGettingListOfUsers_thenCorrect() {
final UserSpecification spec = new UserSpecification(new SpecSearchCriteria("firstName", SearchOperation.EQUALITY, "john"));
final UserSpecification spec1 = new UserSpecification(new SpecSearchCriteria("lastName", SearchOperation.EQUALITY, "doe"));
final UserSpecification spec = new UserSpecification(new SpecSearchCriteria("firstName", SearchOperation.EQUALITY, "John"));
final UserSpecification spec1 = new UserSpecification(new SpecSearchCriteria("lastName", SearchOperation.EQUALITY, "Doe"));
final List<User> results = repository.findAll(Specifications.where(spec).and(spec1));
assertThat(userJohn, isIn(results));
@ -64,7 +64,7 @@ public class JPASpecificationTest {
@Test
public void givenFirstNameInverse_whenGettingListOfUsers_thenCorrect() {
final UserSpecification spec = new UserSpecification(new SpecSearchCriteria("firstName", SearchOperation.NEGATION, "john"));
final UserSpecification spec = new UserSpecification(new SpecSearchCriteria("firstName", SearchOperation.NEGATION, "John"));
final List<User> results = repository.findAll(Specifications.where(spec));
assertThat(userTom, isIn(results));
@ -82,7 +82,7 @@ public class JPASpecificationTest {
@Test
public void givenFirstNamePrefix_whenGettingListOfUsers_thenCorrect() {
final UserSpecification spec = new UserSpecification(new SpecSearchCriteria("firstName", SearchOperation.STARTS_WITH, "jo"));
final UserSpecification spec = new UserSpecification(new SpecSearchCriteria("firstName", SearchOperation.STARTS_WITH, "Jo"));
final List<User> results = repository.findAll(spec);
assertThat(userJohn, isIn(results));