summaryrefslogtreecommitdiffstats
path: root/POLICY-SDK-APP/src
diff options
context:
space:
mode:
authorliamfallon <liam.fallon@est.tech>2019-11-13 14:08:14 +0000
committerliamfallon <liam.fallon@est.tech>2019-11-13 22:16:10 +0000
commit2f3ca9fc5edc5a52659b3486605e0db508143318 (patch)
tree0511aa5f0d117fa78032f5b91b2024b57dba5913 /POLICY-SDK-APP/src
parent0c20d1c294fe146e1018f14b07a8d861c29fe527 (diff)
Unit/SONAR/Checkstyle in ONAP-REST
Fourth batch of JPA pojos (N-P), with JUnit added and SONAR/Checkstyle issues addressed. In cases where a class name change caused an update in another package, the license header on files for those knock on changes are not updated. Issue-ID: POLICY-2131 Change-Id: I9319b514b5c19e6837c34566dde770673d16bca3 Signed-off-by: liamfallon <liam.fallon@est.tech>
Diffstat (limited to 'POLICY-SDK-APP/src')
-rw-r--r--POLICY-SDK-APP/src/main/java/org/onap/policy/controller/CreateDcaeMicroServiceController.java12
-rw-r--r--POLICY-SDK-APP/src/test/java/org/onap/policy/controller/CreateDcaeMicroServiceControllerTest.java4
-rw-r--r--POLICY-SDK-APP/src/test/java/org/onap/policy/daoImp/CommonClassDaoImplTest.java2
3 files changed, 9 insertions, 9 deletions
diff --git a/POLICY-SDK-APP/src/main/java/org/onap/policy/controller/CreateDcaeMicroServiceController.java b/POLICY-SDK-APP/src/main/java/org/onap/policy/controller/CreateDcaeMicroServiceController.java
index 1cc41f97b..2e7654e84 100644
--- a/POLICY-SDK-APP/src/main/java/org/onap/policy/controller/CreateDcaeMicroServiceController.java
+++ b/POLICY-SDK-APP/src/main/java/org/onap/policy/controller/CreateDcaeMicroServiceController.java
@@ -903,8 +903,8 @@ public class CreateDcaeMicroServiceController extends RestrictedBaseController {
// Get all keys with "MANY-true" defined in their value from subAttribute
Set<String> allkeys = null;
- if (returnModel.getSub_attributes() != null && !returnModel.getSub_attributes().isEmpty()) {
- JSONObject json = new JSONObject(returnModel.getSub_attributes());
+ if (returnModel.getSubAttributes() != null && !returnModel.getSubAttributes().isEmpty()) {
+ JSONObject json = new JSONObject(returnModel.getSubAttributes());
getAllKeys(json);
allkeys = allManyTrueKeys;
allManyTrueKeys = new TreeSet<>();
@@ -942,8 +942,8 @@ public class CreateDcaeMicroServiceController extends RestrictedBaseController {
jsonModel = finalJsonObject.toString();
}
- // get all properties with "MANY-true" defined in Ref_attributes
- Set<String> manyTrueProperties = getManyTrueProperties(returnModel.getRef_attributes());
+ // get all properties with "MANY-true" defined in RefAttributes
+ Set<String> manyTrueProperties = getManyTrueProperties(returnModel.getRefAttributes());
if (manyTrueProperties != null) {
JSONObject jsonObj = new JSONObject(jsonModel);
for (String s : manyTrueProperties) {
@@ -988,7 +988,7 @@ public class CreateDcaeMicroServiceController extends RestrictedBaseController {
if (attribute != null) {
attribute = attribute.trim();
}
- String refAttribute = returnModel.getRef_attributes();
+ String refAttribute = returnModel.getRefAttributes();
if (refAttribute != null) {
refAttribute = refAttribute.trim();
}
@@ -1005,7 +1005,7 @@ public class CreateDcaeMicroServiceController extends RestrictedBaseController {
Gson gson = new Gson();
- String subAttributes = returnModel.getSub_attributes();
+ String subAttributes = returnModel.getSubAttributes();
if (subAttributes != null) {
subAttributes = subAttributes.trim();
} else {
diff --git a/POLICY-SDK-APP/src/test/java/org/onap/policy/controller/CreateDcaeMicroServiceControllerTest.java b/POLICY-SDK-APP/src/test/java/org/onap/policy/controller/CreateDcaeMicroServiceControllerTest.java
index 1a99fdf92..cb7ffbb2f 100644
--- a/POLICY-SDK-APP/src/test/java/org/onap/policy/controller/CreateDcaeMicroServiceControllerTest.java
+++ b/POLICY-SDK-APP/src/test/java/org/onap/policy/controller/CreateDcaeMicroServiceControllerTest.java
@@ -108,11 +108,11 @@ public class CreateDcaeMicroServiceControllerTest {
+ "CorrelationWindow=String:defaultValue-null:required-true:MANY-false:description-null,"
+ "EmailNotification=String:defaultValue-null:required-true:MANY-false:description-null,"
+ "CorrelationPriority=string:defaultValue-null:required-true:MANY-false:description-null,");
- testData.setRef_attributes("SymptomTriggerSignature=resource-model-symptomEntity:MANY-true:description-null,"
+ testData.setRefAttributes("SymptomTriggerSignature=resource-model-symptomEntity:MANY-true:description-null,"
+ "triggerSignature=resource-model-entity:MANY-true:description-null,"
+ "SelectServerScope=SELECTSERVERSCOPE:MANY-false,logicalConnector=LOGICALCONNECTOR:MANY-false,"
+ "ParentCorrelationTraversal=PARENTCORRELATIONTRAVERSAL:MANY-false,");
- testData.setSub_attributes(
+ testData.setSubAttributes(
"{\"symptomAlarms\":{\"symptomContains\":\"SYMPTOMCONTAINS:defaultValue-null:required-true:MANY-false:"
+ "description-null\",\"symptomFilterValue\":\"string:defaultValue-null:"
+ "required-true:MANY-false:"
diff --git a/POLICY-SDK-APP/src/test/java/org/onap/policy/daoImp/CommonClassDaoImplTest.java b/POLICY-SDK-APP/src/test/java/org/onap/policy/daoImp/CommonClassDaoImplTest.java
index 16c53841c..0a9f9a3c0 100644
--- a/POLICY-SDK-APP/src/test/java/org/onap/policy/daoImp/CommonClassDaoImplTest.java
+++ b/POLICY-SDK-APP/src/test/java/org/onap/policy/daoImp/CommonClassDaoImplTest.java
@@ -130,7 +130,7 @@ public class CommonClassDaoImplTest {
userinfo.setUserName("Test");
commonClassDao.save(userinfo);
OnapName onapName = new OnapName();
- onapName.setOnapName("Test");
+ onapName.setName("Test");
onapName.setUserCreatedBy(userinfo);
onapName.setUserModifiedBy(userinfo);
onapName.setModifiedDate(new Date());