X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=models-sim%2Fpolicy-models-simulators%2Fsrc%2Ftest%2Fjava%2Forg%2Fonap%2Fpolicy%2Fmodels%2Fsimulators%2FMainTest.java;h=09064f472e2363756ec0379006f5c606b9141e52;hb=49f07db935d114b72a44e446867b16262dd552aa;hp=6326b704b4b0a63d0016a5bec86af0e18bbefd8c;hpb=938005505883cf7a636a8840e20e3dc8a0ad9176;p=policy%2Fmodels.git diff --git a/models-sim/policy-models-simulators/src/test/java/org/onap/policy/models/simulators/MainTest.java b/models-sim/policy-models-simulators/src/test/java/org/onap/policy/models/simulators/MainTest.java index 6326b704b..09064f472 100644 --- a/models-sim/policy-models-simulators/src/test/java/org/onap/policy/models/simulators/MainTest.java +++ b/models-sim/policy-models-simulators/src/test/java/org/onap/policy/models/simulators/MainTest.java @@ -3,7 +3,7 @@ * ONAP * ================================================================================ * Copyright (C) 2020-2021 AT&T Intellectual Property. All rights reserved. - * Modifications Copyright (C) 2023 Nordix Foundation. + * Modifications Copyright (C) 2023-2024 Nordix Foundation. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -113,14 +113,8 @@ public class MainTest { } } - @Test - public void testConstructor() throws Exception { - assertThatIllegalArgumentException().isThrownBy(() -> new Main("invalidDmaapProvider.json")) - .withMessage("invalid simulator parameters"); - } - /** - * Verifies that all of the simulators are brought up and that HTTPS works with at + * Verifies that all the simulators are brought up and that HTTPS works with at * least one of them. */ @Test @@ -224,7 +218,7 @@ public class MainTest { } }; - // run in another thread so we don't interrupt this thread + // run in another thread, so we don't interrupt this thread LinkedBlockingQueue queue = new LinkedBlockingQueue<>(); Thread thread = new Thread(() -> { try { @@ -243,30 +237,5 @@ public class MainTest { assertThat(ex.getCause()).hasMessageStartingWith("interrupted while building"); } - /** - * Tests buildTopicServer() when the provider class is invalid. - */ - @Test - public void testBuildTopicServerInvalidProvider() { - assertThatThrownBy(() -> new Main("invalidTopicServer.json").start()) - .hasCauseInstanceOf(IllegalArgumentException.class); - } - - /** - * Tests buildTopicServer() when the sink is missing. - */ - @Test - public void testBuildTopicServerNoSink() { - assertThatThrownBy(() -> new Main("missingSink.json").start()) - .hasCauseInstanceOf(IllegalArgumentException.class); - } - /** - * Tests buildTopicServer() when the sink is missing. - */ - @Test - public void testBuildTopicServerNoSource() { - assertThatThrownBy(() -> new Main("missingSource.json").start()) - .hasCauseInstanceOf(IllegalArgumentException.class); - } }