diff options
author | Lukasz Muszkieta <lukasz.muszkieta@nokia.com> | 2017-12-15 15:33:13 +0100 |
---|---|---|
committer | Lukasz Muszkieta <lukasz.muszkieta@nokia.com> | 2017-12-15 15:33:13 +0100 |
commit | 36f192b978d3cd3bb11e524b80174eb6711eeb0a (patch) | |
tree | b9e3bbebdcd93c17de32d5f2da02e7399420a37f /src/test/java/org | |
parent | a4096a47f893c1ed0a231303093c3fbba6865641 (diff) |
Code refactoring
Change-Id: Iadcaf1006ccf400d41cfa5aa5674ce4af1376668
Issue-ID: CLAMP-93
Signed-off-by: Lukasz Muszkieta <lukasz.muszkieta@nokia.com>
Diffstat (limited to 'src/test/java/org')
-rw-r--r-- | src/test/java/org/onap/clamp/clds/it/CldsDaoItCase.java | 4 | ||||
-rw-r--r-- | src/test/java/org/onap/clamp/clds/it/CldsServiceItCase.java | 7 |
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); |