Code Review
/
so.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Merge "explicitly type defs and strings for templates"
[so.git]
/
bpmn
/
MSOCommonBPMN
/
src
/
test
/
groovy
/
org
/
onap
/
so
/
bpmn
/
common
/
scripts
/
SDNCAdapterUtilsTest.groovy
diff --git
a/bpmn/MSOCommonBPMN/src/test/groovy/org/onap/so/bpmn/common/scripts/SDNCAdapterUtilsTest.groovy
b/bpmn/MSOCommonBPMN/src/test/groovy/org/onap/so/bpmn/common/scripts/SDNCAdapterUtilsTest.groovy
index
803e2b0
..
51dd77d
100644
(file)
--- a/
bpmn/MSOCommonBPMN/src/test/groovy/org/onap/so/bpmn/common/scripts/SDNCAdapterUtilsTest.groovy
+++ b/
bpmn/MSOCommonBPMN/src/test/groovy/org/onap/so/bpmn/common/scripts/SDNCAdapterUtilsTest.groovy
@@
-26,6
+26,7
@@
import static org.mockito.Mockito.*
import org.junit.Before
import org.junit.Ignore
import org.junit.Test
import org.junit.Before
import org.junit.Ignore
import org.junit.Test
+import org.junit.runner.RunWith
import org.camunda.bpm.engine.delegate.BpmnError
import org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity
import org.camunda.bpm.engine.delegate.DelegateExecution
import org.camunda.bpm.engine.delegate.BpmnError
import org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity
import org.camunda.bpm.engine.delegate.DelegateExecution
@@
-34,6
+35,9
@@
import org.onap.so.bpmn.common.scripts.SDNCAdapterUtils
import org.onap.so.bpmn.mock.FileUtil
import org.onap.so.bpmn.mock.FileUtil
+import org.mockito.junit.MockitoJUnitRunner;
+
+@RunWith(MockitoJUnitRunner.Silent.class)
public class SDNCAdapterUtilsTest {
private def map
public class SDNCAdapterUtilsTest {
private def map
@@
-59,14
+63,14
@@
public class SDNCAdapterUtilsTest {
// svcex gets its variables from "map"
when(svcex.getVariable(any())).thenAnswer(
{ invocation ->
// svcex gets its variables from "map"
when(svcex.getVariable(any())).thenAnswer(
{ invocation ->
- return map.get(invocation.getArgument
At(0, String.class
)) })
+ return map.get(invocation.getArgument
(0
)) })
// svcex puts its variables into "map"
when(svcex.setVariable(any(), any())).thenAnswer(
{ invocation ->
return map.put(
// svcex puts its variables into "map"
when(svcex.setVariable(any(), any())).thenAnswer(
{ invocation ->
return map.put(
- invocation.getArgument
At(0, String.class
),
- invocation.getArgument
At(1, String.class
)) })
+ invocation.getArgument
(0
),
+ invocation.getArgument
(1
)) })
map.put("isDebugLogEnabled", "true")
map.put("prefix", "mypfx-")
map.put("isDebugLogEnabled", "true")
map.put("prefix", "mypfx-")
@@
-176,7
+180,7
@@
public class SDNCAdapterUtilsTest {
def rc = respcode
def rm = respmsg
def rc = respcode
def rm = respmsg
-
def
output = """
+
String
output = """
<output xmlns="org:onap:sdnc:northbound:generic-resource">
<svc-request-id>8b46e36e-b44f-4085-9404-427be1bc8a3</svc-request-id>
<response-code>${MsoUtils.xmlEscape(rc)}</response-code>
<output xmlns="org:onap:sdnc:northbound:generic-resource">
<svc-request-id>8b46e36e-b44f-4085-9404-427be1bc8a3</svc-request-id>
<response-code>${MsoUtils.xmlEscape(rc)}</response-code>