Skip to content

Commit

Permalink
PUB-2612 - Updated tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisS1512 committed Oct 4, 2024
1 parent 21615c8 commit 9df534c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -85,12 +85,12 @@ public String getArtefactJsonBlob(UUID artefactId) {

public String getArtefactSummary(UUID artefactId) {
try {
String response = webClient.get().uri(String.format("%s/publication/%s/summary", url, artefactId))
String response = webClient.get().uri(String.format("%s/publication/%s/summary", url, artefactId))
.accept(MediaType.APPLICATION_JSON)
.retrieve().bodyToMono(String.class)
.block();

return response == null ? "" : response;
return response == null ? "" : response;
} catch (WebClientResponseException ex) {
throw new ServiceToServiceException(SERVICE, ex.getMessage());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ void testFailedGetArtefactJsonPayload() {
@Test
void testGetArtefactSummary() {
mockDataManagementEndpoint.enqueue(new MockResponse().addHeader(
"Content-Type",
CONTENT_TYPE_HEADER,
com.azure.core.http.ContentType.APPLICATION_JSON
).setBody(HELLO));

Expand All @@ -207,7 +207,7 @@ void testGetArtefactSummary() {
@Test
void testGetArtefactSummaryWhenNullReturnsEmptyString() {
mockDataManagementEndpoint.enqueue(new MockResponse().addHeader(
"Content-Type",
CONTENT_TYPE_HEADER,
com.azure.core.http.ContentType.APPLICATION_JSON
));

Expand All @@ -232,7 +232,7 @@ void testGetArtefactSummaryError() {
void testGetArtefactFile() throws JsonProcessingException {
mockDataManagementEndpoint.enqueue(
new MockResponse()
.addHeader("Content-Type", com.azure.core.http.ContentType.APPLICATION_JSON)
.addHeader(CONTENT_TYPE_HEADER, com.azure.core.http.ContentType.APPLICATION_JSON)
.setBody(ow.writeValueAsString(HELLO))
);

Expand Down

0 comments on commit 9df534c

Please sign in to comment.