diff options
Diffstat (limited to 'aai-traversal/src/test')
-rw-r--r-- | aai-traversal/src/test/java/org/onap/aai/rest/DslConsumerTest.java | 1 | ||||
-rw-r--r-- | aai-traversal/src/test/java/org/onap/aai/rest/ExceptionHandlerTest.java | 17 |
2 files changed, 10 insertions, 8 deletions
diff --git a/aai-traversal/src/test/java/org/onap/aai/rest/DslConsumerTest.java b/aai-traversal/src/test/java/org/onap/aai/rest/DslConsumerTest.java index 81f47b1..ac6b749 100644 --- a/aai-traversal/src/test/java/org/onap/aai/rest/DslConsumerTest.java +++ b/aai-traversal/src/test/java/org/onap/aai/rest/DslConsumerTest.java @@ -267,6 +267,7 @@ public class DslConsumerTest extends AbstractSpringRestTest { assertEquals("SVC6152", response.getBody().getRequestError().getServiceException().getMessageId()); assertEquals("DSL Generic Error (msg=%1) (ec=%2)", response.getBody().getRequestError().getServiceException().getText()); assertEquals("DSL Generic Error:Error while processing the query: org.onap.aai.exceptions.AAIException: No nodes marked for output", response.getBody().getRequestError().getServiceException().getVariables().get(0)); + assertEquals("/aai/v11/dsl", response.getBody().getRequestError().getServiceException().getVariables().get(3)); } @Test diff --git a/aai-traversal/src/test/java/org/onap/aai/rest/ExceptionHandlerTest.java b/aai-traversal/src/test/java/org/onap/aai/rest/ExceptionHandlerTest.java index c7314bc..bed964e 100644 --- a/aai-traversal/src/test/java/org/onap/aai/rest/ExceptionHandlerTest.java +++ b/aai-traversal/src/test/java/org/onap/aai/rest/ExceptionHandlerTest.java @@ -81,6 +81,7 @@ public class ExceptionHandlerTest { when(httpHeaders.getAcceptableMediaTypes()).thenReturn(outputMediaTypes); when(httpHeaders.getRequestHeaders()).thenReturn(headersMultiMap); when(request.getMethod()).thenReturn("PUT"); + when(request.getRequestURI()).thenReturn("/aai/v14/dsl"); } @Test @@ -108,8 +109,8 @@ public class ExceptionHandlerTest { assertEquals(Response.Status.BAD_REQUEST.getStatusCode(), response.getStatus()); assertEquals("SVC3102",responseEntity.getRequestError().getServiceException().getMessageId()); assertEquals("Error parsing input performing %1 on %2 (msg=%3) (ec=%4)",responseEntity.getRequestError().getServiceException().getText()); - assertEquals("UnmarshalException",responseEntity.getRequestError().getServiceException().getVariables().get(0)); - assertEquals("null",responseEntity.getRequestError().getServiceException().getVariables().get(1)); + assertEquals("PUT",responseEntity.getRequestError().getServiceException().getVariables().get(0)); + assertEquals("/aai/v14/dsl",responseEntity.getRequestError().getServiceException().getVariables().get(1)); assertEquals("Input parsing error:javax.ws.rs.WebApplicationException: HTTP 500 Internal Server Error",responseEntity.getRequestError().getServiceException().getVariables().get(2)); assertEquals("ERR.5.4.4007",responseEntity.getRequestError().getServiceException().getVariables().get(3)); } @@ -127,8 +128,8 @@ public class ExceptionHandlerTest { assertEquals(Response.Status.BAD_REQUEST.getStatusCode(), response.getStatus()); assertEquals("SVC3102",responseEntity.getRequestError().getServiceException().getMessageId()); assertEquals("Error parsing input performing %1 on %2 (msg=%3) (ec=%4)",responseEntity.getRequestError().getServiceException().getText()); - assertEquals("JsonParseException",responseEntity.getRequestError().getServiceException().getVariables().get(0)); - assertEquals("null",responseEntity.getRequestError().getServiceException().getVariables().get(1)); + assertEquals("PUT",responseEntity.getRequestError().getServiceException().getVariables().get(0)); + assertEquals("/aai/v14/dsl",responseEntity.getRequestError().getServiceException().getVariables().get(1)); assertEquals("Input parsing error:com.fasterxml.jackson.core.JsonParseException: ",responseEntity.getRequestError().getServiceException().getVariables().get(2)); assertEquals("ERR.5.4.4007",responseEntity.getRequestError().getServiceException().getVariables().get(3)); } @@ -145,8 +146,8 @@ public class ExceptionHandlerTest { assertEquals(Response.Status.BAD_REQUEST.getStatusCode(), response.getStatus()); assertEquals("SVC3102",responseEntity.getRequestError().getServiceException().getMessageId()); assertEquals("Error parsing input performing %1 on %2 (msg=%3) (ec=%4)",responseEntity.getRequestError().getServiceException().getText()); - assertEquals("JsonMappingException",responseEntity.getRequestError().getServiceException().getVariables().get(0)); - assertEquals("null",responseEntity.getRequestError().getServiceException().getVariables().get(1)); + assertEquals("PUT",responseEntity.getRequestError().getServiceException().getVariables().get(0)); + assertEquals("/aai/v14/dsl",responseEntity.getRequestError().getServiceException().getVariables().get(1)); assertEquals("Input parsing error:com.fasterxml.jackson.databind.JsonMappingException: ",responseEntity.getRequestError().getServiceException().getVariables().get(2)); assertEquals("ERR.5.4.4007",responseEntity.getRequestError().getServiceException().getVariables().get(3)); } @@ -164,7 +165,7 @@ public class ExceptionHandlerTest { assertEquals("SVC3002",responseEntity.getRequestError().getServiceException().getMessageId()); assertEquals("Error writing output performing %1 on %2 (msg=%3) (ec=%4)",responseEntity.getRequestError().getServiceException().getText()); assertEquals("PUT",responseEntity.getRequestError().getServiceException().getVariables().get(0)); - assertEquals("unknown",responseEntity.getRequestError().getServiceException().getVariables().get(1)); + assertEquals("/aai/v14/dsl",responseEntity.getRequestError().getServiceException().getVariables().get(1)); assertEquals("Internal Error:java.lang.Exception",responseEntity.getRequestError().getServiceException().getVariables().get(2)); assertEquals("ERR.5.4.4000",responseEntity.getRequestError().getServiceException().getVariables().get(3)); } @@ -186,7 +187,7 @@ public class ExceptionHandlerTest { assertEquals("SVC3002",responseEntity.getRequestError().getServiceException().getMessageId()); assertEquals("Error writing output performing %1 on %2 (msg=%3) (ec=%4)",responseEntity.getRequestError().getServiceException().getText()); assertEquals("PUT",responseEntity.getRequestError().getServiceException().getVariables().get(0)); - assertEquals("unknown",responseEntity.getRequestError().getServiceException().getVariables().get(1)); + assertEquals("/aai/v14/dsl",responseEntity.getRequestError().getServiceException().getVariables().get(1)); assertEquals("Internal Error:java.lang.Exception",responseEntity.getRequestError().getServiceException().getVariables().get(2)); assertEquals("ERR.5.4.4000",responseEntity.getRequestError().getServiceException().getVariables().get(3)); } |