Skip to content

Commit

Permalink
Use RecordedRequest fluent assertions in UrlHealthCheckTest (#567)
Browse files Browse the repository at this point in the history
  • Loading branch information
sleberknight authored Dec 1, 2024
1 parent d5bee6b commit 42c7fa3
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package org.kiwiproject.dropwizard.util.health;

import static org.assertj.core.api.Assertions.assertThat;
import static org.kiwiproject.test.assertj.dropwizard.metrics.HealthCheckResultAssertions.assertThatHealthCheck;
import static org.kiwiproject.test.okhttp3.mockwebserver.RecordedRequestAssertions.assertThatRecordedRequest;
import static org.kiwiproject.test.okhttp3.mockwebserver.RecordedRequests.assertNoMoreRequests;
import static org.kiwiproject.test.okhttp3.mockwebserver.RecordedRequests.takeRequiredRequest;
import static org.mockito.Mockito.mock;
Expand Down Expand Up @@ -168,8 +168,9 @@ void shouldReturnUnhealthyResult_WithWarnLevelSeverity_WhenReceivesUnsuccessfulR

private void verifyRequest() {
var request = takeRequiredRequest(server);
assertThat(request.getMethod()).isEqualTo("GET");
assertThat(request.getPath()).isEqualTo(STATUS_PATH);
assertThatRecordedRequest(request)
.isGET()
.hasPath(STATUS_PATH);

assertNoMoreRequests(server);
}
Expand Down

0 comments on commit 42c7fa3

Please sign in to comment.