aboutsummaryrefslogtreecommitdiffstats
path: root/ONAP-PAP-REST/src/main
diff options
context:
space:
mode:
authorMichael Mokry <michael.mokry@att.com>2019-01-21 16:21:28 -0600
committerMichael Mokry <michael.mokry@att.com>2019-01-22 09:10:58 -0600
commite598e9708241430648b553f0d3f3b2a146be1bf2 (patch)
treee568f9c071f9a873c78553850186ec8b59e1dae7 /ONAP-PAP-REST/src/main
parent1aeb1d9da9b06a38e6b9760085cb0fc51b8faf18 (diff)
Increase JUnit Code Coverage for PolicyDBDao
Added Junit tests for PolicyDBDao methods that were not covered after observing that the code coverage dropped below 50% in SONAR. Modified license headers with correct copywrite Change-Id: Iad8e18d978236f4391363d963eb4624744f45099 Issue-ID: POLICY-1448 Signed-off-by: Michael Mokry <michael.mokry@att.com>
Diffstat (limited to 'ONAP-PAP-REST/src/main')
-rw-r--r--ONAP-PAP-REST/src/main/java/org/onap/policy/pap/xacml/rest/components/PolicyDBDao.java14
1 files changed, 13 insertions, 1 deletions
diff --git a/ONAP-PAP-REST/src/main/java/org/onap/policy/pap/xacml/rest/components/PolicyDBDao.java b/ONAP-PAP-REST/src/main/java/org/onap/policy/pap/xacml/rest/components/PolicyDBDao.java
index 75d7645ce..c9c49720d 100644
--- a/ONAP-PAP-REST/src/main/java/org/onap/policy/pap/xacml/rest/components/PolicyDBDao.java
+++ b/ONAP-PAP-REST/src/main/java/org/onap/policy/pap/xacml/rest/components/PolicyDBDao.java
@@ -2,7 +2,7 @@
* ============LICENSE_START=======================================================
* ONAP-PAP-REST
* ================================================================================
- * Copyright (C) 2017-2018 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
* Modified Copyright (C) 2018 Samsung Electronics Co., Ltd.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -2870,6 +2870,18 @@ public class PolicyDBDao {
String[] getPolicyNameAndVersionFromPolicyFileName(String originalPolicyName) throws PolicyDBException {
return PolicyDBDao.this.getPolicyNameAndVersionFromPolicyFileName(originalPolicyName);
}
+
+ String[] getNameScopeAndVersionFromPdpPolicy(String fileName) {
+ return PolicyDBDao.this.getNameScopeAndVersionFromPdpPolicy(fileName);
+ }
+
+ String getPdpPolicyName(String name, String scope) {
+ return PolicyDBDao.this.getPdpPolicyName(name, scope);
+ }
+
+ Path getPolicySubFile(String inputFileName, String subFileType) {
+ return PolicyDBDao.this.getPolicySubFile(inputFileName, subFileType);
+ }
}
}