summaryrefslogtreecommitdiffstats
path: root/adapters/mso-catalog-db-adapter/src
diff options
context:
space:
mode:
Diffstat (limited to 'adapters/mso-catalog-db-adapter/src')
-rw-r--r--adapters/mso-catalog-db-adapter/src/test/java/org/onap/so/db/catalog/client/CatalogDbClientTest.java15
1 files changed, 15 insertions, 0 deletions
diff --git a/adapters/mso-catalog-db-adapter/src/test/java/org/onap/so/db/catalog/client/CatalogDbClientTest.java b/adapters/mso-catalog-db-adapter/src/test/java/org/onap/so/db/catalog/client/CatalogDbClientTest.java
index 51b44b0d3a..9265e5aa54 100644
--- a/adapters/mso-catalog-db-adapter/src/test/java/org/onap/so/db/catalog/client/CatalogDbClientTest.java
+++ b/adapters/mso-catalog-db-adapter/src/test/java/org/onap/so/db/catalog/client/CatalogDbClientTest.java
@@ -673,4 +673,19 @@ public class CatalogDbClientTest extends CatalogDbAdapterBaseTest {
Assert.assertNull(workflow);
}
+ @Test
+ public void getWorkflowBySource_validSource_expectedOutput() {
+ List<Workflow> workflows = client.findWorkflowBySource("sdc");
+ assertTrue(workflows != null);
+ assertTrue(workflows.size() != 0);
+
+ assertEquals("testingWorkflow", workflows.get(0).getArtifactName());
+ }
+
+ @Test
+ public void getWorkflowBySource_invalidSource_nullOutput() {
+ List<Workflow> workflow = client.findWorkflowBySource("abc");
+ Assert.assertNull(workflow);
+ }
+
}