From 07be24fc1c3b87f6aae0d52a26283ec18d33e772 Mon Sep 17 00:00:00 2001 From: Jim Hahn Date: Fri, 23 Jul 2021 15:14:12 -0400 Subject: Remove unused statistics methods The getPdpStatistics method should be removed as they're functionality has been subsumed by getFilteredPdpStatistics. Issue-ID: POLICY-3511 Change-Id: I98da98ac483705bea46ebaa0619257195be6b518 Signed-off-by: Jim Hahn --- .../provider/PdpStatisticsProviderTest.java | 39 ---------------------- 1 file changed, 39 deletions(-) (limited to 'models-pdp/src/test/java/org/onap') 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 b308dbdcd..57f364336 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 @@ -186,45 +186,6 @@ public class PdpStatisticsProviderTest { .hasMessageContaining(Validated.IS_A_NULL_KEY); } - @Test - public void testGetPdpStatisticsName() throws Exception { - assertThatThrownBy(() -> { - new PdpStatisticsProvider().createPdpStatistics(null, null); - }).hasMessageMatching(DAO_IS_NULL); - assertThatThrownBy(() -> { - new PdpStatisticsProvider().getPdpStatistics(null, null); - }).hasMessageMatching(DAO_IS_NULL); - - List getPdpStatisticsList = new PdpStatisticsProvider().getPdpStatistics(pfDao, NAME); - verifyEquals(getPdpStatisticsList, List.of(pdpStatistics12, pdpStatistics11)); - - // name is null - getPdpStatisticsList = new PdpStatisticsProvider().getPdpStatistics(pfDao, null); - verifyEquals(getPdpStatisticsList, List.of(pdpStatistics12, pdpStatistics22, pdpStatistics11, pdpStatistics31)); - } - - @Test - public void testGetPdpStatisticsNameTimestamp() throws Exception { - assertThatThrownBy(() -> { - new PdpStatisticsProvider().createPdpStatistics(null, null); - }).hasMessageMatching(DAO_IS_NULL); - assertThatThrownBy(() -> { - new PdpStatisticsProvider().getPdpStatistics(null, null, null); - }).hasMessageMatching(DAO_IS_NULL); - - List getPdpStatisticsList; - getPdpStatisticsList = new PdpStatisticsProvider().getPdpStatistics(pfDao, NAME, TIMESTAMP1); - verifyEquals(getPdpStatisticsList, List.of(pdpStatistics11)); - - // name is null - getPdpStatisticsList = new PdpStatisticsProvider().getPdpStatistics(pfDao, null, TIMESTAMP1); - verifyEquals(getPdpStatisticsList, List.of(pdpStatistics11, pdpStatistics31)); - - // timestamp is null - getPdpStatisticsList = new PdpStatisticsProvider().getPdpStatistics(pfDao, NAME, null); - verifyEquals(getPdpStatisticsList, List.of(pdpStatistics11, pdpStatistics12)); - } - @Test public void testGetFilteredPdpStatistics() throws Exception { -- cgit 1.2.3-korg