aboutsummaryrefslogtreecommitdiffstats
path: root/POLICY-SDK-APP/src/test/java
AgeCommit message (Collapse)AuthorFilesLines
2019-10-11Add coverage to a few ControllersPamela Dragosh4-7/+358
Cleaned up parts of the code that were useless. The coverage for 2 classes are now over 80%. The CreatePolicyController coverage is now 100% I have no idea what kind of policy the ActionPolicyController is expecting, seems bizarre so will have to leave it alone and move on. Issue-ID: POLICY-2133 Change-Id: I80629d3b6f2aba301483f3fa8c3cad16cc01ffbe Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2019-10-10Checkstyle and some coveragePamela Dragosh1-1/+43
Address some trailing space from previous review. Mostly this was checkstyle issues of naming methods and variables, distance from usage, missing javadoc, 120 character spacing. Did add a few trivial code coverage tests. Issue-ID: POLICY-2133 Change-Id: I159d1b27429b6bef046092ea3a4045fbd3a1071c Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2019-10-08Cleanup POLICY-SDK-APP CheckPDPPamela Dragosh3-156/+148
Fixed sonar issues and added a small amount of code coverage. CheckPDP was renamed to comply with 2 consecutive capital letters. Various sonar issues done. Very difficult to get coverage on remaining area - over 82% anyway. RESTfulPAPEngine was updated to use the new renamed class and methods. Sonar issues were taken care of for the most part and added some coverage by consolidating the JUnit tests. Added in assertj as we will utilize that more throughout the repo. Issue-ID: POLICY-2133 Change-Id: Id0a9b050ebe373e155878699366d78df71bd0554 Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2019-10-07Use lombok for data objectsPamela Dragosh2-3/+27
Removing lines to see if this will bump coverage. Some sonar for Junit tests and missing coverage. My next task will be to re-use some of this duplicate code for these object types and the controllers. Trailing spaces for patch #3. Issue-ID: POLICY-2133 Change-Id: Iaee123c6be4b63bd831172340709fe7597feaa78 Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2019-10-07Format java POLICY-SDK-APPPamela Dragosh21-354/+341
As a result of doing command maven reformat, these files are now changed. Updated licenses. Issue-ID: POLICY-2133 Change-Id: I19a8dd70eb10c0d879b97635f7780ab7f92a1753 Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2019-08-23Fix license on updated engine filesJim Hahn2-2/+2
Address review comment about license date on updated junits. Change-Id: I5dd6e47be243d6f0d5a001cb5cfb45e7ac31f9c8 Issue-ID: POLICY-1937 Signed-off-by: Jim Hahn <jrh3@att.com>
2019-08-22Remove powermock to increase coverageJim Hahn2-15/+33
Removed powermock from the junit tests of these classes to increase reported sonar coverage: RESTfulPAPEngine BrmsGateway Typically added override methods to the classes under test, to replace the overrides originally provided by powermock. Also needed to add code to RESTfulPAPEngineTest to clear the XACML properties before the test ran. Modified to use the existing XACMLProperties.reloadProperties() method. Also modified PolicyNotificationMailTest to use a host/port that has no listener so that the test runs faster. Fixed some newly introduced sonar issues. Change-Id: I65e36b01e9506987032eb21baac808ed3dfd4f47 Issue-ID: POLICY-1937 Signed-off-by: Jim Hahn <jrh3@att.com>
2019-04-09Add Additional Junit and fix Sonar new bug.uj426b1-4/+4
Issue-ID: POLICY-1416 Signed-off-by: uj426b <uj426b@att.com> Change-Id: Ie4e6e91d555be448caa290bce36eb58075046619 Signed-off-by: uj426b <uj426b@att.com>
2019-04-08CLAMP Model policy creation supportuj426b1-84/+128
Change-Id: Ia69f061c078e4f6ed4b4d2cd12f03f58514f2123 Issue-ID: POLICY-1416 Signed-off-by: uj426b <uj426b@att.com>
2019-02-15Reformat POLICY-SDK-APP test caseskaihlavi19-2593/+2767
Reformat test cases to follow ONAP style https://wiki.onap.org/display/DW/Java+code+style Format changes mainly consist of conversions of tabs to 4 spaces Samsung modifications copyrights added Change-Id: I60b666d879960c80c80f8b1c41fc98fd0703f4d4 Issue-ID: POLICY-1506 Signed-off-by: kaihlavi <l.kaihlavirt@partner.samsung.com>
2018-09-17Added validation on matching required fieldsWang,Frank(gw1218)1-56/+65
Import policy should report to end users if there are missing required matching fields in policy template. Issue-ID: POLICY-1117 Change-Id: Iac4485259b73784e641f42a22d5a12c524f4b8e2 Signed-off-by: Wang,Frank(gw1218) <gw1218@att.com> Signed-off-by: Wang, Frank(gw1218) <gw1218@att.com>
2018-08-14Junit Coverage for Import Black List Entriesrb71471-68/+36
Issue-ID: POLICY-901 Change-Id: I3776d3c4ed01bb27ed930c074c370361e33b100a Signed-off-by: rb7147 <rb7147@att.com>
2018-08-14Resolved the Sonar issuesrb71471-67/+67
Issue-ID: POLICY-901 Change-Id: I30e1d075dd8eb4739bcb5aa1f2503a016900ff75 Signed-off-by: rb7147 <rb7147@att.com>
2018-07-24Decision BlackList Guard Enhancementsrb71471-0/+126
While creating a decision Bl Guard Policy we are allowing to add Blacklist entries through file upload for bulk from GUI. Issue-ID: POLICY-901 Change-Id: I4031fd4a96937b9facc330cecf72777d701d4678 Signed-off-by: rb7147 <rb7147@att.com>
2018-04-02Support CSIT tests for OOF PolicyMichael Mokry1-2/+6
I added an INSERT to the sql upgrade file and some sonar fixes and Junits Change-Id: I37139d5a8ad78d9d46ee01f81c2edd052672712e Issue-ID: POLICY-639 Signed-off-by: Michael Mokry <mm117s@att.com>
2018-03-26New Optimization PolicyMichael Mokry2-87/+465
This is the new Optimization Policy to support the Integration of the OOF Policy Model into the Policy Platform. Added changes from Frank Wang to fix the following issues with existing Model Parser: 1. TOSCA Rendering issues 2. Matching Attributes support 3. ImportModelAPI to support TOSCA model upload via REST API Running local Sonar tonight to start fixing Sonar issues Added changes per review comments and fixed Sonar issues Change-Id: Ia8ce09c28a718ce4460475e76a750caef774bd6b Issue-ID: POLICY-622 Signed-off-by: Michael Mokry <mm117s@att.com>
2018-03-23JUnit additions for PAP-REST,RESTbobbymander1-2/+7
Issue-ID: POLICY-603 Change-Id: Id7d2c1a835d028e88337db67d55f139aa1764826 Signed-off-by: bobbymander <bobby.mander@att.com>
2018-03-21JUnit additions for PDP-REST,REST,SDK-APPbobbymander1-0/+41
Issue-ID: POLICY-584 Change-Id: I3b16e2a957e67ecfe5c28d2afaa09771ae891216 Signed-off-by: bobbymander <bobby.mander@att.com>
2018-03-16JUnit additions for SDK-APPbobbymander1-33/+76
Issue-ID: POLICY-604 Change-Id: I2e2cdb3037a70af7d8d85a4a6274b3e361510bc1 Signed-off-by: bobbymander <bobby.mander@att.com>
2018-03-15JUnit addition for SDK-APPbobbymander1-0/+117
Issue-ID: POLICY-604 Change-Id: I9abc8418ddab1f487385c38c0424db601f8746e2 Signed-off-by: bobbymander <bobby.mander@att.com>
2018-03-14JUnit addition for SDK-APPbobbymander1-0/+164
Issue-ID: POLICY-604 Change-Id: Ib48f22dfe0db68348cb820d4186e7d3a79864b3f Signed-off-by: bobbymander <bobby.mander@att.com>
2018-03-13Merge "JUnit additions for PAP-REST,SDK-APP"Jorge Hernandez1-0/+41
2018-03-13JUnit additions for PAP-REST,SDK-APPbobbymander1-0/+41
Issue-ID: POLICY-600 Change-Id: Ie2a3257e26382f68d8cb008dc5ac512d6ac49c8b Signed-off-by: bobbymander <bobby.mander@att.com>
2018-03-13Fixed the SDK Junits and cleaned unused coderb71471-0/+3
Moved file tmp object from try resources block. due to not closing the stream the inputstream read by xacmlpolicyscanner ended with premature file error. Cleaned unused code. Issue-ID: POLICY-584 Change-Id: I92c4d000d94a144736d9ac46db384785a7512593 Signed-off-by: rb7147 <rb7147@att.com>
2018-03-08JUnit additions for BRMS,POLICY-SDK-APPbobbymander2-0/+182
Issue-ID: POLICY-598 Change-Id: Ic3d9ca2a5f6c29f772bd747612d6c7caeb15eb7f Signed-off-by: bobbymander <bobby.mander@att.com>
2018-03-06Added Junits for POLICY-SDK-APPrb71471-4/+88
Issue-ID: POLICY-600 Change-Id: Ib96b7ccede0fa09e71f02ff073c89682e9aa7089 Signed-off-by: rb7147 <rb7147@att.com>
2018-02-27Merge "JUnit additions for XACML,REST,POLICY-SDK"Jorge Hernandez1-0/+64
2018-02-27JUnit additions for XACML,REST,POLICY-SDKbobbymander1-0/+64
Issue-ID: POLICY-584 Change-Id: I4bb91b18122c7f61bb71b1a9e39d51cd65af70bd Signed-off-by: bobbymander <bobby.mander@att.com>
2018-02-27Code Clean Up for Policy PAP-RESTrb71472-7/+2
Cleaned the duplicate code for all dictionary controllers and created Utils class. Issue-ID: POLICY-600 Change-Id: I65b8574d9f667758407515a5c55bc28f636be477 Signed-off-by: rb7147 <rb7147@att.com>
2018-02-21Added Junits for POLICY-SDK-APP controllersuj426b2-0/+233
Issue-ID: POLICY-584 Change-Id: I306f3484f466accf11ca4fd59864a4b402dcb733 Signed-off-by: uj426b <uj426b@att.com>
2018-02-16Resolved the POLICY-SDK-APP junit issue.uj426b1-28/+23
Issue-ID: POLICY-584 Change-Id: I90aaec29e908b742f0866d2754d426f75e1b8953 Signed-off-by: uj426b <uj426b@att.com>
2018-01-31Adding code coverage reduce duplicate linesPamela Dragosh1-3/+38
Removed some duplicate code across some of the classes. For CheckPDP, got the code coverage above 80%. Issue-ID: POLICY-482 Change-Id: I41495cf9f92e8fd248350bf33f5a183c876f38f2 Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2018-01-26Use try-with-resourcesPamela Dragosh1-0/+35
Also enhanced JUnit tests to ensure this will work. Reduced code. Issue-ID: POLICY-482 Change-Id: If07e17df274bdb709f7ca60078bd1fbd78d1aaaa Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2017-12-08Upgraded the latest ONAP SDKrb71475-7/+18
Upgraded latest ONAP SDK Code. Change-Id: I669d6cfcefe068b1e4c078889d7d6c77ce788e2e Issue-ID: POLICY-432 Signed-off-by: rb7147 <rb7147@att.com>
2017-10-31Merge "Fixed TOSCA parsing bugs"Jorge Hernandez1-5/+1
2017-10-31Fixed TOSCA parsing bugsguangxingwang1-5/+1
Fixed TOSCA paring bugs and retuned error messages to front-end. Issue-ID: POLICY-405 Change-Id: Idc6efd062360acbb4ceb143af8619b5f7def723a Signed-off-by: guangxingwang <gw1218@att.com>
2017-09-21Added Junits for POLICY-SDK-APPrb71476-21/+421
Issue-Id: POLICY-52 Change-Id: I439c95736f50fe9140e71cad5a598c5b5239161b Signed-off-by: rb7147 <rb7147@att.com>
2017-09-19Added Junits for POLICY-SDK-APPrb71474-22/+158
Issue-Id: POLICY-52 Change-Id: Ic13cc5a6a32e65e301f1dcdc437f1de8ba6c00d8 Signed-off-by: rb7147 <rb7147@att.com>
2017-08-14Add fix for SQL injection.Rodriguez, Cuauhtemoctzin (cr056n)3-14/+402
Add fix for SQL injection by passing parameters into getDataByQuery method and binding parameters. Add junit test file. Override equals and hashcode methods for more thorough testing on ActionBodyEntity, ConfigurationDataEntity, PolicyEntity, PolicyVersion, WatchPolicyNotificationTable classes. Issue-Id: [POLICY-158] Change-Id: Icebe1ca1ff01c8ea7435729967f4d349a1026054 Signed-off-by: ITSERVICES\cr056n <cr056n@att.com>
2017-08-10Fix console issuesTej, Tarun2-2/+2
Reverted package names to org.openecomp to fix portal issues Issue-ID: POLICY-144 Change-Id: Ie108db431b9d211b15c59a29e564517c785e0da5 Signed-off-by: Tarun Tej Velaga <tt3868@att.com>
2017-07-31[POLICY-73] replace openecomp for policy-engineGuo Ruijing5-48/+48
Change-Id: I54072f6bcd388c0e05562614ee89b4ae7ad67004 Signed-off-by: Guo Ruijing <ruijing.guo@intel.com> Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2017-07-26[POLICY-117] Resolve the Policy Critical issuesrb71472-1/+11
Change-Id: Ice72d7fa40151bff5db42f5dd632f04a3853b094 Signed-off-by: rb7147 <rb7147@att.com>
2017-07-25[Policy-52, Policy-92, Policy-93] Policy Enhancements and bugfixesTarun Tej Velaga3-11/+448
Change-Id: I5675cf4527e17963b3142cf7184c0df31a766197 Signed-off-by: Tarun Tej Velaga <tt3868@att.com>
2017-07-17[Policy-68] Tosca parsing for nested objectsPerichiappan, Lakshmanan (lp576d)1-3/+2
Change-Id: I380fa82259c51fa532de5d39ac256e5a5ebf1e07 Signed-off-by: Perichiappan, Lakshmanan (lp576d) <lp576d@us.att.com>
2017-05-31[Policy-17] Removed the sql scripts from sdk appRavindra Bakkamanthala5-0/+1040
Change-Id: I5b017aad569014c7f12eab35e1dbd1c215f90ebe Signed-off-by: Ravindra Bakkamanthala <rb7147@att.com>