aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/test/java/org/onap/clamp/clds/it/CldsDaoItCase.java2
-rw-r--r--src/test/java/org/onap/clamp/clds/it/sdc/controller/installer/CsarInstallerItCase.java30
-rw-r--r--src/test/java/org/onap/clamp/clds/model/CldsDbServiceCacheTest.java14
-rw-r--r--src/test/java/org/onap/clamp/clds/sdc/controller/installer/CsarHandlerTest.java4
4 files changed, 25 insertions, 25 deletions
diff --git a/src/test/java/org/onap/clamp/clds/it/CldsDaoItCase.java b/src/test/java/org/onap/clamp/clds/it/CldsDaoItCase.java
index ba37b57f8..788a7ff7c 100644
--- a/src/test/java/org/onap/clamp/clds/it/CldsDaoItCase.java
+++ b/src/test/java/org/onap/clamp/clds/it/CldsDaoItCase.java
@@ -44,10 +44,10 @@ import org.junit.Test;
import org.junit.runner.RunWith;
import org.onap.clamp.clds.client.req.sdc.SdcCatalogServices;
import org.onap.clamp.clds.dao.CldsDao;
-import org.onap.clamp.clds.model.CldsMonitoringDetails;
import org.onap.clamp.clds.model.CldsDbServiceCache;
import org.onap.clamp.clds.model.CldsEvent;
import org.onap.clamp.clds.model.CldsModel;
+import org.onap.clamp.clds.model.CldsMonitoringDetails;
import org.onap.clamp.clds.model.CldsServiceData;
import org.onap.clamp.clds.model.CldsTemplate;
import org.onap.clamp.clds.util.ResourceFileUtil;
diff --git a/src/test/java/org/onap/clamp/clds/it/sdc/controller/installer/CsarInstallerItCase.java b/src/test/java/org/onap/clamp/clds/it/sdc/controller/installer/CsarInstallerItCase.java
index fc5cb040f..92fa59f33 100644
--- a/src/test/java/org/onap/clamp/clds/it/sdc/controller/installer/CsarInstallerItCase.java
+++ b/src/test/java/org/onap/clamp/clds/it/sdc/controller/installer/CsarInstallerItCase.java
@@ -104,22 +104,22 @@ public class CsarInstallerItCase {
String generatedName = RandomStringUtils.randomAlphanumeric(5);
csarInstaller.installTheCsar(buildFakeCsarHandler(generatedName));
// Get the template back from DB
- CldsTemplate templateFromDB = CldsTemplate.retrieve(cldsDao,
+ CldsTemplate templateFromDb = CldsTemplate.retrieve(cldsDao,
CsarInstallerImpl.TEMPLATE_NAME_PREFIX + generatedName, false);
- assertNotNull(templateFromDB);
- assertNotNull(templateFromDB.getBpmnText());
- assertNotNull(templateFromDB.getImageText());
- assertNotNull(templateFromDB.getPropText());
- assertTrue(templateFromDB.getPropText().contains("global")
- && templateFromDB.getPropText().contains("node_templates:"));
- assertEquals(templateFromDB.getName(), CsarInstallerImpl.TEMPLATE_NAME_PREFIX + generatedName);
+ assertNotNull(templateFromDb);
+ assertNotNull(templateFromDb.getBpmnText());
+ assertNotNull(templateFromDb.getImageText());
+ assertNotNull(templateFromDb.getPropText());
+ assertTrue(templateFromDb.getPropText().contains("global")
+ && templateFromDb.getPropText().contains("node_templates:"));
+ assertEquals(templateFromDb.getName(), CsarInstallerImpl.TEMPLATE_NAME_PREFIX + generatedName);
// Get the Model back from DB
- CldsModel modelFromDB = CldsModel.retrieve(cldsDao, generatedName, true);
- assertNotNull(modelFromDB);
- assertNotNull(modelFromDB.getBpmnText());
- assertNotNull(modelFromDB.getImageText());
- assertNotNull(modelFromDB.getPropText());
- assertEquals(modelFromDB.getName(), generatedName);
- assertEquals(CsarInstallerImpl.MODEL_NAME_PREFIX, modelFromDB.getControlNamePrefix());
+ CldsModel modelFromDb = CldsModel.retrieve(cldsDao, generatedName, true);
+ assertNotNull(modelFromDb);
+ assertNotNull(modelFromDb.getBpmnText());
+ assertNotNull(modelFromDb.getImageText());
+ assertNotNull(modelFromDb.getPropText());
+ assertEquals(modelFromDb.getName(), generatedName);
+ assertEquals(CsarInstallerImpl.MODEL_NAME_PREFIX, modelFromDb.getControlNamePrefix());
}
}
diff --git a/src/test/java/org/onap/clamp/clds/model/CldsDbServiceCacheTest.java b/src/test/java/org/onap/clamp/clds/model/CldsDbServiceCacheTest.java
index 447e25531..033c67d42 100644
--- a/src/test/java/org/onap/clamp/clds/model/CldsDbServiceCacheTest.java
+++ b/src/test/java/org/onap/clamp/clds/model/CldsDbServiceCacheTest.java
@@ -41,15 +41,15 @@ public class CldsDbServiceCacheTest {
cldsServiceData.setServiceUUID("testUUID");
cldsServiceData.setAgeOfRecord(Long.valueOf(100));
cldsServiceData.setServiceInvariantUUID("testInvariantUUID");
- List<CldsVfData> cldsVfs = new ArrayList<>();
CldsVfData cldsVfData = new CldsVfData();
cldsVfData.setVfName("vf");
- List<CldsVfKPIData> cldsKPIList = new ArrayList<>();
- CldsVfKPIData cldsVfKPIData = new CldsVfKPIData();
- cldsVfKPIData.setFieldPath("fieldPath");
- cldsVfKPIData.setFieldPathValue("fieldValue");
- cldsKPIList.add(cldsVfKPIData);
- cldsVfData.setCldsKPIList(cldsKPIList);
+ CldsVfKPIData cldsVfKpiData = new CldsVfKPIData();
+ cldsVfKpiData.setFieldPath("fieldPath");
+ cldsVfKpiData.setFieldPathValue("fieldValue");
+ List<CldsVfKPIData> cldsKpiList = new ArrayList<>();
+ cldsKpiList.add(cldsVfKpiData);
+ cldsVfData.setCldsKPIList(cldsKpiList);
+ List<CldsVfData> cldsVfs = new ArrayList<>();
cldsVfs.add(cldsVfData);
cldsServiceData.setCldsVfs(cldsVfs);
CldsDbServiceCache cldsDbServiceCache = new CldsDbServiceCache(cldsServiceData);
diff --git a/src/test/java/org/onap/clamp/clds/sdc/controller/installer/CsarHandlerTest.java b/src/test/java/org/onap/clamp/clds/sdc/controller/installer/CsarHandlerTest.java
index c842068d9..5486e652b 100644
--- a/src/test/java/org/onap/clamp/clds/sdc/controller/installer/CsarHandlerTest.java
+++ b/src/test/java/org/onap/clamp/clds/sdc/controller/installer/CsarHandlerTest.java
@@ -90,8 +90,6 @@ public class CsarHandlerTest {
// Build what is needed for UUID
Mockito.when(notifData.getServiceInvariantUUID()).thenReturn(SERVICE_UUID);
// Build fake resource with one artifact BLUEPRINT
- List<IResourceInstance> resourcesList = new ArrayList<>();
- List<IArtifactInfo> artifactsListForResource = new ArrayList<>();
IResourceInstance resource1 = Mockito.mock(IResourceInstance.class);
Mockito.when(resource1.getResourceType()).thenReturn("VF");
Mockito.when(resource1.getResourceInvariantUUID()).thenReturn(RESOURCE1_UUID);
@@ -99,8 +97,10 @@ public class CsarHandlerTest {
IArtifactInfo blueprintArtifact = Mockito.mock(IArtifactInfo.class);
Mockito.when(blueprintArtifact.getArtifactType()).thenReturn(CsarHandler.BLUEPRINT_TYPE);
Mockito.when(blueprintArtifact.getArtifactName()).thenReturn(BLUEPRINT1_NAME);
+ List<IArtifactInfo> artifactsListForResource = new ArrayList<>();
artifactsListForResource.add(blueprintArtifact);
Mockito.when(resource1.getArtifacts()).thenReturn(artifactsListForResource);
+ List<IResourceInstance> resourcesList = new ArrayList<>();
resourcesList.add(resource1);
Mockito.when(notifData.getResources()).thenReturn(resourcesList);
return notifData;