aboutsummaryrefslogtreecommitdiffstats
path: root/src/test/java
diff options
context:
space:
mode:
authorSébastien Determe <sd378r@intl.att.com>2018-01-09 08:36:21 +0000
committerGerrit Code Review <gerrit@onap.org>2018-01-09 08:36:21 +0000
commit5321c8806269753d783d594be76a0561e67c4674 (patch)
treee411d57c5b98615debb553038843ddd29139ce2f /src/test/java
parenta029b8b76a2a2d028f8a97f6a6884d90ebfd3fbc (diff)
parent36f192b978d3cd3bb11e524b80174eb6711eeb0a (diff)
Merge "Code refactoring"
Diffstat (limited to 'src/test/java')
-rw-r--r--src/test/java/org/onap/clamp/clds/it/CldsDaoItCase.java4
-rw-r--r--src/test/java/org/onap/clamp/clds/it/CldsServiceItCase.java7
2 files changed, 4 insertions, 7 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 6373e1531..f09fd9b19 100644
--- a/src/test/java/org/onap/clamp/clds/it/CldsDaoItCase.java
+++ b/src/test/java/org/onap/clamp/clds/it/CldsDaoItCase.java
@@ -73,7 +73,7 @@ public class CldsDaoItCase extends AbstractItCase {
}
@Test
- public void testModelSave() throws IOException {
+ public void testModelSave() {
String randomNameTemplate = RandomStringUtils.randomAlphanumeric(5);
// Add the template first
CldsTemplate newTemplate = new CldsTemplate();
@@ -97,7 +97,6 @@ public class CldsDaoItCase extends AbstractItCase {
newModel.setTemplateName(randomNameTemplate);
newModel.setTemplateId(newTemplate.getId());
newModel.setDocText(newTemplate.getPropText());
- newModel.setDocId(newTemplate.getPropId());
// Save the model in DB
cldsDao.setModel(newModel, "user");
// Test if the model can be retrieved
@@ -139,7 +138,6 @@ public class CldsDaoItCase extends AbstractItCase {
newModel.setTemplateName("test-template-for-event");
newModel.setTemplateId(newTemplate.getId());
newModel.setDocText(newTemplate.getPropText());
- newModel.setDocId(newTemplate.getPropId());
CldsEvent.insEvent(cldsDao, newModel, "user", CldsEvent.ACTION_RESTART, CldsEvent.ACTION_STATE_COMPLETED,
"process-instance-id");
}
diff --git a/src/test/java/org/onap/clamp/clds/it/CldsServiceItCase.java b/src/test/java/org/onap/clamp/clds/it/CldsServiceItCase.java
index 0f65ef0cb..9dac2dc14 100644
--- a/src/test/java/org/onap/clamp/clds/it/CldsServiceItCase.java
+++ b/src/test/java/org/onap/clamp/clds/it/CldsServiceItCase.java
@@ -85,7 +85,7 @@ public class CldsServiceItCase extends AbstractItCase {
}
@Test
- public void testCldsInfoNotAuthorized() throws Exception {
+ public void testCldsInfoNotAuthorized() {
SecurityContext securityContext = Mockito.mock(SecurityContext.class);
Principal principal = Mockito.mock(Principal.class);
Mockito.when(principal.getName()).thenReturn("admin");
@@ -123,7 +123,7 @@ public class CldsServiceItCase extends AbstractItCase {
}
@Test
- public void testGetHealthCheck() throws Exception {
+ public void testGetHealthCheck() {
CldsHealthCheck cldsHealthCheck = cldsService.gethealthcheck();
assertNotNull(cldsHealthCheck);
assertEquals("UP", cldsHealthCheck.getHealthCheckStatus());
@@ -132,7 +132,7 @@ public class CldsServiceItCase extends AbstractItCase {
}
@Test
- public void testPutModel() throws Exception {
+ public void testPutModel() {
SecurityContext securityContext = Mockito.mock(SecurityContext.class);
Principal principal = Mockito.mock(Principal.class);
Mockito.when(principal.getName()).thenReturn("admin");
@@ -164,7 +164,6 @@ public class CldsServiceItCase extends AbstractItCase {
newModel.setTemplateName("test-template");
newModel.setTemplateId(newTemplate.getId());
newModel.setDocText(newTemplate.getPropText());
- newModel.setDocId(newTemplate.getPropId());
// Test the PutModel method
String randomNameModel = RandomStringUtils.randomAlphanumeric(5);
cldsService.putModel(randomNameModel, newModel);