From fd4d683baf4344b058090e0b0203929103cacedf Mon Sep 17 00:00:00 2001 From: Elena Kuleshov Date: Mon, 8 Apr 2019 22:08:29 -0400 Subject: Query CatalogDB for WorkflowSpecifications Query CatalogDB for WorkflowSpecifications fron APIH Change-Id: I5eef5ba9b49c0a7420ef93a5425121bfe7225b1b Issue-ID: SO-1727 Signed-off-by: Kuleshov, Elena --- .../db/catalog/data/repository/WorkflowRepositoryTest.java | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'mso-catalog-db/src/test/java') diff --git a/mso-catalog-db/src/test/java/org/onap/so/db/catalog/data/repository/WorkflowRepositoryTest.java b/mso-catalog-db/src/test/java/org/onap/so/db/catalog/data/repository/WorkflowRepositoryTest.java index d541627d0e..4f31e4b38c 100644 --- a/mso-catalog-db/src/test/java/org/onap/so/db/catalog/data/repository/WorkflowRepositoryTest.java +++ b/mso-catalog-db/src/test/java/org/onap/so/db/catalog/data/repository/WorkflowRepositoryTest.java @@ -18,12 +18,10 @@ import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertTrue; import java.util.List; +import org.junit.Assert; import org.junit.Test; import org.onap.so.db.catalog.BaseTest; -import org.onap.so.db.catalog.beans.PnfResource; -import org.onap.so.db.catalog.beans.PnfResourceCustomization; import org.onap.so.db.catalog.beans.Workflow; -import org.onap.so.db.catalog.exceptions.NoEntityFoundException; import org.springframework.beans.factory.annotation.Autowired; public class WorkflowRepositoryTest extends BaseTest { @@ -38,4 +36,14 @@ public class WorkflowRepositoryTest extends BaseTest { assertEquals("artifactName", "testingWorkflow", workflow.getArtifactName()); } + @Test + public void findByVnfResourceModelUUIDTest() throws Exception { + List workflows = workflowRepository.findWorkflowByModelUUID("ff2ae348-214a-11e7-93ae-92361f002671"); + + Assert.assertTrue(workflows != null); + Assert.assertTrue(workflows.size() != 0); + + Assert.assertTrue("testingWorkflow".equals(workflows.get(0).getArtifactName())); + } + } -- cgit 1.2.3-korg