aboutsummaryrefslogtreecommitdiffstats
path: root/tools/model-generator/src/test
AgeCommit message (Collapse)AuthorFilesLines
2021-02-18Fix sonars in apex-pdpJim Hahn3-62/+20
Addressed the following issues: - initialize mocks before use - use parameterized queries - Random() is not secure - provide parameterized type for generics - unused imports - constructor visibility - use compute() instead of containsKey()/put() - make final fields static - rename constants to all upper case - no assert() in Thread.run() methods - nested try - nested if/else - too many break/continue - use try-with-resources - repeatable annotations - overlapping characters in reg ex - hashcode is not sufficient in compareTo() - need equals() with compareTo() - make class an interface - use parameterized test - multiple calls in assert() - log or re-throw - use different type of lambda - use parameterized logging - use StringBuilder instead of concatenation - use StandardCharsets.UTF_8 Issue-ID: POLICY-2906 Change-Id: I2cf8c885e3e22c2c6cbe6403a34906928afad022 Signed-off-by: Jim Hahn <jrh3@att.com>
2020-07-27SONAR assertions apex-pdpwaynedunican2-2/+4
Ensure assertions are present in test cases Issue-ID: POLICY-2706 Change-Id: I3673a7668564401d2136450b0bdd7a013605dd7c Signed-off-by: waynedunican <wayne.dunican@est.tech>
2020-07-15Replace try/catch with assertjwaynedunican3-110/+73
Replaced try/catch blocks with assertj assertions in apex-pdp. Last batch of changes Issue-ID: POLICY-2451 Change-Id: I39bd02fdbd8389818dcf1b786189c1e344ddcea5 Signed-off-by: waynedunican <wayne.dunican@est.tech>
2020-06-19Changes for checkstyle 8.32liamfallon3-3/+0
Issue-ID: POLICY-2188 Change-Id: I56bbf3aa3bd9e1ef433cc93ad2be0c54d141a2a5 Signed-off-by: liamfallon <liam.fallon@est.tech>
2020-03-11Convert examples to Rhino Javascript formatliamfallon1-1/+1
All examples are converted to Rhino Javascript from Nashorn Javascript. Issue-ID: POLICY-2106 Change-Id: Ia6fec5b57b1e6131799b4b069968e4766ce54c96 Signed-off-by: liamfallon <liam.fallon@est.tech>
2020-02-26Fix Java 11/Checkstyle/Sonar warningsliamfallon1-2/+9
A number of Java 11, checkstyle, and SONAR warnings have crept into the Apex codebase over the last number of reviews. This change fixes those issues. Issue-ID: POLICY-1913 Change-Id: I2afd607e80f48323355380fb2fe5e048e18879f9 Signed-off-by: liamfallon <liam.fallon@est.tech>
2020-01-23Remove apex-pdp TextFileUtils classliamfallon1-1/+1
This class was moved to policy-common some time ago. Removing it in apex-pdp. Issue-ID: POLICY-1913 Change-Id: I982fbd799334b34f1526e19f339236b52205b91e Signed-off-by: liamfallon <liam.fallon@est.tech>
2020-01-23Run apex-pdp in Java 11: base changesliamfallon2-40/+34
This change brings in the minimum changes to get apex-pdp running in Java 11. Other reviews will bring in changes to remove Java 11 warnings and to convert apex-pdp Javascript handling from the now deprecated nashorn engine. Issue-ID: POLICY-1581 Change-Id: I879bbae08d4e67aca3f1bfeedeca639d8dbbc281 Signed-off-by: liamfallon <liam.fallon@est.tech>
2019-08-22test case of model generatorning.xi4-0/+1088
Issue-ID: POLICY-1992 Change-Id: I90143d9903e0ada74dd9efba80aa6589b9f3dff4 Signed-off-by: ning.xi <ning.xi@est.tech>
2019-06-21Replace uses of getCanonicalName() with getName() in APEXa.sreekumar1-1/+1
Change-Id: Ifcd8866e65a7bc1238d5a4137f7bad288a5bfb3b Issue-ID: POLICY-1861 Signed-off-by: a.sreekumar <ajith.sreekumar@est.tech>
2018-11-07Refactor unit test dataliamfallon9-22238/+11
There were many copies of test policies and examples strewn through the Apex unit tests. This change cleans up the unit tests so that a single version of all example policies is used in all tests. Also added a new relative file root command line parameter to Apex to allow the root of relative paths in configuration files to be set. Apologies for the size of this review but unfortunately all of this must be done in one shot. Issue-ID: POLICY-1252 Change-Id: Ibbb18fbf18e3897a1c61301d0a65e62bc643a0e9 Signed-off-by: liamfallon <liam.fallon@ericsson.com>
2018-09-27Add unit test for Apex command line toolsliamfallon11-0/+22850
THere was no unit test for the command line tools. This review adds unit test and also fixes a few small bugs that showed up when uit test was run. Issue-ID: POLICY-1034 Change-Id: Ic19aacdb168fb5a6faa0cd83ed22ccfcedaa51f5 Signed-off-by: liamfallon <liam.fallon@ericsson.com>