summaryrefslogtreecommitdiffstats
path: root/bpmn/MSOCoreBPMN
diff options
context:
space:
mode:
Diffstat (limited to 'bpmn/MSOCoreBPMN')
-rw-r--r--bpmn/MSOCoreBPMN/pom.xml8
-rw-r--r--bpmn/MSOCoreBPMN/src/main/java/org/onap/so/bpmn/core/UrnPropertiesReader.java14
-rw-r--r--bpmn/MSOCoreBPMN/src/main/java/org/onap/so/bpmn/core/domain/CompareModelsResult.java6
-rw-r--r--bpmn/MSOCoreBPMN/src/main/java/org/onap/so/bpmn/core/xml/XmlTool.java3
-rw-r--r--bpmn/MSOCoreBPMN/src/test/java/org/onap/so/bpmn/core/domain/LicenseTest.java49
-rw-r--r--bpmn/MSOCoreBPMN/src/test/java/org/onap/so/bpmn/core/internal/VariableNameExtractorTest.java2
6 files changed, 30 insertions, 52 deletions
diff --git a/bpmn/MSOCoreBPMN/pom.xml b/bpmn/MSOCoreBPMN/pom.xml
index fc686e503c..6fe3168dc7 100644
--- a/bpmn/MSOCoreBPMN/pom.xml
+++ b/bpmn/MSOCoreBPMN/pom.xml
@@ -4,7 +4,7 @@
<parent>
<groupId>org.onap.so</groupId>
<artifactId>bpmn</artifactId>
- <version>1.3.0-SNAPSHOT</version>
+ <version>1.4.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>MSOCoreBPMN</artifactId>
@@ -59,8 +59,6 @@
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
- <version>3.0.1</version>
- <scope>provided</scope>
</dependency>
<dependency>
<groupId>org.camunda.connect</groupId>
@@ -70,12 +68,12 @@
<dependency>
<groupId>org.camunda.bpm</groupId>
<artifactId>camunda-engine-plugin-connect</artifactId>
- <version>7.7.0</version>
+ <version>${camunda.version}</version>
</dependency>
<dependency>
<groupId>org.camunda.bpm</groupId>
<artifactId>camunda-engine</artifactId>
- <version>7.7.0</version>
+ <version>${camunda.version}</version>
</dependency>
<dependency>
<groupId>org.codehaus.groovy</groupId>
diff --git a/bpmn/MSOCoreBPMN/src/main/java/org/onap/so/bpmn/core/UrnPropertiesReader.java b/bpmn/MSOCoreBPMN/src/main/java/org/onap/so/bpmn/core/UrnPropertiesReader.java
index 750cd241e8..5100085020 100644
--- a/bpmn/MSOCoreBPMN/src/main/java/org/onap/so/bpmn/core/UrnPropertiesReader.java
+++ b/bpmn/MSOCoreBPMN/src/main/java/org/onap/so/bpmn/core/UrnPropertiesReader.java
@@ -87,6 +87,20 @@ public class UrnPropertiesReader {
}
}
+ /**
+ * Return the String array URN property value from the environment object
+ * @param variableName URN property name
+ * @return URN property value
+ */
+
+ public static String[] getVariablesArray(String variableName){
+ if (environment != null) {
+ return environment.getProperty(variableName, String[].class);
+ } else {
+ return null;
+ }
+ }
+
public static String getVariable(String variableName, String defaultValue) {
return Optional.ofNullable(getVariable(variableName)).orElse(defaultValue);
}
diff --git a/bpmn/MSOCoreBPMN/src/main/java/org/onap/so/bpmn/core/domain/CompareModelsResult.java b/bpmn/MSOCoreBPMN/src/main/java/org/onap/so/bpmn/core/domain/CompareModelsResult.java
index bb50597c31..d021394731 100644
--- a/bpmn/MSOCoreBPMN/src/main/java/org/onap/so/bpmn/core/domain/CompareModelsResult.java
+++ b/bpmn/MSOCoreBPMN/src/main/java/org/onap/so/bpmn/core/domain/CompareModelsResult.java
@@ -27,9 +27,9 @@ public class CompareModelsResult extends JsonWrapper implements Serializable
{
private static final long serialVersionUID = 1L;
- List<ResourceModelInfo> addedResourceList;
- List<ResourceModelInfo> deletedResourceList;
- List<String> requestInputs;
+ private List<ResourceModelInfo> addedResourceList;
+ private List<ResourceModelInfo> deletedResourceList;
+ private List<String> requestInputs;
public List<ResourceModelInfo> getAddedResourceList() {
return addedResourceList;
diff --git a/bpmn/MSOCoreBPMN/src/main/java/org/onap/so/bpmn/core/xml/XmlTool.java b/bpmn/MSOCoreBPMN/src/main/java/org/onap/so/bpmn/core/xml/XmlTool.java
index f261b56f00..49bf95fab0 100644
--- a/bpmn/MSOCoreBPMN/src/main/java/org/onap/so/bpmn/core/xml/XmlTool.java
+++ b/bpmn/MSOCoreBPMN/src/main/java/org/onap/so/bpmn/core/xml/XmlTool.java
@@ -119,7 +119,8 @@ public final class XmlTool {
// End of code to remove whitespace outside of tags
// the factory pattern supports different XSLT processors
- TransformerFactory transformerFactory = TransformerFactory.newInstance();
+ TransformerFactory transformerFactory = TransformerFactory.newInstance();
+ transformerFactory.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, true);
Transformer transformer = transformerFactory.newTransformer(xsltSource);
transformer.setOutputProperty(OutputKeys.INDENT, "yes");
diff --git a/bpmn/MSOCoreBPMN/src/test/java/org/onap/so/bpmn/core/domain/LicenseTest.java b/bpmn/MSOCoreBPMN/src/test/java/org/onap/so/bpmn/core/domain/LicenseTest.java
index e3133cb1c6..f3a96bf4eb 100644
--- a/bpmn/MSOCoreBPMN/src/test/java/org/onap/so/bpmn/core/domain/LicenseTest.java
+++ b/bpmn/MSOCoreBPMN/src/test/java/org/onap/so/bpmn/core/domain/LicenseTest.java
@@ -20,70 +20,35 @@
package org.onap.so.bpmn.core.domain;
-import static org.junit.Assert.assertArrayEquals;
import static org.junit.Assert.assertEquals;
import java.util.ArrayList;
import java.util.List;
-import org.junit.Before;
import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.mockito.BDDMockito.Then;
-import org.mockito.InjectMocks;
-import org.mockito.Mock;
-import org.powermock.api.mockito.PowerMockito;
-import org.powermock.core.classloader.annotations.PrepareForTest;
-import org.powermock.modules.junit4.PowerMockRunner;
-//@RunWith(PowerMockRunner.class)
-//@PrepareForTest({License.class})
-public class LicenseTest {
-
- //@Mock
- private License license= new License();
- //@InjectMocks
- //private LicenseTest licenceTest;
+
+public class LicenseTest {
+
+ private License license= new License();
List<String> entitlementPoolList = new ArrayList<String>();
private List<String> licenseKeyGroupList = new ArrayList<String>();
- //JSONArray array = new JSONArray(entitlementPoolList);
- //JSONArray array1 = new JSONArray(licenseKeyGroupList);
- //@PrepareForTest({License.class})
+
Long serialVersionUID = 333L;
@Test
public void testLicense() {
license.setEntitlementPoolList(entitlementPoolList);
- license.setLicenseKeyGroupList(licenseKeyGroupList);
- //license.addEntitlementPool("entitlementPoolUuid");
+ license.setLicenseKeyGroupList(licenseKeyGroupList);
license.addLicenseKeyGroup("licenseKeyGroupUuid");
assertEquals(license.getEntitlementPoolList(), entitlementPoolList);
assertEquals(license.getLicenseKeyGroupList(), licenseKeyGroupList);
assert(license.getEntitlementPoolListAsString()!= null);
assert(license.getLicenseKeyGroupListAsString()!=null);
license.addEntitlementPool("entitlementPoolUuid");
- //assertEquals(license.getSerialversionuid(), serialVersionUID);
- //assertArrayEquals(license.getSerialversionuid(), serialVersionUID);
- //assert
-
- /*PowerMockito.mockStatic(License.class);
- Mockito.when(License.getSerialversionuid()).thenReturn(getserial());
- assertEquals(License.getSerialversionuid(),"abc");*/
+
}
- // @Before
- // public void mocksetUp() {
-// Long serialVersionUID = 333L;
-// PowerMockito.mockStatic(License.class);
-// expect (license.getSerialversionuid()).andReturn(serialVersionUID);
-// //PowerMockito.when(license.getSerialversionuid().
-// //PowerMockito.when(MathUtil.addInteger(2, 2)).thenReturn(1);
-// }
- /*private Long getserial() {
-
- return abc;
- }*/
-
}
diff --git a/bpmn/MSOCoreBPMN/src/test/java/org/onap/so/bpmn/core/internal/VariableNameExtractorTest.java b/bpmn/MSOCoreBPMN/src/test/java/org/onap/so/bpmn/core/internal/VariableNameExtractorTest.java
index e32bc88b7c..14b8c49655 100644
--- a/bpmn/MSOCoreBPMN/src/test/java/org/onap/so/bpmn/core/internal/VariableNameExtractorTest.java
+++ b/bpmn/MSOCoreBPMN/src/test/java/org/onap/so/bpmn/core/internal/VariableNameExtractorTest.java
@@ -21,7 +21,7 @@
package org.onap.so.bpmn.core.internal;
import static org.hamcrest.CoreMatchers.containsString;
import static org.junit.Assert.*;
-import static org.mockito.Matchers.contains;
+import static org.mockito.ArgumentMatchers.contains;
import java.util.Optional;
import org.junit.Test;