summaryrefslogtreecommitdiffstats
path: root/common/src/test/java/org/onap
diff options
context:
space:
mode:
authorLukasz Muszkieta <lukasz.muszkieta@nokia.com>2018-10-10 16:08:53 +0200
committerLukasz Muszkieta <lukasz.muszkieta@nokia.com>2018-10-17 16:14:06 +0200
commit510eb0a7acd4ecc59820761177d8d1834aa1980a (patch)
treefcc721f63f6f109f5b16ba8d7d0b4690d1e32491 /common/src/test/java/org/onap
parentdae0218b5134920ddbbc76be657aebcb3314e1bd (diff)
remove unused code
UUID parameter in AAIRestClientI interface is redundant - part 1 Issue-ID: SO-729 Change-Id: I7db331098911e6e183d921175f3109f62b7aedbd Signed-off-by: Lukasz Muszkieta <lukasz.muszkieta@nokia.com>
Diffstat (limited to 'common/src/test/java/org/onap')
-rw-r--r--common/src/test/java/org/onap/so/client/aai/AAIPServerTest.java12
-rw-r--r--common/src/test/java/org/onap/so/client/aai/AAIValidatorTest.java11
2 files changed, 6 insertions, 17 deletions
diff --git a/common/src/test/java/org/onap/so/client/aai/AAIPServerTest.java b/common/src/test/java/org/onap/so/client/aai/AAIPServerTest.java
index 37188bc4bc..ba48e4368d 100644
--- a/common/src/test/java/org/onap/so/client/aai/AAIPServerTest.java
+++ b/common/src/test/java/org/onap/so/client/aai/AAIPServerTest.java
@@ -25,20 +25,14 @@ import static org.junit.Assert.assertEquals;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Paths;
-import java.security.NoSuchAlgorithmException;
import java.util.List;
-import java.util.UUID;
-
import org.junit.Ignore;
import org.junit.Test;
import org.onap.aai.domain.yang.Pserver;
-
-import com.fasterxml.jackson.core.JsonParseException;
-import com.fasterxml.jackson.databind.JsonMappingException;
public class AAIPServerTest {
@Test
- public void pserverTest() throws JsonParseException, JsonMappingException, IOException, NoSuchAlgorithmException {
+ public void pserverTest() throws IOException {
AAIRestClientImpl client = new AAIRestClientImpl();
String json = new String(Files.readAllBytes(Paths.get("src/test/resources/__files/aai/pserver.json")));
List<Pserver> list = client.getListOfPservers(json);
@@ -49,9 +43,9 @@ public class AAIPServerTest {
@Test
@Ignore // IGNORED FOR 1710 MERGE TO ONAP
- public void pserverActualTest() throws JsonParseException, JsonMappingException, IOException, NoSuchAlgorithmException {
+ public void pserverActualTest() throws IOException {
AAIRestClientImpl client = new AAIRestClientImpl();
- List<Pserver> list = client.getPhysicalServerByVnfId("d946afed-8ebe-4c5d-9665-54fcc043b8e7", UUID.randomUUID().toString());
+ List<Pserver> list = client.getPhysicalServerByVnfId("d946afed-8ebe-4c5d-9665-54fcc043b8e7");
assertEquals("", list.size(), 0);
}
diff --git a/common/src/test/java/org/onap/so/client/aai/AAIValidatorTest.java b/common/src/test/java/org/onap/so/client/aai/AAIValidatorTest.java
index 04c8b15b51..a2de528d9f 100644
--- a/common/src/test/java/org/onap/so/client/aai/AAIValidatorTest.java
+++ b/common/src/test/java/org/onap/so/client/aai/AAIValidatorTest.java
@@ -24,10 +24,8 @@ import static org.junit.Assert.assertEquals;
import static org.mockito.Mockito.when;
import java.io.IOException;
-import java.io.UnsupportedEncodingException;
import java.util.ArrayList;
import java.util.List;
-
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
@@ -36,9 +34,6 @@ import org.mockito.runners.MockitoJUnitRunner;
import org.onap.aai.domain.yang.GenericVnf;
import org.onap.aai.domain.yang.Pserver;
-import com.fasterxml.jackson.core.JsonParseException;
-import com.fasterxml.jackson.databind.JsonMappingException;
-
@RunWith(MockitoJUnitRunner.class)
public class AAIValidatorTest {
@@ -70,14 +65,14 @@ public class AAIValidatorTest {
@Test
public void test_IsPhysicalServerLocked_True() throws IOException{
- when(client.getPhysicalServerByVnfId(vnfName,uuid)).thenReturn(getPservers(true));
+ when(client.getPhysicalServerByVnfId(vnfName)).thenReturn(getPservers(true));
boolean locked = validator.isPhysicalServerLocked(vnfName, uuid);
assertEquals(true, locked);
}
@Test
- public void test_IsPhysicalServerLocked_False() throws JsonParseException, JsonMappingException, UnsupportedEncodingException, IOException {
- when(client.getPhysicalServerByVnfId(vnfName,uuid)).thenReturn(getPservers(false));
+ public void test_IsPhysicalServerLocked_False() throws IOException {
+ when(client.getPhysicalServerByVnfId(vnfName)).thenReturn(getPservers(false));
boolean locked = validator.isPhysicalServerLocked(vnfName, uuid);
assertEquals(false, locked);
}