diff options
Diffstat (limited to 'common/src/test/java')
-rw-r--r-- | common/src/test/java/org/onap/so/client/aai/AAIPServerTest.java | 12 | ||||
-rw-r--r-- | common/src/test/java/org/onap/so/client/aai/AAIValidatorTest.java | 11 |
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); } |