Add SO VF Module Delete Operation
[policy/models.git] / models-interactions / model-simulators / src / test / java / org / onap / policy / simulators / SoSimulatorTest.java
index b287e3d..723619e 100644 (file)
@@ -134,7 +134,7 @@ public class SoSimulatorTest {
     }
 
     @Test
-    public void testResponse() {
+    public void testPost() {
         final String request = Serialization.gsonPretty.toJson(this.createTestRequest());
         final Pair<Integer, String> httpDetails = new RestManager().post(
                         "http://localhost:6667/serviceInstantiation/v7/serviceInstances/12345/vnfs/12345/vfModules/scaleOut",
@@ -144,4 +144,16 @@ public class SoSimulatorTest {
         final SoResponse response = Serialization.gsonPretty.fromJson(httpDetails.second, SoResponse.class);
         assertNotNull(response);
     }
+
+    @Test
+    public void testDelete() {
+        final String request = Serialization.gsonPretty.toJson(this.createTestRequest());
+        final Pair<Integer, String> httpDetails = new RestManager().delete(
+                        "http://localhost:6667/serviceInstances/v7/12345/vnfs/12345/vfModules/12345",
+                        "username",
+                        "password", new HashMap<>(), "application/json", request);
+        assertNotNull(httpDetails);
+        final SoResponse response = Serialization.gsonPretty.fromJson(httpDetails.second, SoResponse.class);
+        assertNotNull(response);
+    }
 }