[BAEL-7524] Revert bad merge
This commit is contained in:
parent
222416d78a
commit
fc439ff99d
@ -11,6 +11,7 @@ import org.springframework.boot.test.context.SpringBootTest;
|
|||||||
import org.springframework.boot.test.web.client.TestRestTemplate;
|
import org.springframework.boot.test.web.client.TestRestTemplate;
|
||||||
import org.springframework.boot.test.web.server.LocalServerPort;
|
import org.springframework.boot.test.web.server.LocalServerPort;
|
||||||
import org.springframework.http.HttpEntity;
|
import org.springframework.http.HttpEntity;
|
||||||
|
import org.springframework.http.HttpStatus;
|
||||||
|
|
||||||
import com.baeldung.tutorials.openapi.quotes.api.model.QuoteResponse;
|
import com.baeldung.tutorials.openapi.quotes.api.model.QuoteResponse;
|
||||||
|
|
||||||
@ -23,6 +24,12 @@ class QuotesApplicationIntegrationTest {
|
|||||||
@Autowired
|
@Autowired
|
||||||
private TestRestTemplate restTemplate;
|
private TestRestTemplate restTemplate;
|
||||||
|
|
||||||
|
@Test
|
||||||
|
void whenGetQuote_thenSuccess() {
|
||||||
|
var response = restTemplate.getForEntity("http://localhost:" + port + "/quotes/BAEL", QuoteResponse.class);
|
||||||
|
assertThat(response.getStatusCode())
|
||||||
|
.isEqualTo(HttpStatus.OK);
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
void whenGetQuoteMultipleTimes_thenResponseCached() {
|
void whenGetQuoteMultipleTimes_thenResponseCached() {
|
||||||
@ -34,10 +41,5 @@ class QuotesApplicationIntegrationTest {
|
|||||||
.collect(Collectors.groupingBy((q -> q.hashCode()), Collectors.counting()));
|
.collect(Collectors.groupingBy((q -> q.hashCode()), Collectors.counting()));
|
||||||
|
|
||||||
assertThat(quotes.size()).isEqualTo(1);
|
assertThat(quotes.size()).isEqualTo(1);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user