* ONAP
* ================================================================================
* Copyright (C) 2020-2021 AT&T Intellectual Property. All rights reserved.
+ * 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.
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;
+import jakarta.ws.rs.core.Response;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.util.HashMap;
import java.util.Properties;
import java.util.concurrent.LinkedBlockingQueue;
import java.util.concurrent.TimeUnit;
-import javax.ws.rs.core.Response;
import org.junit.After;
import org.junit.AfterClass;
import org.junit.BeforeClass;
}
}
- @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
}
};
- // run in another thread so we don't interrupt this thread
+ // run in another thread, so we don't interrupt this thread
LinkedBlockingQueue<RuntimeException> queue = new LinkedBlockingQueue<>();
Thread thread = new Thread(() -> {
try {
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);
- }
}