diff options
author | efiacor <fiachra.corcoran@est.tech> | 2022-10-19 13:10:43 +0100 |
---|---|---|
committer | efiacor <fiachra.corcoran@est.tech> | 2022-11-08 09:32:43 +0000 |
commit | 825e00a29f1ebd4f28cdd4f4fd1ace0a47e2292c (patch) | |
tree | 706d5b64d4a85efe66c30fd055b148a745abdb2e /asdc-controller/src/test/java | |
parent | aa3a520e7b85bbebf8b1f603bd1979154204f718 (diff) |
[SDC-DIST] Upgrade asdc-controller to use client version 2.0.0
Signed-off-by: efiacor <fiachra.corcoran@est.tech>
Issue-ID: DMAAP-1789
Change-Id: Icd08dcc39dd86eb2d0efdbdfd583b16d26a41627
Diffstat (limited to 'asdc-controller/src/test/java')
-rw-r--r-- | asdc-controller/src/test/java/org/onap/so/asdc/client/ASDCConfigurationTest.java | 28 | ||||
-rw-r--r-- | asdc-controller/src/test/java/org/onap/so/asdc/client/tests/ASDCConfigurationTest.java | 36 |
2 files changed, 24 insertions, 40 deletions
diff --git a/asdc-controller/src/test/java/org/onap/so/asdc/client/ASDCConfigurationTest.java b/asdc-controller/src/test/java/org/onap/so/asdc/client/ASDCConfigurationTest.java index e4749742ee..c0e7d314e4 100644 --- a/asdc-controller/src/test/java/org/onap/so/asdc/client/ASDCConfigurationTest.java +++ b/asdc-controller/src/test/java/org/onap/so/asdc/client/ASDCConfigurationTest.java @@ -20,8 +20,7 @@ package org.onap.so.asdc.client; - - +import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; import javax.transaction.Transactional; import org.junit.Test; @@ -40,19 +39,18 @@ public class ASDCConfigurationTest extends BaseTest { @Test @Transactional - public void testInitASDCConfiguration() throws Exception { - assertTrue("msopreist".equals(config.getUser())); - assertTrue("msoasdc-id-local".equals(config.getConsumerGroup())); - assertTrue("msoasdc-id-local".equals(config.getConsumerID())); - assertTrue("Pre-IST".equals(config.getEnvironmentName())); - assertTrue("localhost:8443".equals(config.getAsdcAddress())); - assertTrue("msopreist".equals(config.getPassword())); - assertTrue(config.getPollingInterval() == 30); - assertTrue(config.getPollingTimeout() == 30); - assertTrue(config.getRelevantArtifactTypes().size() == config.SUPPORTED_ARTIFACT_TYPES_LIST.size()); - assertTrue(config.getWatchDogTimeout() == 1); - assertTrue(config.isUseHttpsWithDmaap() == true); - assertTrue(config.isUseHttpsWithSDC() == true); + public void testInitASDCConfiguration() { + assertEquals("msopreist", config.getUser()); + assertEquals("msoasdc-id-local", config.getConsumerGroup()); + assertEquals("msoasdc-id-local", config.getConsumerID()); + assertEquals("Pre-IST", config.getEnvironmentName()); + assertEquals("localhost:8443", config.getSdcAddress()); + assertEquals("msopreist", config.getPassword()); + assertEquals(30, config.getPollingInterval()); + assertEquals(30, config.getPollingTimeout()); + assertEquals(config.getRelevantArtifactTypes().size(), ASDCConfiguration.SUPPORTED_ARTIFACT_TYPES_LIST.size()); + assertEquals(1, config.getWatchDogTimeout()); + assertTrue(config.isUseHttpsWithSDC()); } } diff --git a/asdc-controller/src/test/java/org/onap/so/asdc/client/tests/ASDCConfigurationTest.java b/asdc-controller/src/test/java/org/onap/so/asdc/client/tests/ASDCConfigurationTest.java index 992d495369..5b8637d1ed 100644 --- a/asdc-controller/src/test/java/org/onap/so/asdc/client/tests/ASDCConfigurationTest.java +++ b/asdc-controller/src/test/java/org/onap/so/asdc/client/tests/ASDCConfigurationTest.java @@ -43,7 +43,7 @@ public class ASDCConfigurationTest extends BaseTest { @Autowired private ASDCConfiguration config; - private List<String> msgBusAddressList = new ArrayList<String>(); + private final List<String> msgBusAddressList = new ArrayList<>(); private static final String MSO_PRE_IST = "msopreist"; private static final String MSO_ASDC_ID_LOCAL = "msoasdc-id-local"; @@ -51,63 +51,58 @@ public class ASDCConfigurationTest extends BaseTest { private static final String ASDC_ADDRESS = "localhost:8443"; @Test - public void isUseHttpsWithDmaapTest() { - assertTrue(config.isUseHttpsWithDmaap()); - } - - @Test public void isConsumeProduceStatusTopicTest() { assertTrue(config.isConsumeProduceStatusTopic()); } @Test public void getUserTest() { - assertTrue(MSO_PRE_IST.equals(config.getUser())); + assertEquals(MSO_PRE_IST, config.getUser()); } @Test public void getConsumerGroupTest() { - assertTrue(MSO_ASDC_ID_LOCAL.equals(config.getConsumerGroup())); + assertEquals(MSO_ASDC_ID_LOCAL, config.getConsumerGroup()); } @Test public void getConsumerIDTest() { - assertTrue(MSO_ASDC_ID_LOCAL.equals(config.getConsumerID())); + assertEquals(MSO_ASDC_ID_LOCAL, config.getConsumerID()); } @Test public void getEnvironmentNameTest() { - assertTrue(PRE_IST.equals(config.getEnvironmentName())); + assertEquals(PRE_IST, config.getEnvironmentName()); } @Test public void getAsdcAddress() { - assertTrue(ASDC_ADDRESS.equals(config.getAsdcAddress())); + assertEquals(ASDC_ADDRESS, config.getSdcAddress()); } @Test public void getPasswordTest() { - assertTrue(MSO_PRE_IST.equals(config.getPassword())); + assertEquals(MSO_PRE_IST, config.getPassword()); } @Test public void getPollingIntervalTest() { - assertTrue(config.getPollingInterval() == 30); + assertEquals(30, config.getPollingInterval()); } @Test public void getPollingTimeoutTest() { - assertTrue(config.getPollingTimeout() == 30); + assertEquals(30, config.getPollingTimeout()); } @Test public void getRelevantArtifactTypesTest() { - assertTrue(config.getRelevantArtifactTypes().size() == ASDCConfiguration.SUPPORTED_ARTIFACT_TYPES_LIST.size()); + assertEquals(config.getRelevantArtifactTypes().size(), ASDCConfiguration.SUPPORTED_ARTIFACT_TYPES_LIST.size()); } @Test public void getWatchDogTimeoutTest() { - assertTrue(config.getWatchDogTimeout() == 1); + assertEquals(1, config.getWatchDogTimeout()); } @Test @@ -137,13 +132,4 @@ public class ASDCConfigurationTest extends BaseTest { String actualAsdcControllerName = config.getAsdcControllerName(); assertEquals(asdcControllerName, actualAsdcControllerName); } - - @Test - public void getMsgBusAddressTest() { - msgBusAddressList.add("localhost"); - msgBusAddressList.add("localhost"); - - List<String> actualMsgBusAddress = config.getMsgBusAddress(); - assertEquals(msgBusAddressList, actualMsgBusAddress); - } } |