From 8dd94f5ef470840a9f58db22c38349914ff27d5f Mon Sep 17 00:00:00 2001 From: Venkata Harish K Kajur Date: Mon, 28 Aug 2017 14:08:13 -0400 Subject: [AAI-217 Amsterdam] Remove the att references in the schema and core files Change-Id: Id1b3469ba298b2137665e8ad16b4d74121d434a2 Signed-off-by: Venkata Harish K Kajur --- .../openecomp/aai/parsers/uri/URIToDBKeyTest.java | 52 ---------- .../parsers/uri/URIToExtensionInformationTest.java | 105 --------------------- 2 files changed, 157 deletions(-) delete mode 100644 aai-core/src/test/java/org/openecomp/aai/parsers/uri/URIToExtensionInformationTest.java (limited to 'aai-core/src/test/java') diff --git a/aai-core/src/test/java/org/openecomp/aai/parsers/uri/URIToDBKeyTest.java b/aai-core/src/test/java/org/openecomp/aai/parsers/uri/URIToDBKeyTest.java index 59c5dd40..5ba47119 100644 --- a/aai-core/src/test/java/org/openecomp/aai/parsers/uri/URIToDBKeyTest.java +++ b/aai-core/src/test/java/org/openecomp/aai/parsers/uri/URIToDBKeyTest.java @@ -62,47 +62,6 @@ public class URIToDBKeyTest { System.setProperty("AJSC_HOME", "."); System.setProperty("BUNDLECONFIG_DIR", "src/test/resources/bundleconfig-local"); } - - /** - * Uri. - * - * @throws JAXBException the JAXB exception - * @throws AAIException the AAI exception - * @throws IllegalArgumentException the illegal argument exception - * @throws UnsupportedEncodingException the unsupported encoding exception - */ - @Test - public void uri() throws JAXBException, AAIException, IllegalArgumentException, UnsupportedEncodingException { - URI uri = UriBuilder.fromPath("/aai/" + loader.getVersion() + "/cloud-infrastructure/tenants/tenant/key1/vservers/vserver/key2/l-interfaces/l-interface/key3").build(); - URIToDBKey parse = new URIToDBKey(loader, uri); - Object result = parse.getResult(); - - String expected = "cloud-region/att-aic/AAIAIC25/tenant/key1/vserver/key2/l-interface/key3"; - - assertEquals("blah", expected, result); - - } - - /** - * Uri no version. - * - * @throws JAXBException the JAXB exception - * @throws AAIException the AAI exception - * @throws IllegalArgumentException the illegal argument exception - * @throws UnsupportedEncodingException the unsupported encoding exception - */ - @Test - public void uriNoVersion() throws JAXBException, AAIException, IllegalArgumentException, UnsupportedEncodingException { - URI uri = UriBuilder.fromPath("/cloud-infrastructure/tenants/tenant/key1/vservers/vserver/key2/l-interfaces/l-interface/key3").build(); - URIToDBKey parse = new URIToDBKey(loader, uri); - Object result = parse.getResult(); - - String expected = "cloud-region/att-aic/AAIAIC25/tenant/key1/vserver/key2/l-interface/key3"; - - assertEquals("blah", expected, result); - - } - /** * Bad URI. @@ -148,17 +107,6 @@ public class URIToDBKeyTest { * @throws IllegalArgumentException the illegal argument exception * @throws UnsupportedEncodingException the unsupported encoding exception */ - @Test - public void startsWithValidNamespace() throws JAXBException, AAIException, IllegalArgumentException, UnsupportedEncodingException { - URI uri = UriBuilder.fromPath("/aai/" + loader.getVersion() + "/cloud-infrastructure/tenants/tenant/key1/vservers/vserver/key2/l-interfaces/l-interface/key3").build(); - - URIToDBKey parse = new URIToDBKey(loader, uri); - Object result = parse.getResult(); - - String expected = "cloud-region/att-aic/AAIAIC25/tenant/key1/vserver/key2/l-interface/key3"; - - assertEquals("blah", expected, result); - } /** * Naming exceptions. diff --git a/aai-core/src/test/java/org/openecomp/aai/parsers/uri/URIToExtensionInformationTest.java b/aai-core/src/test/java/org/openecomp/aai/parsers/uri/URIToExtensionInformationTest.java deleted file mode 100644 index 4250fc88..00000000 --- a/aai-core/src/test/java/org/openecomp/aai/parsers/uri/URIToExtensionInformationTest.java +++ /dev/null @@ -1,105 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * org.openecomp.aai - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ - -package org.openecomp.aai.parsers.uri; - -import static org.junit.Assert.assertEquals; - -import java.io.UnsupportedEncodingException; -import java.net.URI; - -import javax.ws.rs.core.UriBuilder; -import javax.xml.bind.JAXBException; - -import org.junit.BeforeClass; -import org.junit.Ignore; -import org.junit.Test; - -import org.openecomp.aai.exceptions.AAIException; -import org.openecomp.aai.introspection.Loader; -import org.openecomp.aai.introspection.LoaderFactory; -import org.openecomp.aai.introspection.ModelType; -import org.openecomp.aai.introspection.Version; -import org.openecomp.aai.restcore.HttpMethod; - -@Ignore -public class URIToExtensionInformationTest { - - private Loader v8Loader = LoaderFactory.createLoaderForVersion(ModelType.MOXY, Version.v8); - - /** - * Configure. - */ - @BeforeClass - public static void configure() { - System.setProperty("AJSC_HOME", "."); - System.setProperty("BUNDLECONFIG_DIR", "src/test/resources/bundleconfig-local"); - } - - /** - * Vservers V 7. - * - * @throws JAXBException the JAXB exception - * @throws AAIException the AAI exception - * @throws IllegalArgumentException the illegal argument exception - * @throws UnsupportedEncodingException the unsupported encoding exception - */ - @Test - public void vserversV8() throws JAXBException, AAIException, IllegalArgumentException, UnsupportedEncodingException { - URI uri = UriBuilder.fromPath("/aai/" + v8Loader.getVersion() + "/cloud-infrastructure/cloud-regions/cloud-region/att-aic/AAIAIC25/tenants/tenant/key1/vservers/vserver/key2").build(); - URIToExtensionInformation parse = new URIToExtensionInformation(v8Loader, uri); - - String namespace = "cloudInfrastructure"; - String preMethodName = "DynamicAddCloudInfrastructureCloudRegionsCloudRegionTenantsTenantVserversVserverPreProc"; - String postMethodName = "DynamicAddCloudInfrastructureCloudRegionsCloudRegionTenantsTenantVserversVserverPostProc"; - String topLevel = "CloudRegion"; - testSpec(parse, HttpMethod.PUT, namespace, preMethodName, postMethodName, topLevel); - - } - - /** - * Test spec. - * - * @param info the info - * @param httpMethod the http method - * @param namespace the namespace - * @param preMethodName the pre method name - * @param postMethodName the post method name - * @param topLevel the top level - */ - private void testSpec(URIToExtensionInformation info, HttpMethod httpMethod, String namespace, String preMethodName, String postMethodName, String topLevel) { - - - String namespaceResult = info.getNamespace(); - String methodNameResult = info.getMethodName(httpMethod, true); - - assertEquals("namespace", namespace, namespaceResult); - assertEquals("preprocess method name", preMethodName, methodNameResult); - methodNameResult = info.getMethodName(httpMethod, false); - - assertEquals("postprocess method name", postMethodName, methodNameResult); - - String topLevelResult = info.getTopObject(); - - assertEquals("topLevel", topLevel, topLevelResult); - } - - -} -- cgit 1.2.3-korg