diff options
author | 2018-05-08 13:48:44 +0200 | |
---|---|---|
committer | 2018-05-09 14:20:35 +0200 | |
commit | 44ce56cf2e6bfae17c443901ac6ded8ba8cdd414 (patch) | |
tree | d2700e58cff23035f8f489ef7579ecee04ef3cc6 /prh-dmaap-client/src/test | |
parent | 7e7aa0c165665f74b628ba5c95fb3cdae72f4449 (diff) |
Added dmaap consumer task execution to workflow
Change-Id: I67904a8ffb7d401fa2188fb046e28474eded4377
Issue-ID: DCAEGEN2-474
Signed-off-by: wasala <przemyslaw.wasala@nokia.com>
Diffstat (limited to 'prh-dmaap-client/src/test')
2 files changed, 9 insertions, 9 deletions
diff --git a/prh-dmaap-client/src/test/java/org/onap/dcaegen2/services/service/consumer/ExtendedDmaapConsumerHttpClientImplTest.java b/prh-dmaap-client/src/test/java/org/onap/dcaegen2/services/service/consumer/ExtendedDmaapConsumerHttpClientImplTest.java index 21d3e4c2..1df025ca 100644 --- a/prh-dmaap-client/src/test/java/org/onap/dcaegen2/services/service/consumer/ExtendedDmaapConsumerHttpClientImplTest.java +++ b/prh-dmaap-client/src/test/java/org/onap/dcaegen2/services/service/consumer/ExtendedDmaapConsumerHttpClientImplTest.java @@ -57,9 +57,9 @@ public class ExtendedDmaapConsumerHttpClientImplTest { when(configurationMock.dmaapUserName()).thenReturn("PRH"); when(configurationMock.dmaapUserPassword()).thenReturn("PRH"); when(configurationMock.dmaapContentType()).thenReturn("application/json"); - when(configurationMock.dmaapTopicName()).thenReturn("pnfReady"); - when(configurationMock.consumerGroup()).thenReturn("consumerGroup"); - when(configurationMock.consumerId()).thenReturn("consumerId"); + when(configurationMock.dmaapTopicName()).thenReturn("unauthenticated.SEC_OTHER_OUTPUT"); + when(configurationMock.consumerGroup()).thenReturn("OpenDCAE-c12"); + when(configurationMock.consumerId()).thenReturn("c12"); objectUnderTest = new ExtendedDmaapConsumerHttpClientImpl(configurationMock); diff --git a/prh-dmaap-client/src/test/java/org/onap/dcaegen2/services/service/producer/ExtendedDmaapProducerHttpClientImplTest.java b/prh-dmaap-client/src/test/java/org/onap/dcaegen2/services/service/producer/ExtendedDmaapProducerHttpClientImplTest.java index 0560432b..3f64fd5f 100644 --- a/prh-dmaap-client/src/test/java/org/onap/dcaegen2/services/service/producer/ExtendedDmaapProducerHttpClientImplTest.java +++ b/prh-dmaap-client/src/test/java/org/onap/dcaegen2/services/service/producer/ExtendedDmaapProducerHttpClientImplTest.java @@ -62,7 +62,7 @@ public class ExtendedDmaapProducerHttpClientImplTest { when(configurationMock.dmaapTopicName()).thenReturn("pnfReady"); when(requestDetailsMock.dmaapAPIPath()).thenReturn("events"); - when(requestDetailsMock.jsonBody()).thenReturn(Optional.of(JSON_MESSAGE)); + when(requestDetailsMock.jsonBody()).thenReturn(JSON_MESSAGE); objectUnderTest = new ExtendedDmaapProducerHttpClientImpl(configurationMock); @@ -75,7 +75,7 @@ public class ExtendedDmaapProducerHttpClientImplTest { expectedResult = Optional.of(RESPONSE_SUCCESS); when(closeableHttpClientMock.execute(any(HttpPost.class), any(ResponseHandler.class))) - .thenReturn(expectedResult); + .thenReturn(expectedResult); Optional<String> actualResult = objectUnderTest.getHttpProducerResponse(requestDetailsMock); @@ -85,10 +85,10 @@ public class ExtendedDmaapProducerHttpClientImplTest { @Test public void getExtendedDetails_returnsFailure() throws IOException { expectedResult = Optional.of(RESPONSE_FAILURE); - when(closeableHttpClientMock.execute(any(HttpPost.class), any(ResponseHandler.class))). - thenReturn(Optional.empty()); - Optional<String> actualResult = objectUnderTest.getHttpProducerResponse(requestDetailsMock); - Assertions.assertEquals(Optional.empty(),actualResult); + when(closeableHttpClientMock.execute(any(HttpPost.class), any(ResponseHandler.class))) + .thenReturn(Optional.empty()); + Optional<String> actualResult = objectUnderTest.getHttpProducerResponse(requestDetailsMock); + Assertions.assertEquals(Optional.empty(), actualResult); } |