use of sample.data.rest.domain.City in project spring-boot by spring-projects.
the class CityRepositoryIntegrationTests method findContaining.
@Test
public void findContaining() {
Page<City> cities = this.repository.findByNameContainingAndCountryContainingAllIgnoringCase("", "UK", new PageRequest(0, 10));
assertThat(cities.getTotalElements()).isEqualTo(3L);
}
use of sample.data.rest.domain.City in project spring-boot by spring-projects.
the class CityRepositoryIntegrationTests method findsFirstPageOfCities.
@Test
public void findsFirstPageOfCities() {
Page<City> cities = this.repository.findAll(new PageRequest(0, 10));
assertThat(cities.getTotalElements()).isGreaterThan(20L);
}
use of sample.data.rest.domain.City in project spring-boot by spring-projects.
the class CityRepositoryIntegrationTests method findByNameAndCountry.
@Test
public void findByNameAndCountry() {
City city = this.repository.findByNameAndCountryAllIgnoringCase("Melbourne", "Australia");
assertThat(city).isNotNull();
assertThat(city.getName()).isEqualTo("Melbourne");
}
Aggregations