diff options
Diffstat (limited to 'models-sim/models-sim-dmaap/src/test')
2 files changed, 7 insertions, 4 deletions
diff --git a/models-sim/models-sim-dmaap/src/test/java/org/onap/policy/models/sim/dmaap/provider/DmaapSimProviderTest.java b/models-sim/models-sim-dmaap/src/test/java/org/onap/policy/models/sim/dmaap/provider/DmaapSimProviderTest.java index 4b9549a52..6c79ce9f8 100644 --- a/models-sim/models-sim-dmaap/src/test/java/org/onap/policy/models/sim/dmaap/provider/DmaapSimProviderTest.java +++ b/models-sim/models-sim-dmaap/src/test/java/org/onap/policy/models/sim/dmaap/provider/DmaapSimProviderTest.java @@ -18,6 +18,7 @@ package org.onap.policy.models.sim.dmaap.provider; +import static org.assertj.core.api.Assertions.assertThatCode; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertNull; @@ -242,14 +243,15 @@ public class DmaapSimProviderTest { // use a real provider so we can test the real makeTimer() method DmaapSimProvider prov2 = new DmaapSimProvider(params); prov2.start(); - prov2.stop(); + assertThatCode(() -> prov2.stop()).doesNotThrowAnyException(); } @Test public void testMakeTopicData() { // use a real provider so we can test the real makeTopicData() method DmaapSimProvider prov2 = new DmaapSimProvider(params); - prov2.processDmaapMessageGet(TOPIC1, CONSUMER1, CONSUMER_ID1, 0, 0); + assertThatCode(() -> prov2.processDmaapMessageGet(TOPIC1, CONSUMER1, CONSUMER_ID1, 0, 0)) + .doesNotThrowAnyException(); } @Test diff --git a/models-sim/models-sim-dmaap/src/test/java/org/onap/policy/sim/dmaap/startstop/MainTest.java b/models-sim/models-sim-dmaap/src/test/java/org/onap/policy/sim/dmaap/startstop/MainTest.java index b8e285a99..7f4e4b116 100644 --- a/models-sim/models-sim-dmaap/src/test/java/org/onap/policy/sim/dmaap/startstop/MainTest.java +++ b/models-sim/models-sim-dmaap/src/test/java/org/onap/policy/sim/dmaap/startstop/MainTest.java @@ -1,6 +1,6 @@ /* * ============LICENSE_START======================================================= - * Modifications Copyright (C) 2019 AT&T Intellectual Property. + * Modifications Copyright (C) 2019-2020 AT&T Intellectual Property. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -20,6 +20,7 @@ package org.onap.policy.sim.dmaap.startstop; +import static org.assertj.core.api.Assertions.assertThatCode; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; @@ -88,7 +89,7 @@ public class MainTest { @Test public void testMain_Help() { final String[] NormalParameters = {"-h"}; - Main.main(NormalParameters); + assertThatCode(() -> Main.main(NormalParameters)).doesNotThrowAnyException(); } @Test |