summaryrefslogtreecommitdiffstats
path: root/prh-app-server
diff options
context:
space:
mode:
Diffstat (limited to 'prh-app-server')
-rw-r--r--prh-app-server/src/main/java/org/onap/dcaegen2/services/prh/tasks/BbsActionsTaskImpl.java2
-rw-r--r--prh-app-server/src/test/java/org/onap/dcaegen2/services/prh/tasks/BbsActionsTaskTest.java22
2 files changed, 4 insertions, 20 deletions
diff --git a/prh-app-server/src/main/java/org/onap/dcaegen2/services/prh/tasks/BbsActionsTaskImpl.java b/prh-app-server/src/main/java/org/onap/dcaegen2/services/prh/tasks/BbsActionsTaskImpl.java
index ba0ed2a7..126d6f99 100644
--- a/prh-app-server/src/main/java/org/onap/dcaegen2/services/prh/tasks/BbsActionsTaskImpl.java
+++ b/prh-app-server/src/main/java/org/onap/dcaegen2/services/prh/tasks/BbsActionsTaskImpl.java
@@ -49,7 +49,7 @@ import static org.onap.dcaegen2.services.sdk.rest.services.adapters.http.HttpMet
public class BbsActionsTaskImpl implements BbsActionsTask {
private static final Logger LOGGER = LoggerFactory.getLogger(BbsActionsTaskImpl.class);
- private static final String ATTACHMENT_POINT = "attachmentPoint";
+ private static final String ATTACHMENT_POINT = "attachment-point";
private static final String LOGICAL_LINK_URI = "/network/logical-links/logical-link";
private static final String PNF_URI = "/network/pnfs/pnf";
diff --git a/prh-app-server/src/test/java/org/onap/dcaegen2/services/prh/tasks/BbsActionsTaskTest.java b/prh-app-server/src/test/java/org/onap/dcaegen2/services/prh/tasks/BbsActionsTaskTest.java
index c8b3a92b..3733a48c 100644
--- a/prh-app-server/src/test/java/org/onap/dcaegen2/services/prh/tasks/BbsActionsTaskTest.java
+++ b/prh-app-server/src/test/java/org/onap/dcaegen2/services/prh/tasks/BbsActionsTaskTest.java
@@ -20,10 +20,7 @@
package org.onap.dcaegen2.services.prh.tasks;
-import com.google.gson.JsonElement;
import com.google.gson.JsonObject;
-import com.google.gson.JsonParser;
-import io.netty.buffer.ByteBuf;
import io.netty.handler.codec.http.HttpResponseStatus;
import org.junit.jupiter.api.Test;
import org.mockito.ArgumentCaptor;
@@ -37,12 +34,8 @@ import org.onap.dcaegen2.services.sdk.rest.services.adapters.http.HttpRequest;
import org.onap.dcaegen2.services.sdk.rest.services.adapters.http.HttpResponse;
import org.onap.dcaegen2.services.sdk.rest.services.adapters.http.ImmutableHttpResponse;
import org.onap.dcaegen2.services.sdk.rest.services.adapters.http.RxHttpClient;
-import org.reactivestreams.Publisher;
import reactor.core.publisher.Mono;
-import java.io.InputStreamReader;
-
-import static java.nio.charset.StandardCharsets.UTF_8;
import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.assertThatThrownBy;
import static org.junit.jupiter.api.Assertions.assertEquals;
@@ -78,7 +71,7 @@ class BbsActionsTaskTest {
given(cbsConfiguration.getAaiClientConfiguration()).willReturn(aaiClientConfiguration);
JsonObject additionalFields = new JsonObject();
- additionalFields.addProperty("attachmentPoint", "");
+ additionalFields.addProperty("attachment-point", "");
ConsumerDmaapModel consumerDmaapModel = buildConsumerDmaapModel(additionalFields);
// when
@@ -95,7 +88,7 @@ class BbsActionsTaskTest {
given(cbsConfiguration.getAaiClientConfiguration()).willReturn(aaiClientConfiguration);
JsonObject additionalFields = new JsonObject();
- additionalFields.addProperty("attachmentPoint", "some-link");
+ additionalFields.addProperty("attachment-point", "some-link");
ConsumerDmaapModel consumerDmaapModel = buildConsumerDmaapModel(additionalFields);
given(httpClient.call(any())).willReturn(Mono.just(buildAaiResponse(HttpResponseStatus.OK)));
@@ -114,7 +107,7 @@ class BbsActionsTaskTest {
given(cbsConfiguration.getAaiClientConfiguration()).willReturn(aaiClientConfiguration);
JsonObject additionalFields = new JsonObject();
- additionalFields.addProperty("attachmentPoint", "some-link");
+ additionalFields.addProperty("attachment-point", "some-link");
ConsumerDmaapModel consumerDmaapModel = buildConsumerDmaapModel(additionalFields);
given(httpClient.call(any())).willReturn(Mono.just(buildAaiResponse(HttpResponseStatus.INTERNAL_SERVER_ERROR)));
@@ -155,13 +148,4 @@ class BbsActionsTaskTest {
.rawBody("".getBytes())
.build();
}
-
- private void assertJsonEquals(Publisher<ByteBuf> requestBody, String path) {
- JsonParser parser = new JsonParser();
- JsonElement result = parser.parse(Mono.from(requestBody).block().toString(UTF_8));
- JsonElement expected = parser
- .parse(new InputStreamReader(getClass().getClassLoader().getResourceAsStream(path)));
-
- assertThat(result).isEqualTo(expected);
- }
} \ No newline at end of file