Search in sources :

Example 6 with VnfRecipe

use of org.onap.so.db.catalog.beans.VnfRecipe in project so by onap.

the class CatalogDbClientTest method testGetFirstVnfRecipeByNfRoleAndActionNotFound.

@Test
public void testGetFirstVnfRecipeByNfRoleAndActionNotFound() {
    VnfRecipe vnfRecipe = client.getFirstVnfRecipeByNfRoleAndAction(UUID.randomUUID().toString(), "createInstance");
    assertNull(vnfRecipe);
}
Also used : VnfRecipe(org.onap.so.db.catalog.beans.VnfRecipe) Test(org.junit.Test) CatalogDbAdapterBaseTest(org.onap.so.adapters.catalogdb.CatalogDbAdapterBaseTest)

Example 7 with VnfRecipe

use of org.onap.so.db.catalog.beans.VnfRecipe in project so by onap.

the class QueryResourceRecipeTest method convertToJsonEmptyRecipe.

@Test
public void convertToJsonEmptyRecipe() {
    QueryResourceRecipe vnfQueryRR = new QueryResourceRecipe(new VnfRecipe());
    QueryResourceRecipe networkQueryRR = new QueryResourceRecipe(new NetworkRecipe());
    QueryResourceRecipe arQueryRR = new QueryResourceRecipe(new ArRecipe());
    String expected = "{\"orchestrationUri\":\"\",\"action\":\"\",\"description\":\"\",\"id\":\"\",\"recipeTimeout\":\"\",\"paramXSD\":\"\"}";
    assertEquals(expected, vnfQueryRR.JSON2(false, false));
    assertEquals(expected, networkQueryRR.JSON2(false, false));
    assertEquals(expected, arQueryRR.JSON2(false, false));
}
Also used : ArRecipe(org.onap.so.db.catalog.beans.ArRecipe) NetworkRecipe(org.onap.so.db.catalog.beans.NetworkRecipe) VnfRecipe(org.onap.so.db.catalog.beans.VnfRecipe) Test(org.junit.Test)

Aggregations

VnfRecipe (org.onap.so.db.catalog.beans.VnfRecipe)7 Test (org.junit.Test)3 CatalogDbAdapterBaseTest (org.onap.so.adapters.catalogdb.CatalogDbAdapterBaseTest)2 EntityNotFoundException (javax.persistence.EntityNotFoundException)1 ArRecipe (org.onap.so.db.catalog.beans.ArRecipe)1 NetworkRecipe (org.onap.so.db.catalog.beans.NetworkRecipe)1 Recipe (org.onap.so.db.catalog.beans.Recipe)1 ServiceRecipe (org.onap.so.db.catalog.beans.ServiceRecipe)1 VfModule (org.onap.so.db.catalog.beans.VfModule)1 VfModuleCustomization (org.onap.so.db.catalog.beans.VfModuleCustomization)1 VnfResource (org.onap.so.db.catalog.beans.VnfResource)1 VnfResourceCustomization (org.onap.so.db.catalog.beans.VnfResourceCustomization)1 ValidationException (org.onap.so.exceptions.ValidationException)1 ModelInfo (org.onap.so.serviceinstancebeans.ModelInfo)1 RelatedInstance (org.onap.so.serviceinstancebeans.RelatedInstance)1 RelatedInstanceList (org.onap.so.serviceinstancebeans.RelatedInstanceList)1 HttpEntity (org.springframework.http.HttpEntity)1 HttpHeaders (org.springframework.http.HttpHeaders)1 HttpClientErrorException (org.springframework.web.client.HttpClientErrorException)1