DATAREDIS-771 - Polishing.

Add test and update documentation.

Original Pull Request: #342
This commit is contained in:
Christoph Strobl
2018-05-23 11:05:36 +02:00
parent 86606be850
commit 2b2995af7e
3 changed files with 26 additions and 1 deletions

View File

@@ -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);

View File

@@ -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