diff options
author | 2020-04-20 06:19:55 +0000 | |
---|---|---|
committer | 2020-04-20 06:19:55 +0000 | |
commit | 1dca3f890e73ab277bba0bbacd9846f5d60701c2 (patch) | |
tree | 1bf93e124abfab4b3448e6d88ba98785822b8e36 | |
parent | eaeac3023bbdddfef79f2afdc7f261812af2ca1e (diff) | |
parent | c8c9b18c6a9b8e689143431b9b5122d204bfa493 (diff) |
Merge "Fix sonar issue ResponseBuilderTest"
-rw-r--r-- | pnfsimulator/src/test/java/org/onap/pnfsimulator/rest/util/ResponseBuilderTest.java | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/pnfsimulator/src/test/java/org/onap/pnfsimulator/rest/util/ResponseBuilderTest.java b/pnfsimulator/src/test/java/org/onap/pnfsimulator/rest/util/ResponseBuilderTest.java index 0d62ee9..66187bc 100644 --- a/pnfsimulator/src/test/java/org/onap/pnfsimulator/rest/util/ResponseBuilderTest.java +++ b/pnfsimulator/src/test/java/org/onap/pnfsimulator/rest/util/ResponseBuilderTest.java @@ -25,6 +25,7 @@ import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertNull; import java.util.Map; + import org.junit.jupiter.api.Test; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; @@ -39,8 +40,8 @@ class ResponseBuilderTest { ResponseEntity responseEntity = ResponseBuilder.status(SAMPLE_STATUS).build(); assertAll( - () -> assertEquals(responseEntity.getStatusCode(), SAMPLE_STATUS), - () -> assertNull(responseEntity.getBody()) + () -> assertEquals(SAMPLE_STATUS, responseEntity.getStatusCode()), + () -> assertNull(responseEntity.getBody()) ); } @@ -49,15 +50,15 @@ class ResponseBuilderTest { String key = "key"; String value = "value"; ResponseEntity response = ResponseBuilder - .status(SAMPLE_STATUS) - .put(key, value) - .build(); + .status(SAMPLE_STATUS) + .put(key, value) + .build(); Map<String, Object> body = (Map<String, Object>) response.getBody(); assertAll( - () -> assertEquals(SAMPLE_STATUS, response.getStatusCode()), - () -> assertEquals(value, body.get(key)) + () -> assertEquals(SAMPLE_STATUS, response.getStatusCode()), + () -> assertEquals(value, body.get(key)) ); } |