import org.onap.so.aaisimulator.service.providers.LinesOfBusinessCacheServiceProvider;
import org.onap.so.aaisimulator.service.providers.PlatformCacheServiceProvider;
import org.onap.so.aaisimulator.utils.Constants;
+import org.onap.so.aaisimulator.utils.TestConstants;
import org.onap.so.aaisimulator.utils.TestUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpHeaders;
public void test_putGenericVnfRelationToPlatform_successfullyAddedToCache() throws Exception {
addCustomerServiceAndGenericVnf();
- final String platformUrl = getUrl(Constants.PLATFORMS_URL, PLATFORM_NAME);
+ final String platformUrl = getUrl(TestConstants.PLATFORMS_URL, PLATFORM_NAME);
final ResponseEntity<Void> platformResponse =
testRestTemplateService.invokeHttpPut(platformUrl, TestUtils.getPlatform(), Void.class);
assertEquals(HttpStatus.ACCEPTED, platformResponse.getStatusCode());
assertEquals(Constants.USES, relationship.getRelationshipLabel());
assertFalse(relationship.getRelationshipData().isEmpty());
assertEquals(1, relationship.getRelationshipData().size());
- assertEquals(Constants.PLATFORMS_URL + PLATFORM_NAME, relationship.getRelatedLink());
+ assertEquals(TestConstants.PLATFORMS_URL + PLATFORM_NAME, relationship.getRelatedLink());
final List<RelationshipData> relationshipData = relationship.getRelationshipData();
public void test_putGenericVnfRelationToLineOfBusiness_successfullyAddedToCache() throws Exception {
addCustomerServiceAndGenericVnf();
- final String url = getUrl(Constants.LINES_OF_BUSINESS_URL, LINE_OF_BUSINESS_NAME);
+ final String url = getUrl(TestConstants.LINES_OF_BUSINESS_URL, LINE_OF_BUSINESS_NAME);
final ResponseEntity<Void> responseEntity =
testRestTemplateService.invokeHttpPut(url, TestUtils.getLineOfBusiness(), Void.class);
assertEquals(HttpStatus.ACCEPTED, responseEntity.getStatusCode());
final Relationship relationship = relationshipList.getRelationship().get(0);
assertEquals(Constants.USES, relationship.getRelationshipLabel());
- assertEquals(Constants.LINES_OF_BUSINESS_URL + LINE_OF_BUSINESS_NAME, relationship.getRelatedLink());
+ assertEquals(TestConstants.LINES_OF_BUSINESS_URL + LINE_OF_BUSINESS_NAME, relationship.getRelatedLink());
assertFalse(relationship.getRelationshipData().isEmpty());
assertEquals(1, relationship.getRelationshipData().size());
public void test_putGenericVnfRelationToCloudRegion_successfullyAddedToCache() throws Exception {
addCustomerServiceAndGenericVnf();
- final String url = getUrl(Constants.CLOUD_REGIONS, CLOUD_OWNER_NAME, "/" + CLOUD_REGION_NAME);
+ final String url = getUrl(TestConstants.CLOUD_REGIONS, CLOUD_OWNER_NAME, "/" + CLOUD_REGION_NAME);
final ResponseEntity<Void> responseEntity =
testRestTemplateService.invokeHttpPut(url, TestUtils.getCloudRegion(), Void.class);
final Relationship relationship = relationshipList.getRelationship().get(0);
assertEquals(Constants.LOCATED_IN, relationship.getRelationshipLabel());
- assertEquals(Constants.CLOUD_REGIONS + CLOUD_OWNER_NAME + "/" + CLOUD_REGION_NAME,
+ assertEquals(TestConstants.CLOUD_REGIONS + CLOUD_OWNER_NAME + "/" + CLOUD_REGION_NAME,
relationship.getRelatedLink());
assertFalse(relationship.getRelationshipData().isEmpty());
addCustomerServiceAndGenericVnf();
final String selfLink = "http://localhost:9921/generic-vnf/" + VNF_ID;
- final String url = getUrl(Constants.GENERIC_VNFS_URL) + "?selflink=" + selfLink;
+ final String url = getUrl(TestConstants.GENERIC_VNFS_URL_1) + "?selflink=" + selfLink;
final ResponseEntity<GenericVnfs> response = testRestTemplateService.invokeHttpGet(url, GenericVnfs.class);
assertEquals(HttpStatus.OK, response.getStatusCode());