* ============LICENSE_START=======================================================
* org.onap.aai
* ================================================================================
- * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+ * Copyright © 2017-2018 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.
* See the License for the specific language governing permissions and
* limitations under the License.
* ============LICENSE_END=========================================================
- *
- * ECOMP is a trademark and service mark of AT&T Intellectual Property.
*/
package org.onap.aai.parsers.relationship;
public void onlyLink() throws AAIException, URISyntaxException, IOException {
Loader loader = LoaderFactory.createLoaderForVersion(modelType, version10);
Introspector obj = loader.unmarshal("relationship", this.getJsonString("only-related-link.json"));
- URI expected = new URI("/aai/v10/network/test-objects/test-object/key1");
+ URI expected = new URI("/aai/v10/network/generic-vnfs/generic-vnf/key1");
RelationshipToURI parse = new RelationshipToURI(loader, obj);
public void onlyData() throws AAIException, URISyntaxException, IOException {
Loader loader = LoaderFactory.createLoaderForVersion(modelType, version10);
Introspector obj = loader.unmarshal("relationship", this.getJsonString("only-relationship-data.json"));
- URI expected = new URI("/network/test-objects/test-object/key1");
+ URI expected = new URI("/network/generic-vnfs/generic-vnf/key1");
RelationshipToURI parse = new RelationshipToURI(loader, obj);
public void failV10() throws AAIException, URISyntaxException, IOException {
Loader loader = LoaderFactory.createLoaderForVersion(modelType, version10);
Introspector obj = loader.unmarshal("relationship", this.getJsonString("both-failv10-successv9.json"));
- URI expected = new URI("/aai/v10/network/test-objects/test-object/key1");
+ URI expected = new URI("/aai/v10/network/generic-vnfs/generic-vnf/key1");
thrown.expect(AAIIdentityMapParseException.class);
thrown.expect(hasProperty("code", is("AAI_3000")));
public void successV9() throws AAIException, URISyntaxException, IOException {
Loader loader = LoaderFactory.createLoaderForVersion(modelType, version9);
Introspector obj = loader.unmarshal("relationship", this.getJsonString("both-failv10-successv9.json"));
- URI expected = new URI("/network/test-objects/test-object/key2");
+ URI expected = new URI("/network/generic-vnfs/generic-vnf/key2");
RelationshipToURI parse = new RelationshipToURI(loader, obj);
URI uri = parse.getUri();
public void failV9() throws AAIException, URISyntaxException, IOException {
Loader loader = LoaderFactory.createLoaderForVersion(modelType, version9);
Introspector obj = loader.unmarshal("relationship", this.getJsonString("both-successv10-failv9.json"));
- URI expected = new URI("/network/test-objects/test-object/key1");
+ URI expected = new URI("/network/generic-vnfs/generic-vnf/key1");
thrown.expect(AAIIdentityMapParseException.class);
thrown.expect(hasProperty("code", is("AAI_3000")));
public void failNothingToParse() throws AAIException, URISyntaxException, IOException {
Loader loader = LoaderFactory.createLoaderForVersion(modelType, version10);
Introspector obj = loader.unmarshal("relationship", this.getJsonString("nothing-to-parse.json"));
- URI expected = new URI("/aai/v10/network/test-objects/test-object/key1");
+ URI expected = new URI("/aai/v10/network/generic-vnfs/generic-vnf/key1");
thrown.expect(AAIIdentityMapParseException.class);
thrown.expect(hasProperty("code", is("AAI_3000")));
public void successV10() throws AAIException, URISyntaxException, IOException {
Loader loader = LoaderFactory.createLoaderForVersion(modelType, version10);
Introspector obj = loader.unmarshal("relationship", this.getJsonString("both-successv10-failv9.json"));
- URI expected = new URI("/aai/v10/network/test-objects/test-object/key1");
+ URI expected = new URI("/aai/v10/network/generic-vnfs/generic-vnf/key1");
RelationshipToURI parse = new RelationshipToURI(loader, obj);
public void ambiguousRelationship() throws AAIException, URISyntaxException, IOException {
Loader loader = LoaderFactory.createLoaderForVersion(modelType, version10);
Introspector obj = loader.unmarshal("relationship", this.getJsonString("ambiguous-relationship.json"));
- URI expected = new URI("/aai/v10/network/test-objects/test-object/key1");
+ URI expected = new URI("/aai/v10/network/generic-vnfs/generic-vnf/key1");
thrown.expect(AmbiguousMapAAIException.class);
thrown.expect(hasProperty("code", is("AAI_6146")));