diff options
Diffstat (limited to 'sdc-tosca/src/test/java/org/onap/sdc/impl')
7 files changed, 36 insertions, 33 deletions
diff --git a/sdc-tosca/src/test/java/org/onap/sdc/impl/CapReqWithSameNamesTest.java b/sdc-tosca/src/test/java/org/onap/sdc/impl/CapReqWithSameNamesTest.java index 4203293..2a1a8c5 100644 --- a/sdc-tosca/src/test/java/org/onap/sdc/impl/CapReqWithSameNamesTest.java +++ b/sdc-tosca/src/test/java/org/onap/sdc/impl/CapReqWithSameNamesTest.java @@ -20,8 +20,8 @@ package org.onap.sdc.impl; -import org.junit.BeforeClass; -import org.junit.Test; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; import org.onap.sdc.tosca.parser.api.IEntityDetails; import org.onap.sdc.tosca.parser.api.ISdcCsarHelper; import org.onap.sdc.tosca.parser.elements.queries.EntityQuery; @@ -34,13 +34,13 @@ import org.onap.sdc.toscaparser.api.RequirementAssignment; import java.net.URL; import java.util.List; -import static org.junit.Assert.assertEquals; +import static org.junit.jupiter.api.Assertions.assertEquals; public class CapReqWithSameNamesTest { private static ISdcCsarHelper helper = null; - @BeforeClass + @BeforeAll public static void setUpClass() { try { URL resource = GetEntityPortMirroringTest.class.getClassLoader() diff --git a/sdc-tosca/src/test/java/org/onap/sdc/impl/GetCvfcWithVfcTest.java b/sdc-tosca/src/test/java/org/onap/sdc/impl/GetCvfcWithVfcTest.java index 0fe75e2..b657577 100644 --- a/sdc-tosca/src/test/java/org/onap/sdc/impl/GetCvfcWithVfcTest.java +++ b/sdc-tosca/src/test/java/org/onap/sdc/impl/GetCvfcWithVfcTest.java @@ -18,7 +18,15 @@ * ============LICENSE_END========================================================= */ package org.onap.sdc.impl; -import org.junit.Test; + +import static com.google.common.collect.Lists.newArrayList; +import static org.assertj.core.api.Assertions.assertThat; + +import java.net.URL; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import org.junit.jupiter.api.Test; import org.onap.sdc.tosca.parser.api.IEntityDetails; import org.onap.sdc.tosca.parser.api.ISdcCsarHelper; import org.onap.sdc.tosca.parser.exceptions.SdcToscaParserException; @@ -26,14 +34,9 @@ import org.onap.sdc.tosca.parser.impl.SdcToscaParserFactory; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import java.net.URL; -import java.util.*; - -import static com.google.common.collect.Lists.newArrayList; -import static org.assertj.core.api.Assertions.assertThat; - public class GetCvfcWithVfcTest { + private static final String SERVICE_WITH_SINGLE_VF_CSAR = "csars/service-JennyVtsbcVlanSvc-csar.csar"; private static final String SERVICE_WITH_DOUBLE_VF_CSAR = "csars/service-Metaswitch1-csar.csar"; private static final String ABSTRACT_RTP_MSC = "abstract_rtp_msc"; @@ -45,7 +48,7 @@ public class GetCvfcWithVfcTest { private ISdcCsarHelper helper; private static Logger log = LoggerFactory.getLogger(GetCvfcWithVfcTest.class.getName()); - public void setUp(String path) { + public void setUp(String path) { try { URL resource = GetCvfcWithVfcTest.class.getClassLoader().getResource(path); if (resource != null) { @@ -58,7 +61,7 @@ public class GetCvfcWithVfcTest { } @Test - public void getCvfcsWithVfcsFromServiceWithSingleVfTest(){ + public void getCvfcsWithVfcsFromServiceWithSingleVfTest() { setUp(SERVICE_WITH_SINGLE_VF_CSAR); List<IEntityDetails> entities = helper.getVFModule(); List<String> actualMembersList = newArrayList(); @@ -69,7 +72,7 @@ public class GetCvfcWithVfcTest { } @Test - public void getCvfcsWithVfcsFromVfiSingleVfTest(){ + public void getCvfcsWithVfcsFromVfiSingleVfTest() { setUp(SERVICE_WITH_SINGLE_VF_CSAR); List<IEntityDetails> entities = helper.getVFModule("05e77410-a1d8-44fe-8440-b9410c8f98ee"); List<String> actualMembersList = newArrayList(); @@ -80,7 +83,7 @@ public class GetCvfcWithVfcTest { } @Test - public void getCvfcsWithVfcsFromServiceWithDuplicateVfTest(){ + public void getCvfcsWithVfcsFromServiceWithDuplicateVfTest() { setUp(SERVICE_WITH_DOUBLE_VF_CSAR); List<IEntityDetails> entities = helper.getVFModule(); List<String> actualMembersList = newArrayList(); @@ -96,7 +99,7 @@ public class GetCvfcWithVfcTest { @Test - public void getCvfcsWithVfcsFromVfiOnServiceWithDuplicateVfTest(){ + public void getCvfcsWithVfcsFromVfiOnServiceWithDuplicateVfTest() { setUp(SERVICE_WITH_DOUBLE_VF_CSAR); List<IEntityDetails> entities = helper.getVFModule("2b5f00de-8816-465c-b7bc-c36e26775e1e"); List<String> actualMembersList = newArrayList(); diff --git a/sdc-tosca/src/test/java/org/onap/sdc/impl/GetEntityPortMirroringTest.java b/sdc-tosca/src/test/java/org/onap/sdc/impl/GetEntityPortMirroringTest.java index 33e130e..3f4e720 100644 --- a/sdc-tosca/src/test/java/org/onap/sdc/impl/GetEntityPortMirroringTest.java +++ b/sdc-tosca/src/test/java/org/onap/sdc/impl/GetEntityPortMirroringTest.java @@ -20,8 +20,8 @@ package org.onap.sdc.impl; -import org.junit.BeforeClass; -import org.junit.Test; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; import org.onap.sdc.tosca.parser.api.IEntityDetails; import org.onap.sdc.tosca.parser.api.ISdcCsarHelper; import org.onap.sdc.tosca.parser.elements.queries.EntityQuery; @@ -38,8 +38,8 @@ import java.util.List; import java.util.Map; import java.util.stream.Collectors; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertTrue; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertTrue; public class GetEntityPortMirroringTest { @@ -47,7 +47,7 @@ public class GetEntityPortMirroringTest { private final static String cap1 = "radcomfnvlbavf11_3_3vepdg0.abstract_vlbagentbase_eph_aff.port_mirroring_vlbagentbase_eph_aff_vlbagentbase_eph_aff_int_pktmirror_1_port"; private static ISdcCsarHelper helper = null; - @BeforeClass + @BeforeAll public static void setUpClass() { try { URL resource = GetEntityPortMirroringTest.class.getClassLoader() diff --git a/sdc-tosca/src/test/java/org/onap/sdc/impl/GetEntityTest.java b/sdc-tosca/src/test/java/org/onap/sdc/impl/GetEntityTest.java index 327ab68..ed889e7 100644 --- a/sdc-tosca/src/test/java/org/onap/sdc/impl/GetEntityTest.java +++ b/sdc-tosca/src/test/java/org/onap/sdc/impl/GetEntityTest.java @@ -20,8 +20,8 @@ package org.onap.sdc.impl; -import org.junit.BeforeClass; -import org.junit.Test; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; import org.onap.sdc.tosca.parser.api.IEntityDetails; import org.onap.sdc.tosca.parser.api.ISdcCsarHelper; import org.onap.sdc.tosca.parser.elements.queries.EntityQuery; @@ -37,15 +37,15 @@ import org.onap.sdc.toscaparser.api.Property; import java.net.URL; import java.util.List; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNull; -import static org.junit.Assert.assertTrue; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNull; +import static org.junit.jupiter.api.Assertions.assertTrue; public class GetEntityTest { private static ISdcCsarHelper helper = null; - @BeforeClass + @BeforeAll public static void setUpClass() { try { URL resource = GetEntityTest.class.getClassLoader().getResource("csars/service-JennyVtsbcVlanSvc-csar.csar"); diff --git a/sdc-tosca/src/test/java/org/onap/sdc/impl/GetForwardingPathTest.java b/sdc-tosca/src/test/java/org/onap/sdc/impl/GetForwardingPathTest.java index 6c910e6..70410da 100644 --- a/sdc-tosca/src/test/java/org/onap/sdc/impl/GetForwardingPathTest.java +++ b/sdc-tosca/src/test/java/org/onap/sdc/impl/GetForwardingPathTest.java @@ -19,7 +19,7 @@ */ package org.onap.sdc.impl; -import org.junit.Test; +import org.junit.jupiter.api.Test; import org.onap.sdc.tosca.parser.api.IEntityDetails; import org.onap.sdc.tosca.parser.api.ISdcCsarHelper; import org.onap.sdc.tosca.parser.elements.queries.EntityQuery; diff --git a/sdc-tosca/src/test/java/org/onap/sdc/impl/GetVfModulesWithMembersTest.java b/sdc-tosca/src/test/java/org/onap/sdc/impl/GetVfModulesWithMembersTest.java index 55bff57..e8151ab 100644 --- a/sdc-tosca/src/test/java/org/onap/sdc/impl/GetVfModulesWithMembersTest.java +++ b/sdc-tosca/src/test/java/org/onap/sdc/impl/GetVfModulesWithMembersTest.java @@ -19,7 +19,7 @@ */ package org.onap.sdc.impl; -import org.junit.Test; +import org.junit.jupiter.api.Test; import org.onap.sdc.tosca.parser.api.IEntityDetails; import org.onap.sdc.tosca.parser.api.ISdcCsarHelper; import org.onap.sdc.tosca.parser.exceptions.SdcToscaParserException; diff --git a/sdc-tosca/src/test/java/org/onap/sdc/impl/ToscaParserDataTypeTest.java b/sdc-tosca/src/test/java/org/onap/sdc/impl/ToscaParserDataTypeTest.java index aed9445..142c18b 100644 --- a/sdc-tosca/src/test/java/org/onap/sdc/impl/ToscaParserDataTypeTest.java +++ b/sdc-tosca/src/test/java/org/onap/sdc/impl/ToscaParserDataTypeTest.java @@ -19,8 +19,8 @@ package org.onap.sdc.impl; -import org.junit.BeforeClass; -import org.junit.Test; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; import org.onap.sdc.tosca.parser.api.ISdcCsarHelper; import org.onap.sdc.tosca.parser.exceptions.SdcToscaParserException; import org.onap.sdc.tosca.parser.impl.SdcToscaParserFactory; @@ -32,7 +32,7 @@ import java.net.URL; import java.util.HashSet; import java.util.LinkedHashMap; -import static org.junit.Assert.assertThat; +import static org.hamcrest.MatcherAssert.assertThat; import static org.hamcrest.CoreMatchers.is; import static org.hamcrest.core.IsNull.notNullValue; @@ -48,7 +48,7 @@ public class ToscaParserDataTypeTest { private static final String TEST_DATATYPE_PROPERTY_TYPE = "type"; private static final String TEST_DATATYPE_PROPERTY_ENTRY_SCHEMA = "entry_schema"; - @BeforeClass + @BeforeAll public static void setUpClass() { try { URL resource = GetEntityPortMirroringTest.class.getClassLoader() |