diff options
author | Smokowski, Steven <steve.smokowski@att.com> | 2019-11-15 15:24:03 -0500 |
---|---|---|
committer | Benjamin, Max (mb388a) <mb388a@att.com> | 2019-11-15 15:24:03 -0500 |
commit | 73ee86531241e7c0103c7573996533c818452d50 (patch) | |
tree | ae0e6bf0110d8eb75df5566bdd4d9fe7020dba2e /bpmn/so-bpmn-tasks/src/test/java/org/onap | |
parent | 70c24f9edcb8351ca8f184294c0815db5eba1904 (diff) |
updated uri regular expression to support resume
updated uri regular expression to support resume
Issue-ID: SO-2522
Signed-off-by: Benjamin, Max (mb388a) <mb388a@att.com>
Change-Id: I0a44a374d46c7b3892acabe31c0621d37103b37a
Diffstat (limited to 'bpmn/so-bpmn-tasks/src/test/java/org/onap')
-rw-r--r-- | bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowActionTest.java | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowActionTest.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowActionTest.java index be6fc94890..cb5ffd6fa7 100644 --- a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowActionTest.java +++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowActionTest.java @@ -1477,6 +1477,27 @@ public class WorkflowActionTest extends BaseTaskTest { } @Test + public void extractResourceIdAndTypeFromUriReplaceResumeTest() { + Resource resource = workflowAction.extractResourceIdAndTypeFromUri( + "http://localhost:9100/onap/so/infra/serviceInstantiation/v7/serviceInstances/4ff87c63-461b-4d83-8121-d351e6db216c/vnfs/eea9b93b-b5b9-4fad-9c35-12d52e4b683f/vfModules/33cb74cd-9cb3-4090-a3c0-1b8c8e235847/deactivateAndCloudDelete/resume"); + assertEquals(resource.getResourceId(), "33cb74cd-9cb3-4090-a3c0-1b8c8e235847"); + } + + @Test + public void extractResourceIdAndTypeFromUriDeActiveResumeTest() { + Resource resource = workflowAction.extractResourceIdAndTypeFromUri( + "http://localhost:9100/onap/so/infra/serviceInstantiation/v7/serviceInstances/4ff87c63-461b-4d83-8121-d351e6db216c/vnfs/eea9b93b-b5b9-4fad-9c35-12d52e4b683f/vfModules/33cb74cd-9cb3-4090-a3c0-1b8c8e235847/replace/resume"); + assertEquals(resource.getResourceId(), "33cb74cd-9cb3-4090-a3c0-1b8c8e235847"); + } + + @Test + public void extractResourceIdAndTypeFromUriResumeIdOnly() { + Resource resource = workflowAction.extractResourceIdAndTypeFromUri( + "http://localhost:9100/onap/so/infra/serviceInstantiation/v7/serviceInstances/4ff87c63-461b-4d83-8121-d351e6db216c/vnfs/eea9b93b-b5b9-4fad-9c35-12d52e4b683f/vfModules/33cb74cd-9cb3-4090-a3c0-1b8c8e235847/resume"); + assertEquals(resource.getResourceId(), "33cb74cd-9cb3-4090-a3c0-1b8c8e235847"); + } + + @Test public void isUriResumeTest() { assertTrue(workflowAction.isUriResume( "http://localhost:9100/onap/so/infra/orchestrationRequests/v7/requests/2f8ab587-ef6a-4456-b7b2-d73f9363dabd/resume")); |