aboutsummaryrefslogtreecommitdiffstats
path: root/common/src/test
diff options
context:
space:
mode:
authorFrancescoFioraEst <francesco.fiora@est.tech>2021-07-05 10:36:42 +0100
committerFrancescoFioraEst <francesco.fiora@est.tech>2021-07-09 17:54:37 +0100
commitd5fb4e04527f47f78e9116e3573c21dd75ff8abb (patch)
treed9b784ef679123c199e1e7aea5220b42f1a9cfea /common/src/test
parent8c802e778db60e269e2e66c7a6609bf905f6ad79 (diff)
Convert controlloop runtime to springboot framework
Issue-ID: POLICY-3355 Change-Id: Ie1667b749eed28b7e526cd4695f45d8ed736c4e7 Signed-off-by: FrancescoFioraEst <francesco.fiora@est.tech>
Diffstat (limited to 'common/src/test')
-rw-r--r--common/src/test/java/org/onap/policy/clamp/controlloop/common/handler/ControlLoopHandlerTest.java7
-rw-r--r--common/src/test/java/org/onap/policy/clamp/controlloop/common/startstop/CommonCommandLineArgumentsTest.java2
2 files changed, 1 insertions, 8 deletions
diff --git a/common/src/test/java/org/onap/policy/clamp/controlloop/common/handler/ControlLoopHandlerTest.java b/common/src/test/java/org/onap/policy/clamp/controlloop/common/handler/ControlLoopHandlerTest.java
index 7a0479d29..7def2873a 100644
--- a/common/src/test/java/org/onap/policy/clamp/controlloop/common/handler/ControlLoopHandlerTest.java
+++ b/common/src/test/java/org/onap/policy/clamp/controlloop/common/handler/ControlLoopHandlerTest.java
@@ -25,7 +25,6 @@ import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import org.junit.jupiter.api.Test;
-import org.onap.policy.common.utils.services.Registry;
import org.onap.policy.models.provider.PolicyModelsProviderParameters;
class ControlLoopHandlerTest {
@@ -35,10 +34,6 @@ class ControlLoopHandlerTest {
assertThatThrownBy(() -> new DummyControlLoopHandler(null)).isInstanceOf(NullPointerException.class);
assertNotNull(new DummyControlLoopHandler(new PolicyModelsProviderParameters()));
- Registry.unregister(DummyControlLoopHandler.class.getName());
-
- String dummyClassName = DummyControlLoopHandler.class.getName();
- assertThatThrownBy(() -> Registry.get(dummyClassName)).isInstanceOf(IllegalArgumentException.class);
PolicyModelsProviderParameters pars = new PolicyModelsProviderParameters();
@@ -46,9 +41,7 @@ class ControlLoopHandlerTest {
assertNotNull(dclh);
assertEquals(pars, dclh.getDatabaseProviderParameters());
- assertEquals(0, dclh.getProviderClasses().size());
dclh.close();
- assertThatThrownBy(() -> Registry.get(dummyClassName)).isInstanceOf(IllegalArgumentException.class);
}
}
diff --git a/common/src/test/java/org/onap/policy/clamp/controlloop/common/startstop/CommonCommandLineArgumentsTest.java b/common/src/test/java/org/onap/policy/clamp/controlloop/common/startstop/CommonCommandLineArgumentsTest.java
index 715232f58..8eff21248 100644
--- a/common/src/test/java/org/onap/policy/clamp/controlloop/common/startstop/CommonCommandLineArgumentsTest.java
+++ b/common/src/test/java/org/onap/policy/clamp/controlloop/common/startstop/CommonCommandLineArgumentsTest.java
@@ -45,7 +45,7 @@ class CommonCommandLineArgumentsTest {
@Test
void testHelp() {
assertThat(cli.help("DummyClass", new Options()))
- .contains("DummyClass [options...]\noptions");
+ .contains("DummyClass [options...]" + System.lineSeparator() + "options");
}
@Test