From b477554c29b2d666e7bb0bc860afacc6e935c337 Mon Sep 17 00:00:00 2001 From: liamfallon Date: Tue, 18 Feb 2020 16:14:59 +0000 Subject: Add safe entity delete, fix multiple entity get This review implements checks on whether entities are being used or referenced propr to allowing deletes. The review also fixes bugs on multiple entity get returning 4040 not found Issue-ID: POLICY-1402 Change-Id: I9cebb9a873098740e9ff4be6284d6307e19838bd Signed-off-by: liamfallon --- .../models/pdp/persistence/concepts/JpaPdpStatisticsTest.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'models-pdp/src/test') diff --git a/models-pdp/src/test/java/org/onap/policy/models/pdp/persistence/concepts/JpaPdpStatisticsTest.java b/models-pdp/src/test/java/org/onap/policy/models/pdp/persistence/concepts/JpaPdpStatisticsTest.java index 0b22e1b3e..edef2975e 100644 --- a/models-pdp/src/test/java/org/onap/policy/models/pdp/persistence/concepts/JpaPdpStatisticsTest.java +++ b/models-pdp/src/test/java/org/onap/policy/models/pdp/persistence/concepts/JpaPdpStatisticsTest.java @@ -29,6 +29,7 @@ import static org.junit.Assert.assertTrue; import java.util.ArrayList; import java.util.Date; + import org.junit.Test; import org.onap.policy.models.base.PfTimestampKey; import org.onap.policy.models.base.PfValidationResult; @@ -43,11 +44,9 @@ public class JpaPdpStatisticsTest { public void testConstructor() { assertThatThrownBy(() -> new JpaPdpStatistics((PfTimestampKey) null)).hasMessageContaining("key"); - assertThatThrownBy(() -> new JpaPdpStatistics((JpaPdpStatistics) null)) - .hasMessageContaining("copyConcept"); + assertThatThrownBy(() -> new JpaPdpStatistics((JpaPdpStatistics) null)).hasMessageContaining("copyConcept"); - assertThatThrownBy(() -> new JpaPdpStatistics((PdpStatistics) null)) - .hasMessageContaining("authorativeConcept"); + assertThatThrownBy(() -> new JpaPdpStatistics((PdpStatistics) null)).hasMessageContaining("authorativeConcept"); assertNotNull(new JpaPdpStatistics()); assertNotNull(new JpaPdpStatistics(new PfTimestampKey())); -- cgit 1.2.3-korg