Merge "Fixed Sonar issue in Application.java"
authorDan Timoney <dtimoney@att.com>
Wed, 28 Nov 2018 22:34:40 +0000 (22:34 +0000)
committerGerrit Code Review <gerrit@onap.org>
Wed, 28 Nov 2018 22:34:40 +0000 (22:34 +0000)
16 files changed:
.gitignore
ms/controllerblueprints/modules/service/src/main/java/org/onap/ccsdk/apps/controllerblueprints/service/DataBaseInitService.java
ms/controllerblueprints/modules/service/src/main/java/org/onap/ccsdk/apps/controllerblueprints/service/domain/ConfigModelContent.java
ms/controllerblueprints/modules/service/src/main/java/org/onap/ccsdk/apps/controllerblueprints/service/rs/ConfigModelRest.java
ms/controllerblueprints/modules/service/src/main/java/org/onap/ccsdk/apps/controllerblueprints/service/rs/ModelTypeRest.java
ms/neng/src/main/java/org/onap/ccsdk/apps/ms/neng/core/resource/model/GetConfigRequest.java
ms/neng/src/main/java/org/onap/ccsdk/apps/ms/neng/core/resource/model/GetConfigResponse.java
ms/pom.xml
ms/vlantag-api/src/test/java/org/onap/ccsdk/apps/ms/vlangtagapi/core/model/AssignVlanTagResponseTest.java
ms/vlantag-api/src/test/java/org/onap/ccsdk/apps/ms/vlangtagapi/core/model/UnassignVlanTagRequestInputTest.java
ms/vlantag-api/src/test/java/org/onap/ccsdk/apps/ms/vlantagapi/core/extinf/pm/model/ElementsTest.java [new file with mode: 0644]
ms/vlantag-api/src/test/java/org/onap/ccsdk/apps/ms/vlantagapi/core/extinf/pm/model/PolicyConfigTest.java [new file with mode: 0644]
ms/vlantag-api/src/test/java/org/onap/ccsdk/apps/ms/vlantagapi/core/extinf/pm/model/PolicyContentTest.java [new file with mode: 0644]
ms/vlantag-api/src/test/java/org/onap/ccsdk/apps/ms/vlantagapi/core/extinf/pm/model/PolicyEngineResponseTest.java [new file with mode: 0644]
ms/vlantag-api/src/test/java/org/onap/ccsdk/apps/ms/vlantagapi/core/extinf/pm/model/RequestObjectTest.java [new file with mode: 0644]
ms/vlantag-api/src/test/java/org/onap/ccsdk/apps/ms/vlantagapi/core/extinf/pm/model/ResourceModelTest.java [new file with mode: 0644]

index 82cae9e..12004f5 100644 (file)
@@ -8,6 +8,8 @@
 **/tokens/*\r
 \r
 # Added for Intellij IDEA IDE\r
+**/*.ipr
+**/*.iws
 **/debug-logs/*\r
 **/.idea/*\r
 **/*.iml\r
 **/*.jsonld\r
 **/.checkstyle\r
 **/.gitignore\r
-**/.gitignore\r
-**/.gitignore\r
-**/.gitignore\r
-**/.gitignore\r
-**/.gitignore\r
-**/.gitignore\r
-**/.gitignore\r
-\r
index a4eb2ae..a1a9b9c 100644 (file)
@@ -63,6 +63,7 @@ public class DataBaseInitService {
     private ModelTypeService modelTypeService;\r
     private ResourceDictionaryService resourceDictionaryService;\r
     private ConfigModelService configModelService;\r
+    private String updateBySystem = "System";\r
 \r
     @Value("${load.dataTypePath}")\r
     private String dataTypePath;\r
@@ -105,8 +106,6 @@ public class DataBaseInitService {
 \r
         loadModelType();\r
         loadResourceDictionary();\r
-        // TODO("Enable after Multi file Service Template Repository implementation in place")\r
-        //loadBlueprints();\r
     }\r
 \r
     private void loadModelType() {\r
@@ -188,6 +187,7 @@ public class DataBaseInitService {
                             throw new BluePrintException("couldn't get dictionary from content information");\r
                         }\r
                     } catch (Exception e) {\r
+                        log.error("Exception", e);\r
                         errorBuilder.appendln("Dictionary loading Errors : " + file.getFilename() + ":" + e.getMessage());\r
                     }\r
                 }\r
@@ -223,6 +223,7 @@ public class DataBaseInitService {
                         log.info("Loaded service template successfully: {}", fileName);\r
 \r
                     } catch (Exception e) {\r
+                        log.error("Exception", e);\r
                         errorBuilder.appendln("load config model " + fileName + " error : " + e.getMessage());\r
                     }\r
                 }\r
@@ -250,12 +251,13 @@ public class DataBaseInitService {
             modelType.setDefinition(JacksonUtils.jsonNode(definitionContent));\r
             modelType.setModelName(nodeKey);\r
             modelType.setVersion(nodeType.getVersion());\r
-            modelType.setUpdatedBy("System");\r
+            modelType.setUpdatedBy(updateBySystem);\r
             modelType.setTags(nodeKey + "," + BluePrintConstants.MODEL_DEFINITION_TYPE_NODE_TYPE + ","\r
                     + nodeType.getDerivedFrom());\r
             modelTypeService.saveModel(modelType);\r
             log.trace("Loaded Node Type successfully : {}", file.getFilename());\r
         } catch (Exception e) {\r
+            log.error("Exception", e);\r
             errorBuilder.appendln("Node type loading error : " + file.getFilename() + ":" + e.getMessage());\r
         }\r
     }\r
@@ -274,12 +276,13 @@ public class DataBaseInitService {
             modelType.setDefinition(JacksonUtils.jsonNode(definitionContent));\r
             modelType.setModelName(dataKey);\r
             modelType.setVersion(dataType.getVersion());\r
-            modelType.setUpdatedBy("System");\r
+            modelType.setUpdatedBy(updateBySystem);\r
             modelType.setTags(dataKey + "," + dataType.getDerivedFrom() + ","\r
                     + BluePrintConstants.MODEL_DEFINITION_TYPE_DATA_TYPE);\r
             modelTypeService.saveModel(modelType);\r
             log.trace(" Loaded Data Type successfully : {}", file.getFilename());\r
         } catch (Exception e) {\r
+            log.error("Exception", e);\r
             errorBuilder.appendln("Data type loading error : " + file.getFilename() + ":" + e.getMessage());\r
         }\r
     }\r
@@ -298,12 +301,13 @@ public class DataBaseInitService {
             modelType.setDefinition(JacksonUtils.jsonNode(definitionContent));\r
             modelType.setModelName(dataKey);\r
             modelType.setVersion(artifactType.getVersion());\r
-            modelType.setUpdatedBy("System");\r
+            modelType.setUpdatedBy(updateBySystem);\r
             modelType.setTags(dataKey + "," + artifactType.getDerivedFrom() + ","\r
                     + BluePrintConstants.MODEL_DEFINITION_TYPE_ARTIFACT_TYPE);\r
             modelTypeService.saveModel(modelType);\r
             log.trace("Loaded Artifact Type successfully : {}", file.getFilename());\r
         } catch (Exception e) {\r
+            log.error("Exception", e);\r
             errorBuilder.appendln("Artifact type loading error : " + file.getFilename() + ":" + e.getMessage());\r
         }\r
     }\r
index ae374a7..71904fb 100644 (file)
@@ -76,11 +76,10 @@ public class ConfigModelContent {
 \r
     @Override\r
     public String toString() {\r
-        String builder = "[" + "id = " + id +\r
+        return "[" + "id = " + id +\r
                 ", name = " + name +\r
                 ", contentType = " + contentType +\r
                 "]";\r
-        return builder;\r
     }\r
 \r
     @Override\r
index fc2956b..95e551b 100644 (file)
@@ -81,7 +81,7 @@ public class ConfigModelRest {
 \r
     @GetMapping(path = "/search/{tags}", produces = MediaType.APPLICATION_JSON_VALUE)\r
     public @ResponseBody\r
-    List<ConfigModel> searchConfigModels(@PathVariable(value = "tags") String tags) throws BluePrintException {\r
+    List<ConfigModel> searchConfigModels(@PathVariable(value = "tags") String tags) {\r
         return this.configModelService.searchConfigModels(tags);\r
     }\r
 \r
index 988cad0..0f485a0 100644 (file)
@@ -44,18 +44,18 @@ public class ModelTypeRest {
     }\r
 \r
     @GetMapping(path = "/{name}", produces = MediaType.APPLICATION_JSON_VALUE)\r
-    public ModelType getModelTypeByName(@PathVariable(value = "name") String name) throws BluePrintException {\r
+    public ModelType getModelTypeByName(@PathVariable(value = "name") String name) {\r
         return modelTypeService.getModelTypeByName(name);\r
     }\r
 \r
     @GetMapping(path = "/search/{tags}", produces = MediaType.APPLICATION_JSON_VALUE)\r
-    public List<ModelType> searchModelTypes(@PathVariable(value = "tags") String tags) throws BluePrintException {\r
+    public List<ModelType> searchModelTypes(@PathVariable(value = "tags") String tags) {\r
         return modelTypeService.searchModelTypes(tags);\r
     }\r
 \r
     @GetMapping(path = "/by-definition/{definitionType}", produces = MediaType.APPLICATION_JSON_VALUE)\r
     public @ResponseBody\r
-    List<ModelType> getModelTypeByDefinitionType(@PathVariable(value = "definitionType") String definitionType) throws BluePrintException {\r
+    List<ModelType> getModelTypeByDefinitionType(@PathVariable(value = "definitionType") String definitionType) {\r
         return modelTypeService.getModelTypeByDefinitionType(definitionType);\r
     }\r
 \r
@@ -66,7 +66,7 @@ public class ModelTypeRest {
     }\r
 \r
     @DeleteMapping(path = "/{name}")\r
-    public void deleteModelTypeByName(@PathVariable(value = "name") String name) throws BluePrintException {\r
+    public void deleteModelTypeByName(@PathVariable(value = "name") String name) {\r
         modelTypeService.deleteByModelName(name);\r
     }\r
 }\r
index e8bc555..c233a28 100644 (file)
@@ -29,10 +29,10 @@ import java.util.Map;
 public class GetConfigRequest implements Serializable {
     private static final long serialVersionUID = -8039686696076337053L;
 
-    Map<String, Object> configAttributes;
-    String configName;
-    String ecompName;
-    String policyName;
+    private static Map<String, Object> configAttributes;
+    private static String configName;
+    private static String ecompName;
+    private static String policyName;
     boolean unique;
 
     public Map<String, Object> getConfigAttributes() {
index 9fe567f..f8ea6e1 100644 (file)
@@ -27,7 +27,7 @@ import java.io.Serializable;
  */
 public class GetConfigResponse implements Serializable {
     private static final long serialVersionUID = -8039686696076337053L;
-    Object response;
+    private static Object response;
 
     public Object getResponse() {
         return response;
index 0493db1..9a80e6f 100644 (file)
  * ============LICENSE_END=========================================================
  -->
 
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
     <modelVersion>4.0.0</modelVersion>
 
     <parent>
         <groupId>org.onap.ccsdk.parent</groupId>
         <artifactId>odlparent-lite</artifactId>
         <version>1.2.0-SNAPSHOT</version>
-        <relativePath />
+        <relativePath/>
     </parent>
 
     <groupId>org.onap.ccsdk.apps</groupId>
     <description>Micro-services</description>
 
     <modules>
-               <module>controllerblueprints</module>
+        <module>controllerblueprints</module>
+        <module>blueprintsprocessor</module>
         <module>neng</module>
-               <!--module>vlantag-api</module-->
+        <module>vlantag-api</module>
     </modules>
 </project>
 
index bbcebba..30f817e 100644 (file)
@@ -62,5 +62,12 @@ public class AssignVlanTagResponseTest {
         assertTrue((Integer)assignVlanTagResponse.hashCode() instanceof Integer);
     }
     
+    @Test
+    public void testErrorMessage()
+    {
+       assignVlanTagResponse.errorMessage("test error message");
+       assertEquals("test error message",assignVlanTagResponse.getErrorMessage());
+    }
+    
    
 }
index 6081d0b..99498d6 100644 (file)
@@ -64,4 +64,12 @@ public class UnassignVlanTagRequestInputTest {
         
     }
     
+    @Test
+    public void testVlanTagKey()
+    {
+       unassignVlanTagRequestInput.vlanTagKey("testVlanTagKey");
+        assertEquals("testVlanTagKey",unassignVlanTagRequestInput.getVlanTagKey());
+        
+    }
+    
 }
diff --git a/ms/vlantag-api/src/test/java/org/onap/ccsdk/apps/ms/vlantagapi/core/extinf/pm/model/ElementsTest.java b/ms/vlantag-api/src/test/java/org/onap/ccsdk/apps/ms/vlantagapi/core/extinf/pm/model/ElementsTest.java
new file mode 100644 (file)
index 0000000..6d534ff
--- /dev/null
@@ -0,0 +1,56 @@
+/*******************************************************************************
+ * Copyright © 2018 IBM.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ ******************************************************************************
+*/
+
+package org.onap.ccsdk.apps.ms.vlantagapi.core.extinf.pm.model;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
+import org.junit.Before;
+import org.junit.Test;
+
+public class ElementsTest {
+       private Elements elements;
+
+       @Before
+       public void setUp() {
+               elements = new Elements();
+       }
+
+       @Test
+       public void testGetSetRecycleVlantagRange() {
+               elements.setRecycleVlantagRange("recycleVlantagRange");
+               assertEquals("recycleVlantagRange", elements.getRecycleVlantagRange());
+       }
+
+       @Test
+       public void testGetSetOverwrite() {
+               elements.setOverwrite("overwrite");
+               assertEquals("overwrite", elements.getOverwrite());
+       }
+
+       @Test
+       public void testGetSetElementVlanRole() {
+               elements.setElementVlanRole("elementVlanRole");
+               assertEquals("elementVlanRole", elements.getElementVlanRole());
+       }
+
+       @Test
+       public void testToString() {
+               assertTrue(elements.toString() instanceof String);
+       }
+}
diff --git a/ms/vlantag-api/src/test/java/org/onap/ccsdk/apps/ms/vlantagapi/core/extinf/pm/model/PolicyConfigTest.java b/ms/vlantag-api/src/test/java/org/onap/ccsdk/apps/ms/vlantagapi/core/extinf/pm/model/PolicyConfigTest.java
new file mode 100644 (file)
index 0000000..cf928ce
--- /dev/null
@@ -0,0 +1,113 @@
+/*******************************************************************************
+ * Copyright © 2018 IBM.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ ******************************************************************************
+*/
+
+package org.onap.ccsdk.apps.ms.vlantagapi.core.extinf.pm.model;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
+import org.junit.Before;
+import org.junit.Test;
+
+public class PolicyConfigTest {
+
+    private PolicyConfig policyConfig;
+
+    @Before
+    public void setUp() {
+        policyConfig = new PolicyConfig();
+    }
+
+    @Test
+    public void testGetSetConfigName() {
+        policyConfig.setConfigName("configName");
+        assertEquals("configName", policyConfig.getConfigName());
+    }
+
+    @Test
+    public void testGetSetRiskLevel() {
+        policyConfig.setRiskLevel("RiskLevel");
+        assertEquals("RiskLevel", policyConfig.getRiskLevel());
+    }
+
+    @Test
+    public void testGetSetPolicyName() {
+        policyConfig.setPolicyName("PolicyName");
+        assertEquals("PolicyName", policyConfig.getPolicyName());
+    }
+
+    @Test
+    public void testGetSetPolicyScope() {
+        policyConfig.setPolicyScope("PolicyScope");
+        assertEquals("PolicyScope", policyConfig.getPolicyScope());
+    }
+
+    @Test
+    public void testGetSetGuard() {
+        policyConfig.setGuard("Guard");
+        assertEquals("Guard", policyConfig.getGuard());
+    }
+    
+    @Test
+    public void testGetSetDescription() {
+        policyConfig.setDescription("Description");
+        assertEquals("Description", policyConfig.getDescription());
+    }
+    
+    @Test
+    public void testGetSetPriority() {
+        policyConfig.setPriority("Priority");
+        assertEquals("Priority", policyConfig.getPriority());
+    }
+    
+    @Test
+    public void testGetSetUuid() {
+        policyConfig.setUuid("Uuid");
+        assertEquals("Uuid", policyConfig.getUuid());
+    }
+    
+    @Test
+    public void testGetSetVersion() {
+        policyConfig.setVersion("Version");
+        assertEquals("Version", policyConfig.getVersion());
+    }
+    
+    @Test
+    public void testGetSetService() {
+        policyConfig.setService("Service");
+        assertEquals("Service", policyConfig.getService());
+    }
+     
+    @Test
+    public void testGetSetLocation() {
+        policyConfig.setLocation("Location");
+        assertEquals("Location", policyConfig.getLocation());
+    }
+    
+    @Test
+    public void testGetSetTemplateVersion() {
+        policyConfig.setTemplateVersion("TemplateVersion");
+        assertEquals("TemplateVersion", policyConfig.getTemplateVersion());
+    }
+    
+    @Test
+    public void testToString()
+    {
+        assertTrue(policyConfig.toString() instanceof String);
+    }
+
+}
\ No newline at end of file
diff --git a/ms/vlantag-api/src/test/java/org/onap/ccsdk/apps/ms/vlantagapi/core/extinf/pm/model/PolicyContentTest.java b/ms/vlantag-api/src/test/java/org/onap/ccsdk/apps/ms/vlantagapi/core/extinf/pm/model/PolicyContentTest.java
new file mode 100644 (file)
index 0000000..a020723
--- /dev/null
@@ -0,0 +1,47 @@
+/*******************************************************************************
+ * Copyright © 2018 IBM.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ ******************************************************************************
+*/
+
+package org.onap.ccsdk.apps.ms.vlantagapi.core.extinf.pm.model;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
+import org.junit.Before;
+import org.junit.Test;
+
+public class PolicyContentTest {
+
+    public PolicyContent policyContent;
+
+    @Before
+    public void setUp() {
+        policyContent = new PolicyContent();
+    }
+
+    @Test
+    public void testGetSetPolicyInstanceName() {
+        policyContent.setPolicyInstanceName("policyInstanceName");
+        assertEquals("policyInstanceName", policyContent.getPolicyInstanceName());
+    }
+    
+    @Test
+    public void testToString()
+    {
+        assertTrue(policyContent.toString() instanceof String);
+    }
+
+}
diff --git a/ms/vlantag-api/src/test/java/org/onap/ccsdk/apps/ms/vlantagapi/core/extinf/pm/model/PolicyEngineResponseTest.java b/ms/vlantag-api/src/test/java/org/onap/ccsdk/apps/ms/vlantagapi/core/extinf/pm/model/PolicyEngineResponseTest.java
new file mode 100644 (file)
index 0000000..c6de216
--- /dev/null
@@ -0,0 +1,112 @@
+/*******************************************************************************
+ * Copyright © 2018 IBM.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ ******************************************************************************
+*/
+
+package org.onap.ccsdk.apps.ms.vlantagapi.core.extinf.pm.model;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.junit.Before;
+import org.junit.Test;
+
+public class PolicyEngineResponseTest {
+    
+    private PolicyEngineResponse policyEngineResponse;
+    
+    @Before
+    public void setUp()
+    {
+        policyEngineResponse= new PolicyEngineResponse();
+    }
+    
+    @Test
+    public void testGetSetPolicyConfigMessage()
+    {
+        policyEngineResponse.setPolicyConfigMessage("policyConfigMessage");
+        assertEquals("policyConfigMessage", policyEngineResponse.getPolicyConfigMessage());
+    }
+
+    @Test
+    public void testGetSetPolicyConfigStatus()
+    {
+        policyEngineResponse.setPolicyConfigStatus("PolicyConfigStatus");
+        assertEquals("PolicyConfigStatus", policyEngineResponse.getPolicyConfigStatus());
+    }
+
+    @Test
+    public void testGetSetType()
+    {
+        policyEngineResponse.setType("Type");
+        assertEquals("Type", policyEngineResponse.getType());
+    }
+
+    @Test
+    public void testGetSetPolicyName()
+    {
+        policyEngineResponse.setPolicyName("PolicyName");
+        assertEquals("PolicyName", policyEngineResponse.getPolicyName());
+    }
+
+    @Test
+    public void testGetSetPolicyType()
+    {
+        policyEngineResponse.setPolicyType("PolicyType");
+        assertEquals("PolicyType", policyEngineResponse.getPolicyType());
+    }
+    
+    @Test
+    public void testGetSetPolicyVersion()
+    {
+        policyEngineResponse.setPolicyVersion("PolicyVersion");
+        assertEquals("PolicyVersion", policyEngineResponse.getPolicyVersion());
+    }
+    
+    @Test
+    public void testGetSetMatchingConditions()
+    {
+        HashMap<String, String> test= new HashMap<>();
+        policyEngineResponse.setMatchingConditions(test);
+        assertEquals(test, policyEngineResponse.getMatchingConditions());
+    }
+    
+    
+    @Test
+    public void testGetSetResponseAttributes()
+    {
+        HashMap<String, String> test= new HashMap<>();
+        policyEngineResponse.setResponseAttributes(test);
+        assertEquals(test, policyEngineResponse.getResponseAttributes());
+    }
+    
+    @Test
+    public void testGetSetProperty()
+    {
+        policyEngineResponse.setProperty("Property");
+        assertEquals("Property", policyEngineResponse.getProperty());
+    }
+    
+    @Test
+    public void testToString()
+    {
+        assertTrue(policyEngineResponse.toString() instanceof String);
+    }
+    
+    
+}
diff --git a/ms/vlantag-api/src/test/java/org/onap/ccsdk/apps/ms/vlantagapi/core/extinf/pm/model/RequestObjectTest.java b/ms/vlantag-api/src/test/java/org/onap/ccsdk/apps/ms/vlantagapi/core/extinf/pm/model/RequestObjectTest.java
new file mode 100644 (file)
index 0000000..1bc869e
--- /dev/null
@@ -0,0 +1,44 @@
+/*******************************************************************************
+ * Copyright © 2018 IBM.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ ******************************************************************************
+*/
+
+package org.onap.ccsdk.apps.ms.vlantagapi.core.extinf.pm.model;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
+import org.junit.Before;
+import org.junit.Test;
+
+public class RequestObjectTest {
+    public RequestObject requestObject;
+
+    @Before
+    public void setUp() {
+        requestObject = new RequestObject();
+    }
+
+    @Test
+    public void testGetSetPolicyName() {
+        requestObject.setPolicyName("PolicyName");
+        assertEquals("PolicyName", requestObject.getPolicyName());
+    }
+
+    @Test
+    public void testToString() {
+        assertTrue(requestObject.toString() instanceof String);
+    }
+}
diff --git a/ms/vlantag-api/src/test/java/org/onap/ccsdk/apps/ms/vlantagapi/core/extinf/pm/model/ResourceModelTest.java b/ms/vlantag-api/src/test/java/org/onap/ccsdk/apps/ms/vlantagapi/core/extinf/pm/model/ResourceModelTest.java
new file mode 100644 (file)
index 0000000..faff693
--- /dev/null
@@ -0,0 +1,57 @@
+/*******************************************************************************
+ * Copyright © 2018 IBM.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ ******************************************************************************
+*/
+
+package org.onap.ccsdk.apps.ms.vlantagapi.core.extinf.pm.model;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
+import org.junit.Before;
+import org.junit.Test;
+
+public class ResourceModelTest {
+   private ResourceModel resourceModel;
+   
+   @Before
+   public void setUp()
+   {
+       resourceModel= new ResourceModel();
+   }
+   
+   @Test
+   public void testGetSetResourceName() {
+       resourceModel.setResourceName("ResourceName");
+       assertEquals("ResourceName", resourceModel.getResourceName());
+   }
+   
+   @Test
+   public void testGetSetDataStoreObject() {
+       resourceModel.setDataStoreObject("DataStoreObject");
+       assertEquals("DataStoreObject", resourceModel.getDataStoreObject());
+   }
+   
+   @Test
+   public void testGetSetKeyType() {
+       resourceModel.setKeyType("keyType");
+       assertEquals("keyType", resourceModel.getKeyType());
+   }
+   
+   @Test
+   public void testToString() {
+       assertTrue(resourceModel.toString() instanceof String);
+   }
+}