diff options
author | Dan Timoney <dtimoney@att.com> | 2020-06-01 14:41:50 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2020-06-01 14:41:50 +0000 |
commit | 4f524b5ed094abfa6bf8fec81254601c71706a17 (patch) | |
tree | 2a9c642655faed7d260688bb4f2bd498dfca67da | |
parent | 319ef7c25ee522d27396707ac6a9f5168ecd8820 (diff) | |
parent | a19d05b4c780b5fbedf9724a60fa82786924901a (diff) |
Merge "added assert statements in 7 test files"
7 files changed, 19 insertions, 0 deletions
diff --git a/aai-service/provider/src/test/java/org/onap/ccsdk/sli/adaptors/aai/RegressionTest.java b/aai-service/provider/src/test/java/org/onap/ccsdk/sli/adaptors/aai/RegressionTest.java index 0e81e5b5..eb8dbc4a 100755 --- a/aai-service/provider/src/test/java/org/onap/ccsdk/sli/adaptors/aai/RegressionTest.java +++ b/aai-service/provider/src/test/java/org/onap/ccsdk/sli/adaptors/aai/RegressionTest.java @@ -121,6 +121,7 @@ public class RegressionTest { QueryStatus resp = client.save("connector", false, false, "resource-instance-id = '12345'", data, "aaidata", ctx); LOG.info("AAIResponse: " + resp.toString()); + assertNotNull(ctx); } catch (Exception e) { @@ -158,6 +159,7 @@ public class RegressionTest { QueryStatus resp = client.save("connector", false, false, "resource-instance-id = '11012345'", data, "aaidata", ctx); LOG.info("AAIResponse: " + resp.toString()); + assertNotNull(ctx); } catch (Exception e) { @@ -210,6 +212,7 @@ public class RegressionTest { QueryStatus resp = client.save("logical-link", false, false, "link-name = '1252541'", data, "aaidata", ctx); LOG.info("AAIResponse: " + resp.toString()); + assertNotNull(data); } catch (Exception e) { @@ -241,6 +244,7 @@ public class RegressionTest { QueryStatus resp = client.save("virtual-data-center", false, false, "vdc-id = '1252541'", data, "aaidata", ctx); LOG.info("AAIResponse: " + resp.toString()); + assertNotNull(data); } catch (Exception e) { @@ -408,6 +412,7 @@ public class RegressionTest { // assertTrue(response == QueryStatus.SUCCESS); LOG.info("AAIResponse: " + datum.toString()); + assertNotNull(nameValues); } catch (Exception e) { diff --git a/mdsal-resource/provider/src/test/java/org/onap/ccsdk/sli/adaptors/resource/mdsal/TestConfigResource.java b/mdsal-resource/provider/src/test/java/org/onap/ccsdk/sli/adaptors/resource/mdsal/TestConfigResource.java index a8f4d948..80563b96 100644 --- a/mdsal-resource/provider/src/test/java/org/onap/ccsdk/sli/adaptors/resource/mdsal/TestConfigResource.java +++ b/mdsal-resource/provider/src/test/java/org/onap/ccsdk/sli/adaptors/resource/mdsal/TestConfigResource.java @@ -5,6 +5,7 @@ import junit.framework.TestCase; import static org.mockito.Mockito.mock; import org.onap.ccsdk.sli.core.sli.SvcLogicContext; +import static org.junit.Assert.assertNotNull; public class TestConfigResource extends TestCase { @@ -24,6 +25,7 @@ public class TestConfigResource extends TestCase { res.isAvailable("my-resource", "mykey", "pfx", ctx); res.save("resource", false, false, null, null, null, ctx); res.update("my-resource", "mykey", null, "pfx", ctx); + assertNotNull(res); } } diff --git a/mdsal-resource/provider/src/test/java/org/onap/ccsdk/sli/adaptors/resource/mdsal/TestMdsalResourcePropertiesProviderImpl.java b/mdsal-resource/provider/src/test/java/org/onap/ccsdk/sli/adaptors/resource/mdsal/TestMdsalResourcePropertiesProviderImpl.java index 9af5b59b..7f05d1e5 100644 --- a/mdsal-resource/provider/src/test/java/org/onap/ccsdk/sli/adaptors/resource/mdsal/TestMdsalResourcePropertiesProviderImpl.java +++ b/mdsal-resource/provider/src/test/java/org/onap/ccsdk/sli/adaptors/resource/mdsal/TestMdsalResourcePropertiesProviderImpl.java @@ -27,6 +27,7 @@ import org.junit.Test; import java.util.Properties; import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNotNull; public class TestMdsalResourcePropertiesProviderImpl { @@ -57,6 +58,7 @@ public class TestMdsalResourcePropertiesProviderImpl { MdsalResourcePropertiesProviderImpl test = new MdsalResourcePropertiesProviderImpl(); mdsal.determinePropertiesFile(test); + assertNotNull(test); } } diff --git a/mdsal-resource/provider/src/test/java/org/onap/ccsdk/sli/adaptors/resource/mdsal/TestOperationalResource.java b/mdsal-resource/provider/src/test/java/org/onap/ccsdk/sli/adaptors/resource/mdsal/TestOperationalResource.java index f5725e97..2e9798df 100644 --- a/mdsal-resource/provider/src/test/java/org/onap/ccsdk/sli/adaptors/resource/mdsal/TestOperationalResource.java +++ b/mdsal-resource/provider/src/test/java/org/onap/ccsdk/sli/adaptors/resource/mdsal/TestOperationalResource.java @@ -5,6 +5,7 @@ import static org.mockito.Mockito.mock; import org.onap.ccsdk.sli.core.sli.SvcLogicContext; import junit.framework.TestCase; +import static org.junit.Assert.assertNotNull; public class TestOperationalResource extends TestCase { @@ -25,5 +26,6 @@ public class TestOperationalResource extends TestCase { res.isAvailable("my-resource", "mykey", "pfx", ctx); res.save("resource", false, false, null, null, null, ctx); res.update("my-resource", "mykey", null, "pfx", ctx); + assertNotNull(restService); } } diff --git a/message-router/consumer/provider/src/test/java/org/onap/ccsdk/sli/adaptors/messagerouter/consumer/provider/impl/AbstractBaseConsumerTest.java b/message-router/consumer/provider/src/test/java/org/onap/ccsdk/sli/adaptors/messagerouter/consumer/provider/impl/AbstractBaseConsumerTest.java index 99a4f3ff..75873385 100644 --- a/message-router/consumer/provider/src/test/java/org/onap/ccsdk/sli/adaptors/messagerouter/consumer/provider/impl/AbstractBaseConsumerTest.java +++ b/message-router/consumer/provider/src/test/java/org/onap/ccsdk/sli/adaptors/messagerouter/consumer/provider/impl/AbstractBaseConsumerTest.java @@ -58,6 +58,7 @@ public class AbstractBaseConsumerTest { public void callClose() throws Exception {
DummyConsumer dummy = getAuthDummy();
dummy.close();
+ assertNotNull(dummy);
}
@Test
diff --git a/resource-assignment/provider/src/test/java/jtest/org/onap/ccsdk/sli/adaptors/ra/TestLockHelper.java b/resource-assignment/provider/src/test/java/jtest/org/onap/ccsdk/sli/adaptors/ra/TestLockHelper.java index 6564dc3d..a9389b27 100644 --- a/resource-assignment/provider/src/test/java/jtest/org/onap/ccsdk/sli/adaptors/ra/TestLockHelper.java +++ b/resource-assignment/provider/src/test/java/jtest/org/onap/ccsdk/sli/adaptors/ra/TestLockHelper.java @@ -10,6 +10,7 @@ import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import static org.junit.Assert.assertNotNull; @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration(locations = { "classpath:test-context.xml" }) @@ -34,6 +35,7 @@ public class TestLockHelper { t1.join(); t2.join(); t3.join(); + assertNotNull(t1); } private class LockThread extends Thread { diff --git a/resource-assignment/provider/src/test/java/jtest/org/onap/ccsdk/sli/adaptors/ra/TestReserve.java b/resource-assignment/provider/src/test/java/jtest/org/onap/ccsdk/sli/adaptors/ra/TestReserve.java index f42ef9c3..b159127b 100644 --- a/resource-assignment/provider/src/test/java/jtest/org/onap/ccsdk/sli/adaptors/ra/TestReserve.java +++ b/resource-assignment/provider/src/test/java/jtest/org/onap/ccsdk/sli/adaptors/ra/TestReserve.java @@ -28,6 +28,7 @@ import org.springframework.jdbc.core.JdbcTemplate; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import jtest.util.org.onap.ccsdk.sli.adaptors.ra.TestTable; +import static org.junit.Assert.assertNotNull; @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration(locations = { "classpath:test-context.xml" }) @@ -231,6 +232,7 @@ public class TestReserve { rsList.forEach(r -> { StrUtil.info(log, r); }); + assertNotNull(rsList); } @@ -269,6 +271,7 @@ public class TestReserve { rsList.forEach(r -> { StrUtil.info(log, r); }); + assertNotNull(sd); } @@ -316,6 +319,7 @@ public class TestReserve { rsList.forEach(r -> { StrUtil.info(log, r); }); + assertNotNull(rr); } @@ -478,6 +482,7 @@ public class TestReserve { rsList.forEach(r -> { StrUtil.info(log, r); }); + assertNotNull(rsList); } |