Polish
This commit is contained in:
@@ -58,14 +58,12 @@ public class SampleDataRestApplicationTests {
|
||||
|
||||
@Test
|
||||
public void testHome() throws Exception {
|
||||
|
||||
this.mvc.perform(get("/api")).andExpect(status().isOk())
|
||||
.andExpect(content().string(containsString("hotels")));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void findByNameAndCountry() throws Exception {
|
||||
|
||||
this.mvc.perform(get(
|
||||
"/api/cities/search/findByNameAndCountryAllIgnoringCase?name=Melbourne&country=Australia"))
|
||||
.andExpect(status().isOk())
|
||||
@@ -75,10 +73,10 @@ public class SampleDataRestApplicationTests {
|
||||
|
||||
@Test
|
||||
public void findByContaining() throws Exception {
|
||||
|
||||
this.mvc.perform(get(
|
||||
"/api/cities/search/findByNameContainingAndCountryContainingAllIgnoringCase?name=&country=UK"))
|
||||
.andExpect(status().isOk())
|
||||
.andExpect(jsonPath("_embedded.cities", hasSize(3)));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2017 the original author or authors.
|
||||
* Copyright 2012-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -43,7 +43,6 @@ public class CityRepositoryIntegrationTests {
|
||||
|
||||
@Test
|
||||
public void findsFirstPageOfCities() {
|
||||
|
||||
Page<City> cities = this.repository.findAll(PageRequest.of(0, 10));
|
||||
assertThat(cities.getTotalElements()).isGreaterThan(20L);
|
||||
}
|
||||
@@ -63,4 +62,5 @@ public class CityRepositoryIntegrationTests {
|
||||
PageRequest.of(0, 10));
|
||||
assertThat(cities.getTotalElements()).isEqualTo(3L);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user