summaryrefslogtreecommitdiffstats
path: root/mso-catalog-db/src/test/java/org
diff options
context:
space:
mode:
authorElena Kuleshov <evn@att.com>2019-04-08 22:08:29 -0400
committerElena Kuleshov <evn@att.com>2019-04-09 02:21:13 -0400
commitfd4d683baf4344b058090e0b0203929103cacedf (patch)
tree6502f61ed2ea62545cd93156856cc3d7876b0e7f /mso-catalog-db/src/test/java/org
parented66a29ce8e0068740466e13fa6517791cce9aeb (diff)
Query CatalogDB for WorkflowSpecifications
Query CatalogDB for WorkflowSpecifications fron APIH Change-Id: I5eef5ba9b49c0a7420ef93a5425121bfe7225b1b Issue-ID: SO-1727 Signed-off-by: Kuleshov, Elena <evn@att.com>
Diffstat (limited to 'mso-catalog-db/src/test/java/org')
-rw-r--r--mso-catalog-db/src/test/java/org/onap/so/db/catalog/data/repository/WorkflowRepositoryTest.java14
1 files changed, 11 insertions, 3 deletions
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<Workflow> 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()));
+ }
+
}