summaryrefslogtreecommitdiffstats
path: root/feature-lifecycle/src
diff options
context:
space:
mode:
Diffstat (limited to 'feature-lifecycle/src')
-rw-r--r--feature-lifecycle/src/test/java/org/onap/policy/drools/lifecycle/LifecycleStateActiveTest.java12
-rw-r--r--feature-lifecycle/src/test/java/org/onap/policy/drools/lifecycle/LifecycleStatePassiveTest.java12
-rw-r--r--feature-lifecycle/src/test/java/org/onap/policy/drools/lifecycle/LifecycleStateTerminatedTest.java22
-rw-r--r--feature-lifecycle/src/test/java/org/onap/policy/drools/server/restful/RestLifecycleManagerTest.java4
4 files changed, 25 insertions, 25 deletions
diff --git a/feature-lifecycle/src/test/java/org/onap/policy/drools/lifecycle/LifecycleStateActiveTest.java b/feature-lifecycle/src/test/java/org/onap/policy/drools/lifecycle/LifecycleStateActiveTest.java
index 2a258305..7fc7fd29 100644
--- a/feature-lifecycle/src/test/java/org/onap/policy/drools/lifecycle/LifecycleStateActiveTest.java
+++ b/feature-lifecycle/src/test/java/org/onap/policy/drools/lifecycle/LifecycleStateActiveTest.java
@@ -84,7 +84,7 @@ public class LifecycleStateActiveTest extends LifecycleStateRunningTest {
}
@Test
- public void start() {
+ public void testStart() {
assertActive();
assertFalse(fsm.start());
assertActive();
@@ -101,7 +101,7 @@ public class LifecycleStateActiveTest extends LifecycleStateRunningTest {
}
@Test
- public void stop() {
+ public void testStop() {
assertTrue(fsm.stop());
assertBasicTerminated();
@@ -116,7 +116,7 @@ public class LifecycleStateActiveTest extends LifecycleStateRunningTest {
}
@Test
- public void shutdown() {
+ public void testShutdown() {
fsm.shutdown();
assertBasicTerminated();
@@ -126,7 +126,7 @@ public class LifecycleStateActiveTest extends LifecycleStateRunningTest {
}
@Test
- public void status() {
+ public void testStatus() {
waitUntil(fsm.getStatusTimerSeconds() + 1, TimeUnit.SECONDS, isStatus(PdpState.ACTIVE));
int preCount = fsm.client.getSink().getRecentEvents().length;
@@ -142,7 +142,7 @@ public class LifecycleStateActiveTest extends LifecycleStateRunningTest {
}
@Test
- public void stateChange() throws CoderException {
+ public void testStateChange() throws CoderException {
assertActive();
/* no name and mismatching group info */
@@ -179,7 +179,7 @@ public class LifecycleStateActiveTest extends LifecycleStateRunningTest {
}
@Test
- public void update() throws IOException, CoderException {
+ public void testUpdate() throws IOException, CoderException {
// TODO: extract repeated similar assertion blocks into their own helper methods
diff --git a/feature-lifecycle/src/test/java/org/onap/policy/drools/lifecycle/LifecycleStatePassiveTest.java b/feature-lifecycle/src/test/java/org/onap/policy/drools/lifecycle/LifecycleStatePassiveTest.java
index f242e4c6..60d71d0c 100644
--- a/feature-lifecycle/src/test/java/org/onap/policy/drools/lifecycle/LifecycleStatePassiveTest.java
+++ b/feature-lifecycle/src/test/java/org/onap/policy/drools/lifecycle/LifecycleStatePassiveTest.java
@@ -71,7 +71,7 @@ public class LifecycleStatePassiveTest extends LifecycleStateRunningTest {
}
@Test
- public void controller() {
+ public void testController() {
fsm.start(controllerSupport.getController());
assertSame(controllerSupport.getController(),
fsm.getController(new ToscaPolicyTypeIdentifier(ControllerSupport.POLICY_TYPE,
@@ -85,7 +85,7 @@ public class LifecycleStatePassiveTest extends LifecycleStateRunningTest {
}
@Test
- public void start() {
+ public void testStart() {
assertEquals(0, fsm.client.getSink().getRecentEvents().length);
assertFalse(fsm.start());
assertBasicPassive();
@@ -110,7 +110,7 @@ public class LifecycleStatePassiveTest extends LifecycleStateRunningTest {
}
@Test
- public void shutdown() throws Exception {
+ public void testShutdown() throws Exception {
simpleStop();
fsm.shutdown();
@@ -118,7 +118,7 @@ public class LifecycleStatePassiveTest extends LifecycleStateRunningTest {
}
@Test
- public void status() {
+ public void testStatus() {
assertTrue(fsm.client.getSink().isAlive());
assertTrue(fsm.status());
assertSame(0, fsm.client.getSink().getRecentEvents().length);
@@ -139,7 +139,7 @@ public class LifecycleStatePassiveTest extends LifecycleStateRunningTest {
}
@Test
- public void update() throws IOException, CoderException {
+ public void testUpdate() throws IOException, CoderException {
controllerSupport.getController().getDrools().delete(ToscaPolicy.class);
assertEquals(0, controllerSupport.getController().getDrools().factCount("junits"));
@@ -240,7 +240,7 @@ public class LifecycleStatePassiveTest extends LifecycleStateRunningTest {
}
@Test
- public void stateChange() throws CoderException, IOException {
+ public void testStateChange() throws CoderException, IOException {
/* no name */
PdpStateChange change = new PdpStateChange();
change.setPdpGroup("A");
diff --git a/feature-lifecycle/src/test/java/org/onap/policy/drools/lifecycle/LifecycleStateTerminatedTest.java b/feature-lifecycle/src/test/java/org/onap/policy/drools/lifecycle/LifecycleStateTerminatedTest.java
index 353525d6..7c94e52c 100644
--- a/feature-lifecycle/src/test/java/org/onap/policy/drools/lifecycle/LifecycleStateTerminatedTest.java
+++ b/feature-lifecycle/src/test/java/org/onap/policy/drools/lifecycle/LifecycleStateTerminatedTest.java
@@ -2,7 +2,7 @@
* ============LICENSE_START=======================================================
* ONAP
* ================================================================================
- * Copyright (C) 2019 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2019-2020 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.
@@ -57,7 +57,7 @@ public class LifecycleStateTerminatedTest {
}
@Test
- public void constructor() {
+ public void testConstructor() {
assertThatIllegalArgumentException().isThrownBy(() -> new LifecycleStateTerminated(null));
LifecycleState state = new LifecycleStateTerminated(new LifecycleFsm());
@@ -71,7 +71,7 @@ public class LifecycleStateTerminatedTest {
}
@Test
- public void stop() {
+ public void testStop() {
assertEquals(PdpState.TERMINATED, fsm.state.state());
assertFalse(fsm.isAlive());
@@ -89,7 +89,7 @@ public class LifecycleStateTerminatedTest {
}
@Test
- public void bounce() {
+ public void testBounce() {
assertBasicTerminated();
simpleStart();
simpleStop();
@@ -101,12 +101,12 @@ public class LifecycleStateTerminatedTest {
@Test
public void doubleBounce() {
- bounce();
- bounce();
+ testBounce();
+ testBounce();
}
@Test
- public void doubleStartBounce() {
+ public void testDoubleStartBounce() {
simpleStart();
assertFalse(fsm.start());
assertBasicPassive();
@@ -114,7 +114,7 @@ public class LifecycleStateTerminatedTest {
}
@Test
- public void shutdown() {
+ public void testShutdown() {
assertBasicTerminated();
fsm.shutdown();
assertBasicTerminated();
@@ -123,7 +123,7 @@ public class LifecycleStateTerminatedTest {
}
@Test
- public void status() {
+ public void testStatus() {
assertBasicTerminated();
assertFalse(fsm.status());
assertBasicTerminated();
@@ -136,7 +136,7 @@ public class LifecycleStateTerminatedTest {
}
@Test
- public void update() {
+ public void testUpdate() {
PdpUpdate update = new PdpUpdate();
update.setName(NetworkUtil.getHostname());
update.setPdpGroup("A");
@@ -151,7 +151,7 @@ public class LifecycleStateTerminatedTest {
}
@Test
- public void stateChange() {
+ public void testStateChange() {
PdpStateChange change = new PdpStateChange();
change.setPdpGroup("A");
change.setPdpSubgroup("a");
diff --git a/feature-lifecycle/src/test/java/org/onap/policy/drools/server/restful/RestLifecycleManagerTest.java b/feature-lifecycle/src/test/java/org/onap/policy/drools/server/restful/RestLifecycleManagerTest.java
index da7435f3..37be4ac7 100644
--- a/feature-lifecycle/src/test/java/org/onap/policy/drools/server/restful/RestLifecycleManagerTest.java
+++ b/feature-lifecycle/src/test/java/org/onap/policy/drools/server/restful/RestLifecycleManagerTest.java
@@ -1,6 +1,6 @@
/*-
* ============LICENSE_START=======================================================
- * Copyright (C) 2019 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2019-2020 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.
@@ -80,7 +80,7 @@ public class RestLifecycleManagerTest {
}
@Test
- public void fsm() {
+ public void testFsm() {
Response response = HttpClientFactoryInstance.getClientFactory().get("lifecycle").get("fsm");
assertNotNull(HttpClient.getBody(response, String.class));
assertEquals(Status.OK.getStatusCode(), response.getStatus());