minor fix
This commit is contained in:
parent
96bd33715a
commit
d2ede5b6ce
|
@ -98,7 +98,7 @@ public class JPACriteriaQueryTest {
|
||||||
@Test
|
@Test
|
||||||
public void givenPartialFirst_whenGettingListOfUsers_thenCorrect() {
|
public void givenPartialFirst_whenGettingListOfUsers_thenCorrect() {
|
||||||
final List<SearchCriteria> params = new ArrayList<SearchCriteria>();
|
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);
|
final List<User> results = userApi.searchUser(params);
|
||||||
|
|
||||||
|
|
|
@ -54,8 +54,8 @@ public class JPASpecificationTest {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void givenFirstAndLastName_whenGettingListOfUsers_thenCorrect() {
|
public void givenFirstAndLastName_whenGettingListOfUsers_thenCorrect() {
|
||||||
final UserSpecification spec = new UserSpecification(new SpecSearchCriteria("firstName", SearchOperation.EQUALITY, "john"));
|
final UserSpecification spec = new UserSpecification(new SpecSearchCriteria("firstName", SearchOperation.EQUALITY, "John"));
|
||||||
final UserSpecification spec1 = new UserSpecification(new SpecSearchCriteria("lastName", SearchOperation.EQUALITY, "doe"));
|
final UserSpecification spec1 = new UserSpecification(new SpecSearchCriteria("lastName", SearchOperation.EQUALITY, "Doe"));
|
||||||
final List<User> results = repository.findAll(Specifications.where(spec).and(spec1));
|
final List<User> results = repository.findAll(Specifications.where(spec).and(spec1));
|
||||||
|
|
||||||
assertThat(userJohn, isIn(results));
|
assertThat(userJohn, isIn(results));
|
||||||
|
@ -64,7 +64,7 @@ public class JPASpecificationTest {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void givenFirstNameInverse_whenGettingListOfUsers_thenCorrect() {
|
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));
|
final List<User> results = repository.findAll(Specifications.where(spec));
|
||||||
|
|
||||||
assertThat(userTom, isIn(results));
|
assertThat(userTom, isIn(results));
|
||||||
|
@ -82,7 +82,7 @@ public class JPASpecificationTest {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void givenFirstNamePrefix_whenGettingListOfUsers_thenCorrect() {
|
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);
|
final List<User> results = repository.findAll(spec);
|
||||||
|
|
||||||
assertThat(userJohn, isIn(results));
|
assertThat(userJohn, isIn(results));
|
||||||
|
|
Loading…
Reference in New Issue