aboutsummaryrefslogtreecommitdiffstats
path: root/model/basic-model/src/test/java/org
AgeCommit message (Collapse)AuthorFilesLines
2022-02-10Collapse apex-pdp maven model submodulesliamfallon24-2569/+0
This review collapses all the code in six podel submodules into a single model module. There are no code changes, just files moved around. This change reduces the complexity of the code structure and speeds up the build. Issue-ID: POLICY-1820 Change-Id: Ifb644e8ec85ae6d0987378f4616fbc8a8858a9a8 Signed-off-by: liamfallon <liam.fallon@est.tech>
2022-02-08Remove JAXB and XML, use GSON for JSONliamfallon11-380/+56
This review converst apex-pdp to use GSON for JSON handling. In order to preserve backward compatibility with the JAXB format of JSON, custom handling of maps was required. Therefore, the policy-common StandardCoder could not be used. There are a lot of small changes, removing annotations from concepts and tweaking of test data. However, this cleans up the code base so it is worth doing. Issue-ID: POLICY-1820 Change-Id: I213fa64f6d7f3f1df8d10f111d9fbedbe80f9fe0 Signed-off-by: liamfallon <liam.fallon@est.tech>
2022-02-04Remove JPA annotations from apex-pdp codeliamfallon1-8/+1
This review is part of a series of reviews to move the apex-pdp state machine model to use the base model types in policy models. Persistence of policies for apex-pdp is now implemented in PAP and API. The historic direct load and save functionality for APEX policy state machine models to and from databases is no longer used and no longer supported. This commit removes JPA annotations form apex-pdp code. Subsequent reviews will mvoe the mdoel across to use the policy models base model types. Issue-ID: POLICY-1820 Change-Id: I91a45a0ca6c88f9ba4b201bad920065f95ffb31e Signed-off-by: liamfallon <liam.fallon@est.tech>
2022-02-03Remove direct DB Load/Save from apex-pdpliamfallon4-389/+41
This review is part of a series of reviews to move the apex-pdp state machine model to use the base model types in policy models. Persistence of policies for apex-pdp is now implemented in PAP and API. The historic direct load and save functionality for APEX policy state machine models to and from databases is no longer used and no longer supported. This revmoves the DAO code from apex-pdp and the associated handling and test code. The next review will remove the JPA annotations. Subsequent reviews will mvoe the mdoel across to use the policy models base model types. Issue-ID: POLICY-1820 Change-Id: Iabf034b40a413d32fe62091fe3446f52ec30d3af Signed-off-by: liamfallon <liam.fallon@est.tech>
2021-06-10Fix Rebase Issue on Sonar Issues apex-pdp-modellapentafd1-21/+0
Deleting a duplicate method inserted in two different reviews Issue-ID: POLICY-3093 Change-Id: Ie7c06c17ad1df380ebcd7129c218f5784152ff0e Signed-off-by: lapentafd <francesco.lapenta@est.tech>
2021-06-10Merge "Fix Sonar Issues in apex-pdp-basic-model"Pamela Dragosh2-33/+73
2021-06-09Fix Sonar Issues in apex-pdp-basic-modellapentafd2-34/+74
Test refactoring and use of Local-Variable Type Inference Issue-ID: POLICY-3093 Change-Id: If19c9ec96ba440a58eff679f276e4b53a26ce1ab Signed-off-by: lapentafd <francesco.lapenta@est.tech>
2021-06-08Fix Sonar Issues in apex-pdp-modellapentafd5-119/+166
Changes made into model/basic-model Renamed test classes to match the others Issue-ID: POLICY-3093 Change-Id: I7a0d6046ead42a9165aaf96b89511dd8d064d109 Signed-off-by: lapentafd <francesco.lapenta@est.tech>
2021-05-07Code coverage for File Carrier Pluginarkadiusz.adamski1-2/+8
- Increase code coverage for file carrier plugin in service engine Issue-ID: POLICY-3092 Signed-off-by: arkadiusz.adamski <aadamski@est.tech> Change-Id: I8c08ee55c9d31792e35a1acc79330c8eef42af56
2021-02-18Fix sonars in apex-pdpJim Hahn2-0/+8
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-09-03Clean up warnings and SONAR issuesliamfallon1-36/+35
Issue-ID: POLICY-2654 Change-Id: Ifd391ea9141d37cfd3ca4110d66c667962230ae1 Signed-off-by: liamfallon <liam.fallon@est.tech>
2020-08-17SONAR fixes - assert dissimiliar typeswaynedunican5-6/+6
Fix for assertions comparing dissimiliar types. Issue-ID: POLICY-2761 Change-Id: I1b2b8afa3e6308cda887d73a4ee079709847d054 Signed-off-by: waynedunican <wayne.dunican@est.tech>
2020-08-10SONAR assertion cleanupwaynedunican5-14/+16
Replaced assertions to not have the same actual and expected expression in apex-pdp Issue-ID: POLICY-2761 Change-Id: I2bf45a3cc4411bd39f93f9d0b8c8e56dd318281e Signed-off-by: waynedunican <wayne.dunican@est.tech>
2020-07-27SONAR assertions apex-pdpwaynedunican2-4/+12
Ensure assertions are present in test cases Issue-ID: POLICY-2706 Change-Id: I3673a7668564401d2136450b0bdd7a013605dd7c Signed-off-by: waynedunican <wayne.dunican@est.tech>
2020-07-23Remove try/catch blocks with assertj - apex-pdpwaynedunican12-567/+306
Removed try/catch blocks in apex-pdp and replaced with assertj assertions Part III Issue-ID: POLICY-2451 Change-Id: I1e6ede1c256c5bcf7899e1af130add71fdf1381c Signed-off-by: waynedunican <wayne.dunican@est.tech>
2020-07-13Fix assertTrue SONAR issues in apex-pdp/examples and apex-pdp/modelJvD_Ericsson8-100/+101
Replace assertTrue with assertEquals and assertFalse with assertNotEquals in apex-pdp/examples and apex-pdp/model Issue-ID: POLICY-2690 Change-Id: Ie863dd95ccead62268689a4a8388f9b6e8821649 Signed-off-by: JvD_Ericsson <jeff.van.dam@est.tech>
2020-06-19Changes for checkstyle 8.32liamfallon23-102/+36
Issue-ID: POLICY-2188 Change-Id: I56bbf3aa3bd9e1ef433cc93ad2be0c54d141a2a5 Signed-off-by: liamfallon <liam.fallon@est.tech>
2020-02-26Fix Java 11/Checkstyle/Sonar warningsliamfallon1-8/+7
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>
2019-07-01ApexPDP: Adding support to omit the (context) albums entry in an apexJohnKeeney1-8/+14
policy model if it is empty. Implemented as a pair of JAXB XMLAdaters Updated copyright, fixed somecheckstyle issues, refactored affected tests & Merge Issue-ID: POLICY-1802 Change-Id: Id68d9a524700f44c164939b7533f2d511b591e36 Signed-off-by: JohnKeeney <John.Keeney@est.tech>
2019-06-27Fix Sonar/Checkstyle issues in apex-pdpliamfallon4-8/+12
BBS Java code introduced Sonar issues, these are resolved. Also fixed checkstyle errors in other classes. Also fiexed "unexpected type" eclipse errors. Issue-ID: POLICY-1791 Change-Id: I3931051f0944c6d53745c8dd1db7cca4ee118f1c Signed-off-by: liamfallon <liam.fallon@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>
2019-04-16Fix Security and Unit Test DB issuesliamfallon2-34/+1
This review removes more links to the Zookeeper version 3.5.4-beta with Zookeeper version 3.4.14. It also replaces the Derby in-memory database with the H2 in memory database for unit tests. Issue-ID: POLICY-1540 Change-Id: Ic44f2e866644114b7c0cf66aac7e528017b8206b Signed-off-by: liamfallon <liam.fallon@est.tech>
2018-12-15Fix sonar test renaming issuesliamfallon10-9/+429
Renaming tests introduced Sonar issues: - Tests where coverage was <80% flagged as they are new code - Support test classes with names ending in "Test" flagged becasue they did not contain test cases Issue-ID: POLICY-1263 Change-Id: I17a4b27b2952a4978fab1c76579a013478b60ae1 Signed-off-by: liamfallon <liam.fallon@est.tech>
2018-11-28Rename test classes in apex-pdp/model/basic-modelParshad Patel20-79/+79
Make test classes name consitence by adding 'Support' or 'Dummy' at start of util or dummy type of test classes Issue-ID: POLICY-1263 Change-Id: Ia90e0ea73af16f6cde37692e98f1c4afc408dd2b Signed-off-by: Parshad Patel <pars.patel@samsung.com>
2018-11-19Rename test classes in apex-pdpParshad Patel19-19/+19
Make test classes name consistence by putting 'Test' at end Issue-ID: POLICY-1263 Change-Id: I0179388d84826e698276a1995dd8173a40b5fd2b Signed-off-by: Parshad Patel <pars.patel@samsung.com>
2018-09-12Sonar/Checkstyle in model/context/coreliamfallon2-16/+13
Checkstyle and sonar changes in the model, contexot and core modules. Issue-ID: POLICY-1034 Change-Id: I2d40bc877f3a548844470fc290fc89d63fa465ae Signed-off-by: liamfallon <liam.fallon@ericsson.com>
2018-09-04Fix checkstyle issues in apex model basicliamfallon27-449/+465
CHeckstyle issues in apex model basic and knock on changes in other apex modules. Issue-ID: POLICY-1034 Change-Id: I65823f5e2e344526abc74b0812877113acb056ec Signed-off-by: liamfallon <liam.fallon@ericsson.com>
2018-08-31Use parameter service in apexliamfallon4-198/+0
Switch parameter handling in apex to use the ONAP PF common parameter service Change-Id: Id318d19c726b18b1a69c630fa81ca7d695355e9c Issue-ID: POLICY-954 Signed-off-by: liamfallon <liam.fallon@ericsson.com>
2018-05-25Adding apex event-model moduleramverma32-443/+439
- Adding apex event-model module - Fixing namespaces Change-Id: If37a1773000ca99eb5d97703fdeb5788ce55365c Issue-ID: POLICY-856 Signed-off-by: ramverma <ram.krishna.verma@ericsson.com>
2018-05-24Adding apex utiliites and basic-model moduleeikrwaq31-0/+3278
Change-Id: Ib72677912eb5ac4b872e555f24570c86a627802f Issue-ID: POLICY-855 Signed-off-by: waqas.ikram <waqas.ikram@ericsson.com>