DATAREDIS-771 - Polishing.
Add test and update documentation. Original Pull Request: #342
This commit is contained in:
@@ -232,6 +232,7 @@ public abstract class RedisRepositoryIntegrationTestBase {
|
||||
|
||||
Person robb = new Person("robb", "stark");
|
||||
robb.setAlive(false);
|
||||
|
||||
Person jon = new Person("jon", "snow");
|
||||
|
||||
repo.saveAll(Arrays.asList(eddard, robb, jon));
|
||||
@@ -242,6 +243,25 @@ public abstract class RedisRepositoryIntegrationTestBase {
|
||||
assertThat(result, contains(eddard));
|
||||
}
|
||||
|
||||
@Test // DATAREDIS-771
|
||||
public void shouldFindByBooleanIsFalse() {
|
||||
|
||||
Person eddard = new Person("eddard", "stark");
|
||||
eddard.setAlive(true);
|
||||
|
||||
Person robb = new Person("robb", "stark");
|
||||
robb.setAlive(false);
|
||||
|
||||
Person jon = new Person("jon", "snow");
|
||||
|
||||
repo.saveAll(Arrays.asList(eddard, robb, jon));
|
||||
|
||||
List<Person> result = repo.findPersonByAliveIsFalse();
|
||||
|
||||
assertThat(result, hasSize(1));
|
||||
assertThat(result, contains(robb));
|
||||
}
|
||||
|
||||
@Test // DATAREDIS-547
|
||||
public void shouldReturnEmptyListWhenPageableOutOfBoundsUsingFindAll() {
|
||||
|
||||
@@ -394,6 +414,8 @@ public abstract class RedisRepositoryIntegrationTestBase {
|
||||
|
||||
List<Person> findPersonByAliveIsTrue();
|
||||
|
||||
List<Person> findPersonByAliveIsFalse();
|
||||
|
||||
List<Person> findByFirstnameAndLastname(String firstname, String lastname);
|
||||
|
||||
List<Person> findByFirstnameOrLastname(String firstname, String lastname);
|
||||
|
||||
@@ -57,6 +57,7 @@ public class RedisRepositoryIntegrationTests extends RedisRepositoryIntegrationT
|
||||
keyspaceConfiguration = MyKeyspaceConfiguration.class,
|
||||
includeFilters = { @ComponentScan.Filter(type = FilterType.ASSIGNABLE_TYPE,
|
||||
classes = { PersonRepository.class, CityRepository.class }) })
|
||||
|
||||
static class Config {
|
||||
|
||||
@Bean
|
||||
|
||||
Reference in New Issue
Block a user