diff options
author | uj426b <uj426b@att.com> | 2020-07-31 12:06:01 -0400 |
---|---|---|
committer | Pamela Dragosh <pdragosh@research.att.com> | 2020-08-20 12:23:26 +0000 |
commit | dbb37442ecf243d3bcaf50f908691ad6f810ccfc (patch) | |
tree | 98663790800976a1785b1d127a9fb677712c0759 /models-dao/src/test/java | |
parent | e88e4b3281fa4881093ccd1dfae8f826a5e9ff5a (diff) |
Sonar Fixes policy/models, removing model-yaml
Change-Id: Icd82ea1aef90e4d638b13958519aac5ed5a53f73
Issue-ID: POLICY-2714
Signed-off-by: uj426b <uj426b@att.com>
Diffstat (limited to 'models-dao/src/test/java')
-rw-r--r-- | models-dao/src/test/java/org/onap/policy/models/dao/EntityTest.java | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/models-dao/src/test/java/org/onap/policy/models/dao/EntityTest.java b/models-dao/src/test/java/org/onap/policy/models/dao/EntityTest.java index 433196421..040b76b9b 100644 --- a/models-dao/src/test/java/org/onap/policy/models/dao/EntityTest.java +++ b/models-dao/src/test/java/org/onap/policy/models/dao/EntityTest.java @@ -26,7 +26,6 @@ import static org.assertj.core.api.Assertions.assertThatThrownBy; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertNull; -import static org.junit.Assert.assertTrue; import java.util.ArrayList; import java.util.Date; @@ -184,13 +183,13 @@ public class EntityTest { pfDao.create(keyInfo0); final DummyConceptEntity keyInfoBack0 = pfDao.get(DummyConceptEntity.class, aKey0); - assertTrue(keyInfo0.equals(keyInfoBack0)); + assertEquals(keyInfo0, keyInfoBack0); final DummyConceptEntity keyInfoBackNull = pfDao.get(DummyConceptEntity.class, PfConceptKey.getNullKey()); assertNull(keyInfoBackNull); final DummyConceptEntity keyInfoBack1 = pfDao.getConcept(DummyConceptEntity.class, aKey0); - assertTrue(keyInfoBack0.equals(keyInfoBack1)); + assertEquals(keyInfoBack0, keyInfoBack1); final DummyConceptEntity keyInfoBack2 = pfDao.getConcept(DummyConceptEntity.class, new PfConceptKey("A-KEY3", VERSION001)); @@ -205,12 +204,12 @@ public class EntityTest { Set<DummyConceptEntity> keyInfoSetOut = new TreeSet<>(pfDao.getAll(DummyConceptEntity.class)); keyInfoSetIn.add(keyInfo0); - assertTrue(keyInfoSetIn.equals(keyInfoSetOut)); + assertEquals(keyInfoSetIn, keyInfoSetOut); pfDao.delete(keyInfo1); keyInfoSetIn.remove(keyInfo1); keyInfoSetOut = new TreeSet<>(pfDao.getAll(DummyConceptEntity.class)); - assertTrue(keyInfoSetIn.equals(keyInfoSetOut)); + assertEquals(keyInfoSetIn, keyInfoSetOut); pfDao.deleteCollection(keyInfoSetIn); keyInfoSetOut = new TreeSet<>(pfDao.getAll(DummyConceptEntity.class)); @@ -221,7 +220,7 @@ public class EntityTest { keyInfoSetIn.add(keyInfo0); pfDao.createCollection(keyInfoSetIn); keyInfoSetOut = new TreeSet<>(pfDao.getAll(DummyConceptEntity.class)); - assertTrue(keyInfoSetIn.equals(keyInfoSetOut)); + assertEquals(keyInfoSetIn, keyInfoSetOut); pfDao.delete(DummyConceptEntity.class, aKey0); keyInfoSetOut = new TreeSet<>(pfDao.getAll(DummyConceptEntity.class)); @@ -243,7 +242,7 @@ public class EntityTest { keyInfoSetIn.add(keyInfo0); pfDao.createCollection(keyInfoSetIn); keyInfoSetOut = new TreeSet<>(pfDao.getAll(DummyConceptEntity.class)); - assertTrue(keyInfoSetIn.equals(keyInfoSetOut)); + assertEquals(keyInfoSetIn, keyInfoSetOut); pfDao.deleteAll(DummyConceptEntity.class); assertEquals(0, pfDao.size(DummyConceptEntity.class)); |