summaryrefslogtreecommitdiffstats
path: root/applications/match
diff options
context:
space:
mode:
Diffstat (limited to 'applications/match')
-rw-r--r--applications/match/src/main/java/org/onap/policy/xacml/pdp/application/match/MatchPdpApplication.java8
-rw-r--r--applications/match/src/test/java/org/onap/policy/xacml/pdp/application/match/MatchPdpApplicationTest.java9
2 files changed, 5 insertions, 12 deletions
diff --git a/applications/match/src/main/java/org/onap/policy/xacml/pdp/application/match/MatchPdpApplication.java b/applications/match/src/main/java/org/onap/policy/xacml/pdp/application/match/MatchPdpApplication.java
index cd16a2ce..9cf56878 100644
--- a/applications/match/src/main/java/org/onap/policy/xacml/pdp/application/match/MatchPdpApplication.java
+++ b/applications/match/src/main/java/org/onap/policy/xacml/pdp/application/match/MatchPdpApplication.java
@@ -25,7 +25,7 @@ package org.onap.policy.xacml.pdp.application.match;
import java.nio.file.Path;
import java.util.Arrays;
-import org.onap.policy.common.endpoints.event.comm.bus.internal.BusTopicParams;
+import org.onap.policy.common.endpoints.http.client.HttpClient;
import org.onap.policy.models.tosca.authorative.concepts.ToscaConceptIdentifier;
import org.onap.policy.pdp.xacml.application.common.ToscaPolicyTranslator;
import org.onap.policy.pdp.xacml.application.common.XacmlApplicationException;
@@ -54,18 +54,18 @@ public class MatchPdpApplication extends StdXacmlApplicationServiceProvider {
}
@Override
- public void initialize(Path pathForData, BusTopicParams policyApiParameters)
+ public void initialize(Path pathForData, HttpClient policyApiClient)
throws XacmlApplicationException {
//
// Store our API parameters and path for translator so it
// can go get Policy Types
//
this.translator.setPathForData(pathForData);
- this.translator.setApiRestParameters(policyApiParameters);
+ this.translator.setApiClient(policyApiClient);
//
// Let our super class do its thing
//
- super.initialize(pathForData, policyApiParameters);
+ super.initialize(pathForData, policyApiClient);
}
@Override
diff --git a/applications/match/src/test/java/org/onap/policy/xacml/pdp/application/match/MatchPdpApplicationTest.java b/applications/match/src/test/java/org/onap/policy/xacml/pdp/application/match/MatchPdpApplicationTest.java
index ff154d93..03222342 100644
--- a/applications/match/src/test/java/org/onap/policy/xacml/pdp/application/match/MatchPdpApplicationTest.java
+++ b/applications/match/src/test/java/org/onap/policy/xacml/pdp/application/match/MatchPdpApplicationTest.java
@@ -24,8 +24,6 @@
package org.onap.policy.xacml.pdp.application.match;
import static org.assertj.core.api.Assertions.assertThat;
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.when;
import com.att.research.xacml.api.Response;
import java.io.File;
@@ -44,7 +42,6 @@ import org.junit.FixMethodOrder;
import org.junit.Test;
import org.junit.rules.TemporaryFolder;
import org.junit.runners.MethodSorters;
-import org.onap.policy.common.endpoints.event.comm.bus.internal.BusTopicParams;
import org.onap.policy.common.utils.coder.CoderException;
import org.onap.policy.common.utils.coder.StandardCoder;
import org.onap.policy.common.utils.resources.ResourceUtils;
@@ -67,7 +64,6 @@ public class MatchPdpApplicationTest {
private static XacmlApplicationServiceProvider service;
private static StandardCoder gson = new StandardCoder();
private static DecisionRequest baseRequest;
- private static BusTopicParams clientParams;
@ClassRule
public static final TemporaryFolder policyFolder = new TemporaryFolder();
@@ -79,9 +75,6 @@ public class MatchPdpApplicationTest {
*/
@BeforeClass
public static void setUp() throws Exception {
- clientParams = mock(BusTopicParams.class);
- when(clientParams.getHostname()).thenReturn("localhost");
- when(clientParams.getPort()).thenReturn(6969);
//
// Load Single Decision Request
//
@@ -137,7 +130,7 @@ public class MatchPdpApplicationTest {
// Tell it to initialize based on the properties file
// we just built for it.
//
- service.initialize(propertiesFile.toPath().getParent(), clientParams);
+ service.initialize(propertiesFile.toPath().getParent(), null);
}
@Test