diff options
author | Ram Krishna Verma <ram_krishna.verma@bell.ca> | 2021-01-06 18:42:19 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2021-01-06 18:42:19 +0000 |
commit | ad8ea25422ff46907e46ef61bb482b0d03b38cd7 (patch) | |
tree | 8434b4ce44863ffcc7e21be9b64417eb93d0b037 /applications/common/src/test | |
parent | 4b5e8ed5ca0d56b49f2ee3f485fac5ec4490d585 (diff) | |
parent | f4a86b5bc37350c15c62544cea5e22ce7b6f931b (diff) |
Merge "Changed identifiers to concept identifiers"
Diffstat (limited to 'applications/common/src/test')
-rw-r--r-- | applications/common/src/test/java/org/onap/policy/pdp/xacml/application/common/PolicyApiCallerTest.java | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/applications/common/src/test/java/org/onap/policy/pdp/xacml/application/common/PolicyApiCallerTest.java b/applications/common/src/test/java/org/onap/policy/pdp/xacml/application/common/PolicyApiCallerTest.java index 6e7ec7c8..31cb481f 100644 --- a/applications/common/src/test/java/org/onap/policy/pdp/xacml/application/common/PolicyApiCallerTest.java +++ b/applications/common/src/test/java/org/onap/policy/pdp/xacml/application/common/PolicyApiCallerTest.java @@ -1,6 +1,7 @@ /*- * ============LICENSE_START======================================================= * Copyright (C) 2019 AT&T Intellectual Property. All rights reserved. + * Modifications Copyright (C) 2021 Nordix Foundation. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -50,8 +51,8 @@ import org.onap.policy.common.endpoints.parameters.RestServerParameters; import org.onap.policy.common.endpoints.properties.PolicyEndPointProperties; import org.onap.policy.common.gson.GsonMessageBodyHandler; import org.onap.policy.common.utils.network.NetworkUtil; +import org.onap.policy.models.tosca.authorative.concepts.ToscaConceptIdentifier; import org.onap.policy.models.tosca.authorative.concepts.ToscaPolicyType; -import org.onap.policy.models.tosca.authorative.concepts.ToscaPolicyTypeIdentifier; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -138,22 +139,22 @@ public class PolicyApiCallerTest { @Test public void testGetPolicyType() throws Exception { - assertNotNull(api.getPolicyType(new ToscaPolicyTypeIdentifier(MY_TYPE, MY_VERSION))); + assertNotNull(api.getPolicyType(new ToscaConceptIdentifier(MY_TYPE, MY_VERSION))); - assertThatThrownBy(() -> api.getPolicyType(new ToscaPolicyTypeIdentifier(INVALID_TYPE, MY_VERSION))) + assertThatThrownBy(() -> api.getPolicyType(new ToscaConceptIdentifier(INVALID_TYPE, MY_VERSION))) .isInstanceOf(PolicyApiException.class); - assertThatThrownBy(() -> api.getPolicyType(new ToscaPolicyTypeIdentifier(UNKNOWN_TYPE, MY_VERSION))) + assertThatThrownBy(() -> api.getPolicyType(new ToscaConceptIdentifier(UNKNOWN_TYPE, MY_VERSION))) .isInstanceOf(NotFoundException.class); - assertThatThrownBy(() -> api.getPolicyType(new ToscaPolicyTypeIdentifier(NOT_A_TYPE, MY_VERSION))) + assertThatThrownBy(() -> api.getPolicyType(new ToscaConceptIdentifier(NOT_A_TYPE, MY_VERSION))) .isInstanceOf(PolicyApiException.class); // connect to a port that has no server when(clientParams.getPort()).thenReturn(NetworkUtil.allocPort()); api = new PolicyApiCaller(clientParams); - assertThatThrownBy(() -> api.getPolicyType(new ToscaPolicyTypeIdentifier(MY_TYPE, MY_VERSION))) + assertThatThrownBy(() -> api.getPolicyType(new ToscaConceptIdentifier(MY_TYPE, MY_VERSION))) .isInstanceOf(PolicyApiException.class); } |