aboutsummaryrefslogtreecommitdiffstats
path: root/models-interactions/model-impl/events/src/test
AgeCommit message (Collapse)AuthorFilesLines
2020-08-25Address more sonar issues in policy-modelsJim Hahn1-5/+2
Addressed sonar issues: - diamond operator Also removed a number of the "NOSONAR" comments now that we know how to address them without disabling sonar. Issue-ID: POLICY-2714 Change-Id: I440f4fa955968fd911616c2b6ee61b4b4d013821 Signed-off-by: Jim Hahn <jrh3@att.com>
2020-07-21Fix some sonars in policy-modelsJim Hahn1-5/+8
Fixed the following sonar issues in some of the project directories: - use assertNull, assertEquals, etc. - swap assertEquals arguments - extract a constant - don't invoke toString() in logger calls - TODOs - generic types Issue-ID: POLICY-2714 Change-Id: Id8803f9bf617ea9fc173a67b8606600709b55bdc Signed-off-by: Jim Hahn <jrh3@att.com>
2020-04-07Address sonar issues in modelsJim Hahn1-38/+0
Addressed the following sonar issues: - use RE2 instead of java.util Pattern for "+" and "*" - don't use deprecated methods - for Date(long), sonar appeared not to parse the argument's type correctly. Modified the code slightly to make sonar happy - duplicate blocks of code - either log or throw - missing assert in junit - for SDNR & VFC, eliminated threads, as they are unnecessary - duplicate code block in different branches - useless assignments - redeclaring abstract methods - cyclomatic complexity - used lombok in some cases (e.g., EqualsAndHashCode) - assert argument order - actually deleted ControlLoopTargetType, because it is not needed and sonar complains regardless of which order is used - add private constructor to utility classes - use StandardCharsets instead of literals Also: - added logback-test.xml to SO to eliminate the voluminous output from the junit test Issue-ID: POLICY-2305 Change-Id: I586c331781bedbd54a115a71847d04d293689445 Signed-off-by: Jim Hahn <jrh3@att.com>
2020-04-03Models junits are failing locallyJim Hahn4-6/+6
Junits were failing in my local eclipse environment. Fixed the following: - more cases of "is marked @NonNull but is null" (I thought Liam had already fixed all of these, but I'm still seeing errors, so fixed some more) - comparing "Instant" values in event time stamps assumes that the times will be different, but may not be, if the JVM is fast enough. Modified the test to set the times of the new events to Instant+1, to ensure that they are different from the original Issue-ID: POLICY-2305 Change-Id: Ic05bc6a58b559ba589583ce887711ee01f76691c Signed-off-by: Jim Hahn <jrh3@att.com>
2020-03-19Misc simple sonar issue fixesChris Ramstad1-5/+5
Issue-ID: POLICY-2389 Signed-off-by: Chris Ramstad <cramstad@ciena.com> Change-Id: I7ce91e331a128aaadaab5ac837e19873a3388164
2020-01-16Added Time agnostic Onset and Abated classesjhh4-0/+229
These classes can be used for comparison of alarm skeletons independently of the time at which they were produced. Issue-ID: POLICY-2323 Signed-off-by: jhh <jorge.hernandez-herrero@att.com> Change-Id: I85b9d6a429de56f056eb0a6caa9e4f90fbd68918 Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
2020-01-09Remove ControlLoopParams.jhh1-51/+0
This class is only useful in drools-applications repo. Issue-ID: POLICY-2146 Signed-off-by: jhh <jorge.hernandez-herrero@att.com> Change-Id: Ifbf281a3742950c3cad2c5b56689122dd766b41a
2019-11-04PNF support changes in policy/modelsRashmi Pujar1-0/+1
AAI Enrichment method for PNF target-type and unit tests. Addition of a hashmap field to ControlLoopEvent class to hold event specific parameters. Update CDS actor to include additional event parameters Issue-ID: POLICY-1187 Signed-off-by: Rashmi Pujar <rashmi.pujar@bell.ca> Change-Id: Ie0ceb320943531de6e6bc8675844b29a358dfb7e
2019-11-01Fix Checkstyle issues in policy-modelsliamfallon1-1/+0
Some minor checkstyle issues were introduced into policy-models by recent reviews. Issue-ID: POLICY-2088 Change-Id: I84af19926432081d72e2054af788cdc35850a99c Signed-off-by: liamfallon <liam.fallon@est.tech>
2019-10-24Changes in preparation for the m2 modelStraubs, Ralph (rs8887)3-9/+7
1) Replace enum 'ControlLoopTargetType' with 'String' -- symbols such as 'ControlLoopTargetType.VM' still work, but now expand into a String. This gives the ability to add new application-specific types. 2) Move 'ControlLoopEvent.payload' to 'VirtualControlLoopEvent'. This symbol isn't common to all 'ControlLoopEvent' types, and this definition collides with a 'payload' defined in our application. 3) Add 'RestManager.patch(...)', which performs a REST patch. 4) Add lombok getters and setters 5) Remove trailing spaces 6) Fix order of arguments in 'assertEquals' in 'ControlLoopTargetTypeTest' 7) Update Junit tests in 'RestTest' to include 'RestManager.patch(...)' Issue-ID: POLICY-1948 Signed-off-by: Straubs, Ralph (rs8887) <rs8887@att.com> Change-Id: I08e04ea3cbcf368c760b630bcfe23a4370cf94dc
2019-06-17Fix simple sonar issues in modelsJim Hahn2-7/+7
Added @FunctionalInterface where needed. Replaced anonymous classes with lambda expressions. Replaced duplicate strings with a constant. Removed unused BeforeClass & AfterClass test methods. Removed some trailing spaces. Fixed: aai actor.appc actor.appclcm actor.sdnc actor.sdnr actor.so actor.vfc actorServiceProvider appc appclcm cds events Change-Id: I0e21cbb10db6d1217bbd0e00e6dd4fac3eb84e31 Issue-ID: POLICY-1791 Signed-off-by: Jim Hahn <jrh3@att.com>
2019-04-08Code changes for OOF SON Use CasePamela Dragosh1-0/+66
Companian review to https://gerrit.onap.org/r/#/c/84361/ Issue-ID: POLICY-1463 Change-Id: I2640f01c07890a4b1e8938175b637b84dcc19f3c Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2019-03-25migrate model-impl from drools-applicationsHengye12-0/+725
migrate controlloop/common/model-impl from drools-applicaitons to policy/models Issue-ID: POLICY-1264 Change-Id: Ibe0bb5c49a7b1344f4104b30455f52834041e187 Signed-off-by: Hengye <yehui.wang@est.tech>