diff options
author | Jim Hahn <jrh3@att.com> | 2021-07-28 09:48:00 -0400 |
---|---|---|
committer | Jim Hahn <jrh3@att.com> | 2021-07-28 10:19:25 -0400 |
commit | d57b30c68b030f7960d1aa7fe4f3632e55cef4cc (patch) | |
tree | 73b021b450bfc0935135c74b4ded5df9d65abc4f /models-pdp/src/test | |
parent | 9a3996ce25be50c01c644efcac075a056de37451 (diff) |
Add junit test for empty statistics filter
Also removed the version field from the filter, as it is not applicable
to the PDP instance name.
Issue-ID: POLICY-3511
Change-Id: I17e8d2d6646a27736a827b9e9e17881d6b0a3795
Signed-off-by: Jim Hahn <jrh3@att.com>
Diffstat (limited to 'models-pdp/src/test')
-rw-r--r-- | models-pdp/src/test/java/org/onap/policy/models/pdp/persistence/provider/PdpStatisticsProviderTest.java | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/models-pdp/src/test/java/org/onap/policy/models/pdp/persistence/provider/PdpStatisticsProviderTest.java b/models-pdp/src/test/java/org/onap/policy/models/pdp/persistence/provider/PdpStatisticsProviderTest.java index 57f364336..90b85b5ae 100644 --- a/models-pdp/src/test/java/org/onap/policy/models/pdp/persistence/provider/PdpStatisticsProviderTest.java +++ b/models-pdp/src/test/java/org/onap/policy/models/pdp/persistence/provider/PdpStatisticsProviderTest.java @@ -195,6 +195,11 @@ public class PdpStatisticsProviderTest { List<PdpStatistics> getPdpStatisticsList; + // empty filter - should return everything + getPdpStatisticsList = new PdpStatisticsProvider().getFilteredPdpStatistics(pfDao, PdpFilterParameters + .builder().build()); + verifyEquals(getPdpStatisticsList, List.of(pdpStatistics11, pdpStatistics12, pdpStatistics22, pdpStatistics31)); + // match on name - returns multiple records getPdpStatisticsList = new PdpStatisticsProvider().getFilteredPdpStatistics(pfDao, PdpFilterParameters .builder().name(NAME).group(GROUP).startTime(TIMESTAMP1).endTime(TIMESTAMP2).build()); |