diff options
author | Joss Armstrong <joss.armstrong@ericsson.com> | 2019-02-12 20:07:10 +0000 |
---|---|---|
committer | Takamune Cho <takamune.cho@att.com> | 2019-02-14 14:22:55 +0000 |
commit | 28ebd9cb512f41600eed2beeb0f6df31fedf19d7 (patch) | |
tree | 5b6090315bbac6edca45bcf2581049172708426c /appc-adapters/appc-dmaap-adapter/appc-message-adapter-factory/src/main | |
parent | 0261ed402d8b1cca0b73024fac24688ca6d81e21 (diff) |
Test coverage DmaapMessageAdapterFactoryActivator
Increased coverage from 0% to 100%
Issue-ID: APPC-1422
Change-Id: I246ddffe3d84682ddb37ca5e94abd0c7f5c7c312
Signed-off-by: Joss Armstrong <joss.armstrong@ericsson.com>
Diffstat (limited to 'appc-adapters/appc-dmaap-adapter/appc-message-adapter-factory/src/main')
2 files changed, 18 insertions, 14 deletions
diff --git a/appc-adapters/appc-dmaap-adapter/appc-message-adapter-factory/src/main/java/org/onap/appc/adapter/factory/DmaapMessageAdapterFactoryActivator.java b/appc-adapters/appc-dmaap-adapter/appc-message-adapter-factory/src/main/java/org/onap/appc/adapter/factory/DmaapMessageAdapterFactoryActivator.java index 1f929fba1..fc0ded1a0 100644 --- a/appc-adapters/appc-dmaap-adapter/appc-message-adapter-factory/src/main/java/org/onap/appc/adapter/factory/DmaapMessageAdapterFactoryActivator.java +++ b/appc-adapters/appc-dmaap-adapter/appc-message-adapter-factory/src/main/java/org/onap/appc/adapter/factory/DmaapMessageAdapterFactoryActivator.java @@ -5,6 +5,8 @@ * Copyright (C) 2017-2018 AT&T Intellectual Property. All rights reserved. * ================================================================================ * Copyright (C) 2017 Amdocs + * ================================================================================ + * Modifications Copyright (C) 2019 Ericsson * ============================================================================= * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -28,19 +30,19 @@ import org.osgi.framework.BundleContext; import org.osgi.framework.ServiceRegistration; public class DmaapMessageAdapterFactoryActivator implements BundleActivator { - private ServiceRegistration registration; + private ServiceRegistration registration; - @Override - public void start(BundleContext context) throws Exception { - registration = context.registerService( - MessageAdapterFactory.class.getName(), - new DmaapMessageAdapterFactoryImpl(), - null); - } + @Override + public void start(BundleContext context) throws Exception { + registration = context.registerService( + MessageAdapterFactory.class.getName(), + new DmaapMessageAdapterFactoryImpl(), + null); + } - @Override - public void stop(BundleContext context) throws Exception { - registration.unregister(); - } + @Override + public void stop(BundleContext context) throws Exception { + registration.unregister(); + } } diff --git a/appc-adapters/appc-dmaap-adapter/appc-message-adapter-factory/src/main/java/org/onap/appc/adapter/factory/DmaapMessageAdapterFactoryImpl.java b/appc-adapters/appc-dmaap-adapter/appc-message-adapter-factory/src/main/java/org/onap/appc/adapter/factory/DmaapMessageAdapterFactoryImpl.java index 6e6891dee..d182f4769 100644 --- a/appc-adapters/appc-dmaap-adapter/appc-message-adapter-factory/src/main/java/org/onap/appc/adapter/factory/DmaapMessageAdapterFactoryImpl.java +++ b/appc-adapters/appc-dmaap-adapter/appc-message-adapter-factory/src/main/java/org/onap/appc/adapter/factory/DmaapMessageAdapterFactoryImpl.java @@ -5,6 +5,8 @@ * Copyright (C) 2017-2018 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Copyright (C) 2017 Amdocs
+ * ================================================================================
+ * Modifications Copyright (C) 2019 Ericsson
* =============================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -34,7 +36,7 @@ import org.onap.appc.adapter.messaging.dmaap.http.HttpDmaapProducerImpl; public class DmaapMessageAdapterFactoryImpl implements MessageAdapterFactory {
-
+
@Override
public Producer createProducer(Collection<String> pools, String writeTopic, String apiKey, String apiSecret) {
return new HttpDmaapProducerImpl(pools, writeTopic);
@@ -46,7 +48,7 @@ public class DmaapMessageAdapterFactoryImpl implements MessageAdapterFactory { for(String s : writeTopics){
topic = s;
}
- return new HttpDmaapProducerImpl(pools,topic);
+ return new HttpDmaapProducerImpl(pools, topic);
}
@Override
|