summaryrefslogtreecommitdiffstats
path: root/plugins/restconf-client/provider/src/test/java
diff options
context:
space:
mode:
authorDan Timoney <dtimoney@att.com>2022-07-21 08:25:58 -0400
committerDan Timoney <dtimoney@att.com>2022-07-21 08:25:58 -0400
commitde63cbb97a9f751f8856647dbf81eb632420cd9d (patch)
tree5a01dee9016aa40c2ca5948533170740e0c30721 /plugins/restconf-client/provider/src/test/java
parent01ec365d01605dd6b86c2c972eeea969835e74b8 (diff)
Migrate sli to sulfur sr1
Migrate sli to OpenDaylight Sulfur release Issue-ID: CCSDK-3693 Signed-off-by: Dan Timoney <dtimoney@att.com> Change-Id: I3ca6fb12a03038a9447747650ea2a6e6d6e71d9d
Diffstat (limited to 'plugins/restconf-client/provider/src/test/java')
-rw-r--r--plugins/restconf-client/provider/src/test/java/org/onap/ccsdk/sli/plugins/restconfapicall/TestRestconfApiUtils.java6
-rw-r--r--plugins/restconf-client/provider/src/test/java/org/onap/ccsdk/sli/plugins/restconfdiscovery/TestRestconfDiscoveryNode.java12
-rw-r--r--plugins/restconf-client/provider/src/test/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/DataFormatSerializerTest.java8
-rw-r--r--plugins/restconf-client/provider/src/test/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/IdentifierValidationTest.java8
-rw-r--r--plugins/restconf-client/provider/src/test/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/PropertiesSerializerTest.java28
5 files changed, 31 insertions, 31 deletions
diff --git a/plugins/restconf-client/provider/src/test/java/org/onap/ccsdk/sli/plugins/restconfapicall/TestRestconfApiUtils.java b/plugins/restconf-client/provider/src/test/java/org/onap/ccsdk/sli/plugins/restconfapicall/TestRestconfApiUtils.java
index a76bb52bf..153f6c2ad 100644
--- a/plugins/restconf-client/provider/src/test/java/org/onap/ccsdk/sli/plugins/restconfapicall/TestRestconfApiUtils.java
+++ b/plugins/restconf-client/provider/src/test/java/org/onap/ccsdk/sli/plugins/restconfapicall/TestRestconfApiUtils.java
@@ -6,8 +6,8 @@ import static org.junit.Assert.assertNull;
import org.junit.Test;
import org.onap.ccsdk.sli.core.sli.SvcLogicException;
import org.opendaylight.yangtools.yang.model.api.EffectiveModelContext;
-import org.opendaylight.yangtools.yang.model.parser.api.YangParserFactory;
-import org.opendaylight.yangtools.yang.parser.impl.YangParserFactoryImpl;
+import org.opendaylight.yangtools.yang.parser.api.YangParserFactory;
+import org.opendaylight.yangtools.yang.parser.impl.DefaultYangParserFactory;
/*-
* ============LICENSE_START=======================================================
@@ -34,7 +34,7 @@ public class TestRestconfApiUtils {
@Test
public void testGetSchemaCtxFromDir() throws SvcLogicException {
- YangParserFactory factory = new YangParserFactoryImpl();
+ YangParserFactory factory = new DefaultYangParserFactory();
// Test with valid subdirectories
diff --git a/plugins/restconf-client/provider/src/test/java/org/onap/ccsdk/sli/plugins/restconfdiscovery/TestRestconfDiscoveryNode.java b/plugins/restconf-client/provider/src/test/java/org/onap/ccsdk/sli/plugins/restconfdiscovery/TestRestconfDiscoveryNode.java
index 64173306d..02d52d215 100644
--- a/plugins/restconf-client/provider/src/test/java/org/onap/ccsdk/sli/plugins/restconfdiscovery/TestRestconfDiscoveryNode.java
+++ b/plugins/restconf-client/provider/src/test/java/org/onap/ccsdk/sli/plugins/restconfdiscovery/TestRestconfDiscoveryNode.java
@@ -29,7 +29,7 @@ import org.onap.ccsdk.sli.core.sli.SvcLogicContext;
import org.onap.ccsdk.sli.core.sli.SvcLogicException;
import org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode;
import org.onap.ccsdk.sli.plugins.restconfapicall.RestconfApiCallNode;
-import org.opendaylight.yangtools.yang.parser.impl.YangParserFactoryImpl;
+import org.opendaylight.yangtools.yang.parser.impl.DefaultYangParserFactory;
import java.io.IOException;
import java.net.URI;
@@ -38,7 +38,7 @@ import java.util.Map;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.core.Is.is;
-import static org.mockito.Matchers.any;
+import static org.mockito.ArgumentMatchers.any;
import static org.mockito.Mockito.doNothing;
import static org.mockito.Mockito.doReturn;
import static org.mockito.Mockito.mock;
@@ -107,7 +107,7 @@ public class TestRestconfDiscoveryNode {
Map<String, String> p = new HashMap<>();
RestconfDiscoveryNode rdn = new RestconfDiscoveryNode(
- new RestconfApiCallNode(new RestapiCallNode(), new YangParserFactoryImpl()));
+ new RestconfApiCallNode(new RestapiCallNode(), new DefaultYangParserFactory()));
rdn.establishSubscription(p, ctx);
}
@@ -117,7 +117,7 @@ public class TestRestconfDiscoveryNode {
ctx.setAttribute("restapi-result.response-code", "200");
ctx.setAttribute("response-code", "404");
RestconfDiscoveryNode rdn = new RestconfDiscoveryNode(
- new RestconfApiCallNode(new RestapiCallNode(), new YangParserFactoryImpl()));
+ new RestconfApiCallNode(new RestapiCallNode(), new DefaultYangParserFactory()));
assertThat(rdn.getResponseCode("restapi-result", ctx),
is("200"));
assertThat(rdn.getResponseCode(null, ctx),
@@ -133,7 +133,7 @@ public class TestRestconfDiscoveryNode {
ctx.setAttribute("ietf-subscribed-notifications:establish-subscripti" +
"on.output.identifier", "89");
RestconfDiscoveryNode rdn = new RestconfDiscoveryNode(
- new RestconfApiCallNode(new RestapiCallNode(), new YangParserFactoryImpl()));
+ new RestconfApiCallNode(new RestapiCallNode(), new DefaultYangParserFactory()));
assertThat(rdn.getOutputIdentifier("restapi-result", ctx),
is("89"));
}
@@ -144,7 +144,7 @@ public class TestRestconfDiscoveryNode {
"futh9ho6eofy3wjsap7wqktemlqm4bbsmnar3vrtbyrzukbv5itd6m1cftldpjarny" +
"le3sdcqq9hftc4lebz464b5ffxmlbvg9";
RestconfDiscoveryNode rdn = new RestconfDiscoveryNode(
- new RestconfApiCallNode(new RestapiCallNode(), new YangParserFactoryImpl()));
+ new RestconfApiCallNode(new RestapiCallNode(), new DefaultYangParserFactory()));
assertThat(rdn.getTokenId(customHttpHeaders),
is("x-ik2ps4ikvzupbx0486ft1ebzs7rt85futh9ho6eofy3wjsap7wqkt" +
diff --git a/plugins/restconf-client/provider/src/test/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/DataFormatSerializerTest.java b/plugins/restconf-client/provider/src/test/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/DataFormatSerializerTest.java
index a5353fad4..7f04bbaa9 100644
--- a/plugins/restconf-client/provider/src/test/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/DataFormatSerializerTest.java
+++ b/plugins/restconf-client/provider/src/test/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/DataFormatSerializerTest.java
@@ -33,12 +33,12 @@ import org.onap.ccsdk.sli.plugins.restapicall.HttpResponse;
import org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode;
import org.onap.ccsdk.sli.plugins.restconfapicall.RestconfApiCallNode;
import org.opendaylight.restconf.common.context.InstanceIdentifierContext;
-import org.opendaylight.yangtools.yang.model.parser.api.YangParserFactory;
-import org.opendaylight.yangtools.yang.parser.impl.YangParserFactoryImpl;
+import org.opendaylight.yangtools.yang.parser.api.YangParserFactory;
+import org.opendaylight.yangtools.yang.parser.impl.DefaultYangParserFactory;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.core.Is.is;
-import static org.mockito.Matchers.any;
+import static org.mockito.ArgumentMatchers.any;
import static org.mockito.Mockito.doAnswer;
import static org.mockito.Mockito.doCallRealMethod;
import static org.mockito.Mockito.doReturn;
@@ -94,7 +94,7 @@ public class DataFormatSerializerTest {
p.put("responsePrefix", "response");
p.put("skipSending", "true");
restApi = new RestapiCallNode();
- parserFactory = new YangParserFactoryImpl();
+ parserFactory = new DefaultYangParserFactory();
restconf = mock(RestconfApiCallNode.class);
dfCaptor = new DfCaptor();
createMethodMocks();
diff --git a/plugins/restconf-client/provider/src/test/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/IdentifierValidationTest.java b/plugins/restconf-client/provider/src/test/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/IdentifierValidationTest.java
index 9abbb16b7..ca148033b 100644
--- a/plugins/restconf-client/provider/src/test/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/IdentifierValidationTest.java
+++ b/plugins/restconf-client/provider/src/test/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/IdentifierValidationTest.java
@@ -33,12 +33,12 @@ import org.onap.ccsdk.sli.plugins.restapicall.HttpResponse;
import org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode;
import org.onap.ccsdk.sli.plugins.restconfapicall.RestconfApiCallNode;
import org.opendaylight.restconf.common.context.InstanceIdentifierContext;
-import org.opendaylight.yangtools.yang.model.parser.api.YangParserFactory;
-import org.opendaylight.yangtools.yang.parser.impl.YangParserFactoryImpl;
+import org.opendaylight.yangtools.yang.parser.api.YangParserFactory;
+import org.opendaylight.yangtools.yang.parser.impl.DefaultYangParserFactory;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.core.Is.is;
-import static org.mockito.Matchers.any;
+import static org.mockito.ArgumentMatchers.any;
import static org.mockito.Mockito.doAnswer;
import static org.mockito.Mockito.doCallRealMethod;
import static org.mockito.Mockito.doReturn;
@@ -83,7 +83,7 @@ public class IdentifierValidationTest {
p.put("responsePrefix", "response");
p.put("skipSending", "true");
restApi = new RestapiCallNode();
- parserFactory = new YangParserFactoryImpl();
+ parserFactory = new DefaultYangParserFactory();
restconf = mock(RestconfApiCallNode.class);
dfCaptor = new DfCaptor();
createMethodMocks();
diff --git a/plugins/restconf-client/provider/src/test/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/PropertiesSerializerTest.java b/plugins/restconf-client/provider/src/test/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/PropertiesSerializerTest.java
index 2bcd45e2b..ff5871519 100644
--- a/plugins/restconf-client/provider/src/test/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/PropertiesSerializerTest.java
+++ b/plugins/restconf-client/provider/src/test/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/PropertiesSerializerTest.java
@@ -83,7 +83,7 @@ public final class PropertiesSerializerTest {
params.put("test-yang_cont1.cont2.ll3[1]", "abc");
params.put("test-yang_cont1.cont2.ll4[0]", "abc");
params.put("test-yang_cont1.cont2.ll4[1]", "abc");
- InstanceIdentifierContext<?> iCtx = ParserIdentifier
+ InstanceIdentifierContext iCtx = ParserIdentifier
.toInstanceIdentifier(uri, context, null);
PropertiesNodeSerializer ser = new MdsalPropertiesNodeSerializer(
@@ -293,7 +293,7 @@ public final class PropertiesSerializerTest {
params.put("test-yang_cont1.cont2.ll5[0]", "abc");
params.put("test-yang_cont1.cont2.ll5[1]", "abc");
- InstanceIdentifierContext<?> iCtx = ParserIdentifier
+ InstanceIdentifierContext iCtx = ParserIdentifier
.toInstanceIdentifier(uri, context, null);
PropertiesNodeSerializer ser = new MdsalPropertiesNodeSerializer(
iCtx.getSchemaNode(), context, uri);
@@ -401,7 +401,7 @@ public final class PropertiesSerializerTest {
params.put("test-yang_cont8.ll7[0]", "abc");
params.put("test-yang_cont8.ll7[1]", "abc");
- InstanceIdentifierContext<?> iCtx = ParserIdentifier
+ InstanceIdentifierContext iCtx = ParserIdentifier
.toInstanceIdentifier(uri, context, null);
PropertiesNodeSerializer ser = new MdsalPropertiesNodeSerializer(
iCtx.getSchemaNode(), context, uri);
@@ -460,7 +460,7 @@ public final class PropertiesSerializerTest {
params.put("test-yang_cont9.ll8[0]", "abc");
params.put("test-yang_cont9.cont11.leaf25", "abc");
- InstanceIdentifierContext<?> iCtx = ParserIdentifier
+ InstanceIdentifierContext iCtx = ParserIdentifier
.toInstanceIdentifier(uri, context, null);
PropertiesNodeSerializer ser = new MdsalPropertiesNodeSerializer(
iCtx.getSchemaNode(), context, uri);
@@ -498,7 +498,7 @@ public final class PropertiesSerializerTest {
Map<String, String> params = new HashMap<>();
params.put("test-yang_cont8.cont6.test-augment_leaf21", "abc");
- InstanceIdentifierContext<?> iCtx = ParserIdentifier
+ InstanceIdentifierContext iCtx = ParserIdentifier
.toInstanceIdentifier(uri, context, null);
PropertiesNodeSerializer ser = new MdsalPropertiesNodeSerializer(
iCtx.getSchemaNode(), context, uri);
@@ -540,7 +540,7 @@ public final class PropertiesSerializerTest {
params.put("test-yang_cont13.leaf28", "abc");
params.put("test-yang_cont13.ll9[0]", "abc");
- InstanceIdentifierContext<?> iCtx = ParserIdentifier
+ InstanceIdentifierContext iCtx = ParserIdentifier
.toInstanceIdentifier(uri, context, null);
PropertiesNodeSerializer ser = new MdsalPropertiesNodeSerializer(
iCtx.getSchemaNode(), context, uri);
@@ -589,7 +589,7 @@ public final class PropertiesSerializerTest {
params.put("test-yang_cont9.cont11.cont13.list9[0].leaf27", "abc");
params.put("test-yang_cont9.cont11.cont13.leaf28", "abc");
params.put("test-yang_cont9.cont11.cont13.ll9[0]", "abc");
- InstanceIdentifierContext<?> iCtx = ParserIdentifier
+ InstanceIdentifierContext iCtx = ParserIdentifier
.toInstanceIdentifier(uri, context, null);
PropertiesNodeSerializer ser = new MdsalPropertiesNodeSerializer(
iCtx.getSchemaNode(), context, uri);
@@ -643,7 +643,7 @@ public final class PropertiesSerializerTest {
params.put("test-augment_cont13.list9[0].leaf27", "abc");
params.put("test-augment_cont13.leaf28", "abc");
params.put("test-augment_cont13.ll9[0]", "abc");
- InstanceIdentifierContext<?> iCtx = ParserIdentifier
+ InstanceIdentifierContext iCtx = ParserIdentifier
.toInstanceIdentifier(uri, context, null);
PropertiesNodeSerializer ser = new MdsalPropertiesNodeSerializer(
iCtx.getSchemaNode(), context, uri);
@@ -695,7 +695,7 @@ public final class PropertiesSerializerTest {
params.put("test-yang_cont1.cont2.cont4.test-augment_cont13.leaf28", "abc");
params.put("test-yang_cont1.cont2.cont4.test-augment_cont13.ll9[0]", "abc");
- InstanceIdentifierContext<?> iCtx = ParserIdentifier
+ InstanceIdentifierContext iCtx = ParserIdentifier
.toInstanceIdentifier(uri, context, null);
PropertiesNodeSerializer ser = new MdsalPropertiesNodeSerializer(
iCtx.getSchemaNode(), context, uri);
@@ -763,7 +763,7 @@ public final class PropertiesSerializerTest {
params.put("test-yang_create-sfc.input.cont13.ll9[0]", "abc");
params.put("test-yang_create-sfc.input.test-augment_leaf36", "abc");
- InstanceIdentifierContext<?> iCtx = ParserIdentifier
+ InstanceIdentifierContext iCtx = ParserIdentifier
.toInstanceIdentifier(uri, context, null);
PropertiesNodeSerializer ser = new MdsalPropertiesNodeSerializer(
iCtx.getSchemaNode(), context, uri);
@@ -877,7 +877,7 @@ public final class PropertiesSerializerTest {
params.put("test-yang_create-sfc.output.cont13.ll9[0]", "abc");
params.put("test-yang_create-sfc.output.test-augment_leaf37", "abc");
- InstanceIdentifierContext<?> iCtx = ParserIdentifier
+ InstanceIdentifierContext iCtx = ParserIdentifier
.toInstanceIdentifier(uri, context, null);
PropertiesNodeSerializer ser = new MdsalPropertiesNodeSerializer(
iCtx.getSchemaNode(), context, uri);
@@ -985,7 +985,7 @@ public final class PropertiesSerializerTest {
params.put("test-yang_cont18.cont18.list12[1].list12[0].leaf36", "xyz");
params.put("test-yang_cont18.cont18.list12[1].list12[1].leaf36", "hey!");
- InstanceIdentifierContext<?> iCtx = ParserIdentifier
+ InstanceIdentifierContext iCtx = ParserIdentifier
.toInstanceIdentifier(uri, context, null);
PropertiesNodeSerializer ser = new MdsalPropertiesNodeSerializer(
iCtx.getSchemaNode(), context, uri);
@@ -1056,7 +1056,7 @@ public final class PropertiesSerializerTest {
params.put("leaf41", "hi");
params.put("test-yang_cont18.leaf41", "abc");
- InstanceIdentifierContext<?> iCtx = ParserIdentifier
+ InstanceIdentifierContext iCtx = ParserIdentifier
.toInstanceIdentifier(uri, context, null);
PropertiesNodeSerializer ser = new MdsalPropertiesNodeSerializer(
iCtx.getSchemaNode(), context, uri);
@@ -1078,7 +1078,7 @@ public final class PropertiesSerializerTest {
params.put("identity-test_test.con1.interfaces.int-list[0].available.ll[0]", "identity-types:Loopback");
params.put("identity-test_test.con1.interfaces.int-list[0].available.leaf1", "identity-types-second:Ethernet");
params.put("identity-test_test.con1.interfaces.int-list[0].available.leaf2", "identity-types-second:iden2");
- InstanceIdentifierContext<?> iCtx = ParserIdentifier
+ InstanceIdentifierContext iCtx = ParserIdentifier
.toInstanceIdentifier(uri, context, null);
PropertiesNodeSerializer ser = new MdsalPropertiesNodeSerializer(