aboutsummaryrefslogtreecommitdiffstats
path: root/feature-lifecycle/src/test
diff options
context:
space:
mode:
authorJim Hahn <jrh3@att.com>2020-08-25 17:05:37 -0400
committerJim Hahn <jrh3@att.com>2020-08-25 18:47:23 -0400
commit72cf248dced4e272e69a8c48f5ee24c9d345f41d (patch)
treeb09ed0f9b7ee7aac6493119d950d78d50ae08da1 /feature-lifecycle/src/test
parent5c71b5a62f4208030b3c3cd18b3f42398a0a86e5 (diff)
Address more sonars in drools-pdp
Addressed the following sonars: - either log or rethrow - call "remove()" for thread-local-storage - use assertEquals - only one method call in exception test - swap arguments in assertEquals - add assertion to assertThatThrownBy() - explain @Ignore Also addressed eclipse warnings: - unused fields and methods Issue-ID: POLICY-2616 Change-Id: I6590c0d2b103885bc933014d48bf5fd92401cd80 Signed-off-by: Jim Hahn <jrh3@att.com>
Diffstat (limited to 'feature-lifecycle/src/test')
-rw-r--r--feature-lifecycle/src/test/java/org/onap/policy/drools/lifecycle/LifecycleStateUnsupportedTest.java9
1 files changed, 6 insertions, 3 deletions
diff --git a/feature-lifecycle/src/test/java/org/onap/policy/drools/lifecycle/LifecycleStateUnsupportedTest.java b/feature-lifecycle/src/test/java/org/onap/policy/drools/lifecycle/LifecycleStateUnsupportedTest.java
index 1b7c62a3..400aa169 100644
--- a/feature-lifecycle/src/test/java/org/onap/policy/drools/lifecycle/LifecycleStateUnsupportedTest.java
+++ b/feature-lifecycle/src/test/java/org/onap/policy/drools/lifecycle/LifecycleStateUnsupportedTest.java
@@ -90,19 +90,22 @@ public abstract class LifecycleStateUnsupportedTest {
@Test
public void update() {
- assertThatThrownBy(() -> state.update(new PdpUpdate()))
+ PdpUpdate update = new PdpUpdate();
+ assertThatThrownBy(() -> state.update(update))
.isInstanceOf(UnsupportedOperationException.class);
}
@Test
public void stateChange() {
- assertThatThrownBy(() -> state.stateChange(new PdpStateChange()))
+ PdpStateChange change = new PdpStateChange();
+ assertThatThrownBy(() -> state.stateChange(change))
.isInstanceOf(UnsupportedOperationException.class);
}
@Test
public void changeState() {
- assertThatThrownBy(() -> state.transitionToState(new LifecycleStateActive(new LifecycleFsm())))
+ LifecycleStateActive active = new LifecycleStateActive(new LifecycleFsm());
+ assertThatThrownBy(() -> state.transitionToState(active))
.isInstanceOf(UnsupportedOperationException.class);
}
}