summaryrefslogtreecommitdiffstats
path: root/catalog-be/src/test/java
diff options
context:
space:
mode:
authorChris André <chris.andre@yoppworks.com>2020-04-14 16:21:43 -0400
committerOfir Sonsino <ofir.sonsino@intl.att.com>2020-04-22 11:03:30 +0000
commit333e6b47fcd6df91136ae1efa7eecca50bc50a04 (patch)
treea637dcce438b26d6b3bfd39e0dbced1781ce4a12 /catalog-be/src/test/java
parent27d169b34e81a9d42eaa0b7aab3797227a379f30 (diff)
Used `configurationManager` instead of `getConfigurationManager`
Issue-ID: SDC-2890 Change-Id: I1559ebc60076bd0884ae1136c9c904f7ab46e72e Signed-off-by: Chris Andre <chris.andre@yoppworks.com>
Diffstat (limited to 'catalog-be/src/test/java')
-rw-r--r--catalog-be/src/test/java/org/openecomp/sdc/be/catalog/impl/DmaapProducerTest.java19
1 files changed, 9 insertions, 10 deletions
diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/catalog/impl/DmaapProducerTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/catalog/impl/DmaapProducerTest.java
index af0687ccc6..cd0c32198d 100644
--- a/catalog-be/src/test/java/org/openecomp/sdc/be/catalog/impl/DmaapProducerTest.java
+++ b/catalog-be/src/test/java/org/openecomp/sdc/be/catalog/impl/DmaapProducerTest.java
@@ -45,6 +45,7 @@ import java.util.ArrayList;
import java.util.List;
import static org.assertj.core.api.Assertions.assertThat;
+import static org.assertj.core.api.Assertions.fail;
import static org.openecomp.sdc.be.catalog.enums.ResultStatusEnum.FAIL;
import static org.openecomp.sdc.be.catalog.enums.ResultStatusEnum.SERVICE_DISABLED;
import static org.openecomp.sdc.be.config.ConfigurationManager.getConfigurationManager;
@@ -62,8 +63,8 @@ public class DmaapProducerTest {
//actually sends the message
-
-
+
+
@Test
public void pushComponentMessageTest() {
boolean oldVal = isActive();
@@ -115,26 +116,24 @@ public class DmaapProducerTest {
assertThat(status.getResultStatus()).isEqualTo(FAIL);
} catch (JsonProcessingException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
+ fail("'JsonProcessingException' detected!", e);
} catch (Exception e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
+ fail("Unknown exception detected", e);
}finally {
- getConfigurationManager().getConfiguration().getDmaapProducerConfiguration().setActive(oldVal);
+ configurationManager.getConfiguration().getDmaapProducerConfiguration().setActive(oldVal);
}
}
private boolean isActive(){
- return getConfigurationManager().getConfiguration().getDmaapProducerConfiguration().getActive();
+ return configurationManager.getConfiguration().getDmaapProducerConfiguration().getActive();
}
private void toggleInactive(){
- getConfigurationManager().getConfiguration().getDmaapProducerConfiguration().setActive(false);
+ configurationManager.getConfiguration().getDmaapProducerConfiguration().setActive(false);
}
private void toggleActive(){
- getConfigurationManager().getConfiguration().getDmaapProducerConfiguration().setActive(true);
+ configurationManager.getConfiguration().getDmaapProducerConfiguration().setActive(true);
}
} \ No newline at end of file