diff options
author | wasala <przemyslaw.wasala@nokia.com> | 2018-05-17 11:10:24 +0200 |
---|---|---|
committer | wasala <przemyslaw.wasala@nokia.com> | 2018-05-17 13:32:06 +0200 |
commit | f24307ddd8fd1d8235bcf4e790cdd15bbf9db514 (patch) | |
tree | f83edd9061246db6d7a075453de3c71cbf725734 /prh-dmaap-client | |
parent | 797e824f18e784b8ded9a00d2ca7f420a53e6fff (diff) |
Added tests for AAIConsumerTask
Change-Id: I958844fb2f0ce0ae19762ff7a9f98e19303191f3
Issue-ID: DCAEGEN2-396
Signed-off-by: wasala <przemyslaw.wasala@nokia.com>
Diffstat (limited to 'prh-dmaap-client')
-rw-r--r-- | prh-dmaap-client/src/test/java/org/onap/dcaegen2/services/prh/service/config/DmaapConsumerConfigurationTest.java (renamed from prh-dmaap-client/src/test/java/org/onap/dcaegen2/services/service/config/DmaapConsumerConfigurationTest.java) | 59 | ||||
-rw-r--r-- | prh-dmaap-client/src/test/java/org/onap/dcaegen2/services/prh/service/config/DmaapPublisherConfigurationTest.java (renamed from prh-dmaap-client/src/test/java/org/onap/dcaegen2/services/service/config/DmaapPublisherConfigurationTest.java) | 43 |
2 files changed, 52 insertions, 50 deletions
diff --git a/prh-dmaap-client/src/test/java/org/onap/dcaegen2/services/service/config/DmaapConsumerConfigurationTest.java b/prh-dmaap-client/src/test/java/org/onap/dcaegen2/services/prh/service/config/DmaapConsumerConfigurationTest.java index 2c076cef..dc8f7b6e 100644 --- a/prh-dmaap-client/src/test/java/org/onap/dcaegen2/services/service/config/DmaapConsumerConfigurationTest.java +++ b/prh-dmaap-client/src/test/java/org/onap/dcaegen2/services/prh/service/config/DmaapConsumerConfigurationTest.java @@ -18,45 +18,46 @@ * ============LICENSE_END========================================================= */ -package org.onap.dcaegen2.services.service.config; +package org.onap.dcaegen2.services.prh.service.config; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; -import org.onap.dcaegen2.services.config.DmaapConsumerConfiguration; -import org.onap.dcaegen2.services.config.ImmutableDmaapConsumerConfiguration; +import org.onap.dcaegen2.services.prh.config.DmaapConsumerConfiguration; +import org.onap.dcaegen2.services.prh.config.ImmutableDmaapConsumerConfiguration; public class DmaapConsumerConfigurationTest { - // Given - private DmaapConsumerConfiguration configuration; - private String consumerId = "1"; - private String dmaapHostName = "localhost"; - private Integer dmaapPortNumber = 2222; - private String dmaapTopicName = "temp"; - private String dmaapProtocol = "http"; - private String dmaapUserName = "admin"; - private String dmaapUserPassword = "admin"; - private String dmaapContentType = "application/json"; - private String consumerGroup = "other"; - private Integer timeoutMs = 1000; - private Integer messageLimit = 1000; - @Test public void builder_shouldBuildConfigurationObject() { + + // Given + DmaapConsumerConfiguration configuration; + String consumerId = "1"; + String dmaapHostName = "localhost"; + Integer dmaapPortNumber = 2222; + String dmaapTopicName = "temp"; + String dmaapProtocol = "http"; + String dmaapUserName = "admin"; + String dmaapUserPassword = "admin"; + String dmaapContentType = "application/json"; + String consumerGroup = "other"; + Integer timeoutMs = 1000; + Integer messageLimit = 1000; + // When configuration = new ImmutableDmaapConsumerConfiguration.Builder() - .consumerId(consumerId) - .dmaapHostName(dmaapHostName) - .dmaapPortNumber(dmaapPortNumber) - .dmaapTopicName(dmaapTopicName) - .dmaapProtocol(dmaapProtocol) - .dmaapUserName(dmaapUserName) - .dmaapUserPassword(dmaapUserPassword) - .dmaapContentType(dmaapContentType) - .consumerGroup(consumerGroup) - .timeoutMS(timeoutMs) - .messageLimit(messageLimit) - .build(); + .consumerId(consumerId) + .dmaapHostName(dmaapHostName) + .dmaapPortNumber(dmaapPortNumber) + .dmaapTopicName(dmaapTopicName) + .dmaapProtocol(dmaapProtocol) + .dmaapUserName(dmaapUserName) + .dmaapUserPassword(dmaapUserPassword) + .dmaapContentType(dmaapContentType) + .consumerGroup(consumerGroup) + .timeoutMS(timeoutMs) + .messageLimit(messageLimit) + .build(); // Then Assertions.assertNotNull(configuration); diff --git a/prh-dmaap-client/src/test/java/org/onap/dcaegen2/services/service/config/DmaapPublisherConfigurationTest.java b/prh-dmaap-client/src/test/java/org/onap/dcaegen2/services/prh/service/config/DmaapPublisherConfigurationTest.java index 7796da5c..47dd30f4 100644 --- a/prh-dmaap-client/src/test/java/org/onap/dcaegen2/services/service/config/DmaapPublisherConfigurationTest.java +++ b/prh-dmaap-client/src/test/java/org/onap/dcaegen2/services/prh/service/config/DmaapPublisherConfigurationTest.java @@ -18,38 +18,39 @@ * ============LICENSE_END========================================================= */ -package org.onap.dcaegen2.services.service.config; +package org.onap.dcaegen2.services.prh.service.config; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; -import org.onap.dcaegen2.services.config.DmaapPublisherConfiguration; -import org.onap.dcaegen2.services.config.ImmutableDmaapPublisherConfiguration; +import org.onap.dcaegen2.services.prh.config.DmaapPublisherConfiguration; +import org.onap.dcaegen2.services.prh.config.ImmutableDmaapPublisherConfiguration; public class DmaapPublisherConfigurationTest { - // Given - private DmaapPublisherConfiguration configuration; - private String dmaapHostName = "localhost"; - private Integer dmaapPortNumber = 2222; - private String dmaapTopicName = "temp"; - private String dmaapProtocol = "http"; - private String dmaapUserName = "admin"; - private String dmaapUserPassword = "admin"; - private String dmaapContentType = "application/json"; - @Test public void builder_shouldBuildConfigurationObject() { + + // Given + DmaapPublisherConfiguration configuration; + String dmaapHostName = "localhost"; + Integer dmaapPortNumber = 2222; + String dmaapTopicName = "temp"; + String dmaapProtocol = "http"; + String dmaapUserName = "admin"; + String dmaapUserPassword = "admin"; + String dmaapContentType = "application/json"; + // When configuration = new ImmutableDmaapPublisherConfiguration.Builder() - .dmaapHostName(dmaapHostName) - .dmaapPortNumber(dmaapPortNumber) - .dmaapTopicName(dmaapTopicName) - .dmaapProtocol(dmaapProtocol) - .dmaapUserName(dmaapUserName) - .dmaapUserPassword(dmaapUserPassword) - .dmaapContentType(dmaapContentType) - .build(); + .dmaapHostName(dmaapHostName) + .dmaapPortNumber(dmaapPortNumber) + .dmaapTopicName(dmaapTopicName) + .dmaapProtocol(dmaapProtocol) + .dmaapUserName(dmaapUserName) + .dmaapUserPassword(dmaapUserPassword) + .dmaapContentType(dmaapContentType) + .build(); // Then Assertions.assertNotNull(configuration); |