summaryrefslogtreecommitdiffstats
path: root/models-provider/src
diff options
context:
space:
mode:
authorJim Hahn <jrh3@att.com>2021-02-10 16:17:10 -0500
committerJim Hahn <jrh3@att.com>2021-02-10 17:17:34 -0500
commitb7097d21c25a48c9d209548ac8afdc09b1679457 (patch)
treeee7a911622c333818a9ac30f2cae68aee7eb6601 /models-provider/src
parentf04d89c55ab4dfa94dfed1cc9b65471d1d3140c5 (diff)
More sonars in models
Addressed the following: - make constructors protected - check exception type - too many assertions - remove annotation lists - use "<>" - reduce cognitive complexity - extract constant - multiple method calls in one assert - don't use eq() in verify() - indentation Issue-ID: POLICY-2905 Change-Id: I25bb3951f781250e9cdfe8f5f3b80cb63e129184 Signed-off-by: Jim Hahn <jrh3@att.com>
Diffstat (limited to 'models-provider/src')
-rw-r--r--models-provider/src/test/java/org/onap/policy/models/provider/impl/DatabasePolicyModelsProviderTest.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/models-provider/src/test/java/org/onap/policy/models/provider/impl/DatabasePolicyModelsProviderTest.java b/models-provider/src/test/java/org/onap/policy/models/provider/impl/DatabasePolicyModelsProviderTest.java
index 596f9fa0d..4f574906a 100644
--- a/models-provider/src/test/java/org/onap/policy/models/provider/impl/DatabasePolicyModelsProviderTest.java
+++ b/models-provider/src/test/java/org/onap/policy/models/provider/impl/DatabasePolicyModelsProviderTest.java
@@ -299,7 +299,7 @@ public class DatabasePolicyModelsProviderTest {
assertTrue(databaseProvider.getPolicyTypeList(NAME, VERSION_100).isEmpty());
assertThatThrownBy(
- () -> databaseProvider.getFilteredPolicyTypes(ToscaEntityFilter.<ToscaPolicyType>builder().build()))
+ () -> databaseProvider.getFilteredPolicyTypes(ToscaEntityFilter.<ToscaPolicyType>builder().build()))
.hasMessage("service template not found in database");
assertTrue(databaseProvider.getFilteredPolicyTypeList(ToscaEntityFilter.<ToscaPolicyType>builder().build())
@@ -322,7 +322,7 @@ public class DatabasePolicyModelsProviderTest {
assertTrue(databaseProvider.getPolicyList(NAME, VERSION_100).isEmpty());
assertThatThrownBy(
- () -> databaseProvider.getFilteredPolicies(ToscaTypedEntityFilter.<ToscaPolicy>builder().build()))
+ () -> databaseProvider.getFilteredPolicies(ToscaTypedEntityFilter.<ToscaPolicy>builder().build()))
.hasMessage("service template not found in database");
assertTrue(databaseProvider.getFilteredPolicyList(ToscaTypedEntityFilter.<ToscaPolicy>builder().build())