summaryrefslogtreecommitdiffstats
path: root/prh-app-server/src/test/java
diff options
context:
space:
mode:
authorpwielebs <piotr.wielebski@nokia.com>2019-05-28 10:47:03 +0200
committerpwielebs <piotr.wielebski@nokia.com>2019-05-28 15:52:10 +0200
commit37dd2cb2d2ad38ad1e6dd83f3ff5b40bc2c0f614 (patch)
treef0ed1982612bdca8a2b17d67c554d53d5083f5d4 /prh-app-server/src/test/java
parent57cbc1a3e9f3c1b8049115461266d15736d2f391 (diff)
Refactor due to AAI model changes
Change-Id: I1684cb798b40c5d58b531549f2596582f14bc901 Issue-ID: DCAEGEN2-1533 Signed-off-by: pwielebs <piotr.wielebski@nokia.com>
Diffstat (limited to 'prh-app-server/src/test/java')
-rw-r--r--prh-app-server/src/test/java/org/onap/dcaegen2/services/prh/TestAppConfiguration.java5
-rw-r--r--prh-app-server/src/test/java/org/onap/dcaegen2/services/prh/tasks/BbsActionsTaskTest.java26
2 files changed, 11 insertions, 20 deletions
diff --git a/prh-app-server/src/test/java/org/onap/dcaegen2/services/prh/TestAppConfiguration.java b/prh-app-server/src/test/java/org/onap/dcaegen2/services/prh/TestAppConfiguration.java
index fb0b1b43..b398c501 100644
--- a/prh-app-server/src/test/java/org/onap/dcaegen2/services/prh/TestAppConfiguration.java
+++ b/prh-app-server/src/test/java/org/onap/dcaegen2/services/prh/TestAppConfiguration.java
@@ -56,14 +56,9 @@ public class TestAppConfiguration {
public static ImmutableAaiClientConfiguration createDefaultAaiClientConfiguration() {
return new ImmutableAaiClientConfiguration.Builder()
.pnfUrl("https://aai.onap.svc.cluster.local:8443/aai/v12/network/pnfs/pnf")
- .aaiHost("aai.onap.svc.cluster.local")
- .aaiPort(8443)
- .aaiProtocol("https")
.aaiUserName("AAI")
.aaiUserPassword("AAI")
.aaiIgnoreSslCertificateErrors(true)
- .aaiBasePath("/aai/v12")
- .aaiPnfPath("/network/pnfs/pnf")
.aaiServiceInstancePath("/business/customers/customer/${customer}/service-subscriptions/service-subscription/${serviceType}/service-instances/service-instance/${serviceInstanceId}")
.trustStorePath("/opt/app/prh/local/org.onap.prh.trust.jks")
.trustStorePasswordPath("change_it")
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 5edf15a8..c8b3a92b 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,23 +20,11 @@
package org.onap.dcaegen2.services.prh.tasks;
-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;
-import static org.mockito.ArgumentMatchers.any;
-import static org.mockito.BDDMockito.given;
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.verify;
-import static org.mockito.Mockito.verifyNoMoreInteractions;
-import static org.mockito.Mockito.verifyZeroInteractions;
-
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 java.io.InputStreamReader;
import org.junit.jupiter.api.Test;
import org.mockito.ArgumentCaptor;
import org.onap.dcaegen2.services.prh.TestAppConfiguration;
@@ -52,13 +40,21 @@ 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;
+import static org.mockito.ArgumentMatchers.any;
+import static org.mockito.BDDMockito.given;
+import static org.mockito.Mockito.*;
+
class BbsActionsTaskTest {
- private static final String CORRECT_LOGICAL_LINK_JSON = "bbs_action/correct_logical_link.json";
- public static final String AAI_URL = "https://aai.onap.svc.cluster.local:8443/aai/v12/network/logical-links/logical-link/some-link";
+ private static final String AAI_URL = "https://aai.onap.svc.cluster.local:8443/aai/v12/network/logical-links/logical-link/some-link";
private CbsConfiguration cbsConfiguration = mock(CbsConfiguration.class);
-
private AaiClientConfiguration aaiClientConfiguration = TestAppConfiguration.createDefaultAaiClientConfiguration();
private RxHttpClient httpClient = mock(RxHttpClient.class);