summaryrefslogtreecommitdiffstats
path: root/models-interactions/model-actors/actor.test/src/test
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-interactions/model-actors/actor.test/src/test
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-interactions/model-actors/actor.test/src/test')
-rw-r--r--models-interactions/model-actors/actor.test/src/test/java/org/onap/policy/controlloop/actor/test/BasicActorTest.java7
1 files changed, 5 insertions, 2 deletions
diff --git a/models-interactions/model-actors/actor.test/src/test/java/org/onap/policy/controlloop/actor/test/BasicActorTest.java b/models-interactions/model-actors/actor.test/src/test/java/org/onap/policy/controlloop/actor/test/BasicActorTest.java
index ef9b37ba6..65ab0bbb3 100644
--- a/models-interactions/model-actors/actor.test/src/test/java/org/onap/policy/controlloop/actor/test/BasicActorTest.java
+++ b/models-interactions/model-actors/actor.test/src/test/java/org/onap/policy/controlloop/actor/test/BasicActorTest.java
@@ -2,7 +2,7 @@
* ============LICENSE_START=======================================================
* ONAP
* ================================================================================
- * Copyright (C) 2020 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2020-2021 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -23,6 +23,7 @@ package org.onap.policy.controlloop.actor.test;
import static org.assertj.core.api.Assertions.assertThatIllegalArgumentException;
import static org.assertj.core.api.Assertions.assertThatThrownBy;
+import java.io.FileNotFoundException;
import org.junit.Test;
public class BasicActorTest extends BasicActor {
@@ -42,6 +43,8 @@ public class BasicActorTest extends BasicActor {
.isThrownBy(() -> verifyActorService(DummyActor.NAME, "serviceMissingActors.yaml"));
// config file not found
- assertThatThrownBy(() -> verifyActorService(DummyActor.NAME, "file-not-found.yaml"));
+ assertThatThrownBy(() -> verifyActorService(DummyActor.NAME, "file-not-found.yaml"))
+ .isInstanceOf(IllegalArgumentException.class)
+ .hasCauseInstanceOf(FileNotFoundException.class);
}
}