aboutsummaryrefslogtreecommitdiffstats
path: root/bpmn/MSOCommonBPMN
diff options
context:
space:
mode:
Diffstat (limited to 'bpmn/MSOCommonBPMN')
-rw-r--r--bpmn/MSOCommonBPMN/pom.xml5
-rw-r--r--bpmn/MSOCommonBPMN/src/test/groovy/org/onap/so/bpmn/common/scripts/MsoGroovyTest.groovy5
-rw-r--r--bpmn/MSOCommonBPMN/src/test/groovy/org/onap/so/bpmn/common/scripts/UpdateAAIVfModuleTest.groovy10
3 files changed, 10 insertions, 10 deletions
diff --git a/bpmn/MSOCommonBPMN/pom.xml b/bpmn/MSOCommonBPMN/pom.xml
index 5d9c1a3acd..ec8ad3127c 100644
--- a/bpmn/MSOCommonBPMN/pom.xml
+++ b/bpmn/MSOCommonBPMN/pom.xml
@@ -1,6 +1,5 @@
<?xml version="1.0"?>
-<project
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
+<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<parent>
@@ -23,7 +22,7 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.0</version>
- <configuration>
+ <configuration>
<compilerId>groovy-eclipse-compiler</compilerId>
</configuration>
diff --git a/bpmn/MSOCommonBPMN/src/test/groovy/org/onap/so/bpmn/common/scripts/MsoGroovyTest.groovy b/bpmn/MSOCommonBPMN/src/test/groovy/org/onap/so/bpmn/common/scripts/MsoGroovyTest.groovy
index 59b34c4074..79b40ba385 100644
--- a/bpmn/MSOCommonBPMN/src/test/groovy/org/onap/so/bpmn/common/scripts/MsoGroovyTest.groovy
+++ b/bpmn/MSOCommonBPMN/src/test/groovy/org/onap/so/bpmn/common/scripts/MsoGroovyTest.groovy
@@ -57,9 +57,10 @@ abstract class MsoGroovyTest {
protected static final String CLOUD_OWNER = Defaults.CLOUD_OWNER.toString();
protected void init(String procName){
- mockExecution = setupMock(procName)
- when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ // mockExecution = setupMock(procName)
+ // when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
client = mock(AAIResourcesClient.class)
+ mockExecution = mock(ExecutionEntity.class)
}
protected ExecutionEntity setupMock(String procName) {
diff --git a/bpmn/MSOCommonBPMN/src/test/groovy/org/onap/so/bpmn/common/scripts/UpdateAAIVfModuleTest.groovy b/bpmn/MSOCommonBPMN/src/test/groovy/org/onap/so/bpmn/common/scripts/UpdateAAIVfModuleTest.groovy
index 99b178c044..39aadd29d7 100644
--- a/bpmn/MSOCommonBPMN/src/test/groovy/org/onap/so/bpmn/common/scripts/UpdateAAIVfModuleTest.groovy
+++ b/bpmn/MSOCommonBPMN/src/test/groovy/org/onap/so/bpmn/common/scripts/UpdateAAIVfModuleTest.groovy
@@ -25,7 +25,7 @@ import org.junit.rules.ExpectedException
import static org.mockito.Mockito.*
import javax.ws.rs.NotFoundException
-
+import org.camunda.bpm.engine.ProcessEngineServices
import org.camunda.bpm.engine.delegate.BpmnError
import org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity
import org.junit.Before
@@ -57,6 +57,7 @@ class UpdateAAIVfModuleTest extends MsoGroovyTest {
void init() throws IOException {
super.init("UpdateAAIVfModule")
when(updateAAIVfModule.getAAIClient()).thenReturn(client)
+ mockExecution = setupMock("UpdateAAIVfModule")
}
@Test
@@ -110,7 +111,7 @@ class UpdateAAIVfModuleTest extends MsoGroovyTest {
when(mockExecution.getVariable(prefix + "getVfModuleResponse")).thenReturn(vfModule)
doNothing().when(client).update(isA(AAIResourceUri.class) as AAIResourceUri, anyObject())
updateAAIVfModule.updateVfModule(mockExecution)
- verify(mockExecution).setVariable("UAAIVfMod_updateVfModuleResponseCode", 200)
+ verify(mockExecution).setVariable("UAAIVfMod_updateVfModuleResponseCode", 200)
}
@Test
@@ -126,7 +127,7 @@ class UpdateAAIVfModuleTest extends MsoGroovyTest {
doThrow(new NotFoundException("Vf Module not found")).when(client).update(isA(AAIResourceUri.class) as AAIResourceUri, anyObject())
thrown.expect(BpmnError.class)
updateAAIVfModule.updateVfModule(mockExecution)
- verify(mockExecution).setVariable("UAAIVfMod_updateVfModuleResponseCode", 404)
+ verify(mockExecution).setVariable("UAAIVfMod_updateVfModuleResponseCode", 404)
}
@@ -143,7 +144,6 @@ class UpdateAAIVfModuleTest extends MsoGroovyTest {
doThrow(new IllegalStateException("Error in AAI client")).when(client).update(isA(AAIResourceUri.class) as AAIResourceUri, anyObject())
thrown.expect(BpmnError.class)
updateAAIVfModule.updateVfModule(mockExecution)
- verify(mockExecution).setVariable("UAAIVfMod_updateVfModuleResponseCode", 500)
-
+ verify(mockExecution).setVariable("UAAIVfMod_updateVfModuleResponseCode", 500)
}
}