aboutsummaryrefslogtreecommitdiffstats
path: root/common-parameters/src/test/java/org/onap/policy/common/parameters/ExceptionTest.java
AgeCommit message (Collapse)AuthorFilesLines
2020-06-17Cleanup various sonar issues in policy-commonJim Hahn1-2/+1
Addressed the following issues: - unused imports - unused method parameters - use assertEquals, assertSame instead of assertTrue - provide the parametrized type for this generic Also fixed some checkstyle issues: - removed blank lines between "import" groups Issue-ID: POLICY-2650 Change-Id: I004bb650ac10c49ccd0fc405f6959896fec39f9b Signed-off-by: Jim Hahn <jrh3@att.com>
2019-06-12Apply simple sonar fixesJim Hahn1-13/+14
Note: A number of these were identified, by SonarLint, in the Test classes, which are not typically scanned by Sonar. Removed unnecessary imports. Removed unneeded "throws Xxx". Replaced lambda with method references. Replaced duplicate strings with constants. Replaced try-fail-catch with assert-j methods to eliminate sonar complaints about duplicate failure messages. Added missing @Override annotations. Use map.computeIfAbsent() where appropriate. Also fixed some minor checkstyle issues. Removed unneeded "volatile" declarations. Replaced some if-else constructs with "?:" construct, per sonar. Replaced Object.wait() with CountDownLatch.await(); according to sonar (and javadocs), Object.wait() can return due to "spurious wakeups". Fixed issue whereby CryptoUtilsTest wouldn't run in my Eclipse. Change-Id: Ib6b71ed65662cfd6209400dac57ed69279bf29ec Issue-ID: POLICY-1791 Signed-off-by: Jim Hahn <jrh3@att.com>
2018-07-31Improve validation, add hierarchical validationliamfallon1-1/+2
Parameter validaiton updated to generically support nested groups of parameters, and nested maps of parameters. Unit test showing JSON parameter input added. Unit test showing YAML parameter inout added. Test parameter group classes moved into subdirectory This allows parameters to be unmarshaled seamlessly from JSON and YAML files. Change-Id: I768e11f31ee7f62299c4d5d95ab68a005d1aff16 Issue-ID: POLICY-922 Signed-off-by: liamfallon <liam.fallon@ericsson.com>
2018-07-25Add common parameter handlingliamfallon1-0/+57
This common module is proposed to handle all parameters and properties for the ONAP Policy Framework in a common way. Parameters and Properties: - are validated once when they are loaded and need not be checked again in classes that use them - are available for lookup in a parameter service, they need not be passed in constructors and method arguments - are input using a single implementiation of input method only (JSON/YAML/Java properties/REST) - are defined in a schema and the schema is used for validation as much as possible Issue-ID: POLICY-922 Change-Id: I1fac88b9e952b6b5fcbea04319cb4294a9653327 Signed-off-by: liamfallon <liam.fallon@ericsson.com>