aboutsummaryrefslogtreecommitdiffstats
path: root/POLICY-SDK-APP/src/test
diff options
context:
space:
mode:
Diffstat (limited to 'POLICY-SDK-APP/src/test')
-rw-r--r--POLICY-SDK-APP/src/test/java/org/onap/policy/controller/CreateOptimizationControllerTest.java8
-rw-r--r--POLICY-SDK-APP/src/test/resources/policy_tosca_tca-v1707.yml (renamed from POLICY-SDK-APP/src/test/resources/policy_tosca_tca_v1707.yml)0
2 files changed, 6 insertions, 2 deletions
diff --git a/POLICY-SDK-APP/src/test/java/org/onap/policy/controller/CreateOptimizationControllerTest.java b/POLICY-SDK-APP/src/test/java/org/onap/policy/controller/CreateOptimizationControllerTest.java
index af573c616..35395a859 100644
--- a/POLICY-SDK-APP/src/test/java/org/onap/policy/controller/CreateOptimizationControllerTest.java
+++ b/POLICY-SDK-APP/src/test/java/org/onap/policy/controller/CreateOptimizationControllerTest.java
@@ -386,8 +386,10 @@ public class CreateOptimizationControllerTest {
public void testSetModelData() {
logger.debug("testSetModelData: enter");
-
+
+ CreateOptimizationController controller = new CreateOptimizationController();
HttpServletRequest request = createMock(HttpServletRequest.class);
+ MockHttpServletResponse response = new MockHttpServletResponse();
expect(request.getContentType()).andReturn("multipart/form-data; boundary=----WebKitFormBoundaryWcRUaIbC8kXgjr3p");
expect(request.getMethod()).andReturn("post");
expect(request.getHeader("Content-length")).andReturn("7809");
@@ -407,12 +409,14 @@ public class CreateOptimizationControllerTest {
expect(request.getCharacterEncoding()).andReturn("UTF-8");
expect(request.getContentLength()).andReturn(1024);
replay(request);
-
+ controller.setModelData(request, response);
+
} catch (Exception e) {
logger.error("testSetModelData" + e);
e.printStackTrace();
}
+
logger.debug("testSetModelData: exit");
}
diff --git a/POLICY-SDK-APP/src/test/resources/policy_tosca_tca_v1707.yml b/POLICY-SDK-APP/src/test/resources/policy_tosca_tca-v1707.yml
index 0c30ceea0..0c30ceea0 100644
--- a/POLICY-SDK-APP/src/test/resources/policy_tosca_tca_v1707.yml
+++ b/POLICY-SDK-APP/src/test/resources/policy_tosca_tca-v1707.yml