summaryrefslogtreecommitdiffstats
path: root/sdnr/wt/websocketmanager/provider
diff options
context:
space:
mode:
Diffstat (limited to 'sdnr/wt/websocketmanager/provider')
-rw-r--r--sdnr/wt/websocketmanager/provider/pom.xml9
-rw-r--r--sdnr/wt/websocketmanager/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/websocketmanager2/test/TestSerializer.java59
-rw-r--r--sdnr/wt/websocketmanager/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/websocketmanager2/test/UserScopeTest.java61
3 files changed, 2 insertions, 127 deletions
diff --git a/sdnr/wt/websocketmanager/provider/pom.xml b/sdnr/wt/websocketmanager/provider/pom.xml
index f1a7d2e52..0366ed2a4 100644
--- a/sdnr/wt/websocketmanager/provider/pom.xml
+++ b/sdnr/wt/websocketmanager/provider/pom.xml
@@ -87,13 +87,8 @@
<artifactId>json</artifactId>
</dependency>
<dependency>
- <groupId>com.typesafe.akka</groupId>
- <artifactId>akka-actor_2.13</artifactId>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>com.typesafe.akka</groupId>
- <artifactId>akka-cluster_2.13</artifactId>
+ <groupId>com.typesafe</groupId>
+ <artifactId>config</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
diff --git a/sdnr/wt/websocketmanager/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/websocketmanager2/test/TestSerializer.java b/sdnr/wt/websocketmanager/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/websocketmanager2/test/TestSerializer.java
deleted file mode 100644
index 962838489..000000000
--- a/sdnr/wt/websocketmanager/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/websocketmanager2/test/TestSerializer.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * ============LICENSE_START=======================================================
- * ONAP : ccsdk features
- * ================================================================================
- * Copyright (C) 2021 highstreet technologies GmbH Intellectual Property.
- * All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- *
- */
-package org.onap.ccsdk.features.sdnr.wt.websocketmanager2.test;
-
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
-import com.fasterxml.jackson.core.JsonProcessingException;
-import org.junit.Test;
-import org.onap.ccsdk.features.sdnr.wt.websocketmanager.model.data.NotificationOutput;
-import org.onap.ccsdk.features.sdnr.wt.yang.mapper.YangToolsMapper;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.DateAndTime;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.devicemanager.rev190109.ObjectCreationNotification;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.devicemanager.rev190109.ObjectCreationNotificationBuilder;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class TestSerializer {
-
- private static final Logger LOG = LoggerFactory.getLogger(TestSerializer.class);
- private static final YangToolsMapper mapper = new YangToolsMapper();
- private static final String TIMESTAMP = "2020-04-01T10:20:40.0Z";
- private static final String NODEID = "node1";
-
- @Test
- public void test1() {
- ObjectCreationNotification notification = new ObjectCreationNotificationBuilder().setCounter(Integer.valueOf(5)).build();
- NotificationOutput output = new NotificationOutput(notification, NODEID, ObjectCreationNotification.QNAME,DateAndTime.getDefaultInstance(TIMESTAMP));
- String sOutput=null;
- try {
- sOutput = mapper.writeValueAsString(output);
- LOG.debug(sOutput);
- } catch (JsonProcessingException e) {
- e.printStackTrace();
- fail(e.getMessage());
- }
- assertNotNull(sOutput);
- assertTrue(sOutput.contains("\"type\""));
- }
-}
diff --git a/sdnr/wt/websocketmanager/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/websocketmanager2/test/UserScopeTest.java b/sdnr/wt/websocketmanager/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/websocketmanager2/test/UserScopeTest.java
deleted file mode 100644
index d21bb529c..000000000
--- a/sdnr/wt/websocketmanager/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/websocketmanager2/test/UserScopeTest.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * ============LICENSE_START========================================================================
- * ONAP : ccsdk feature sdnr wt
- * =================================================================================================
- * Copyright (C) 2019 highstreet technologies GmbH Intellectual Property. All rights reserved.
- * =================================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
- * in compliance with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software distributed under the License
- * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
- * or implied. See the License for the specific language governing permissions and limitations under
- * the License.
- * ============LICENSE_END==========================================================================
- */
-package org.onap.ccsdk.features.sdnr.wt.websocketmanager2.test;
-
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertTrue;
-import java.util.Arrays;
-import java.util.List;
-import org.junit.Test;
-import org.onap.ccsdk.features.sdnr.wt.websocketmanager.model.data.ReducedSchemaInfo;
-import org.onap.ccsdk.features.sdnr.wt.websocketmanager.model.data.SchemaInfo;
-import org.onap.ccsdk.features.sdnr.wt.websocketmanager.model.data.Scope;
-import org.onap.ccsdk.features.sdnr.wt.websocketmanager.utils.UserScopes;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.devicemanager.rev190109.ObjectCreationNotification;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.devicemanager.rev190109.ProblemNotification;
-import org.opendaylight.yangtools.yang.common.QName;
-
-public class UserScopeTest {
-
- private static final String SCOPE1 = "problem-notification";
- private static final String SCOPE2 = "scope2";
- private static final String SCOPE3 = "scope3";
- private static final String SCOPE4 = "scope4";
-
- @Test
- public void test() {
- UserScopes scopes1 = new UserScopes();
- List<String> json1 = Arrays.asList(SCOPE1, SCOPE2, SCOPE3);
- scopes1.setScopes(Arrays.asList(buildScope(null, ProblemNotification.QNAME)));
-
- assertTrue(scopes1.hasScope(new ReducedSchemaInfo(ProblemNotification.QNAME)));
- assertFalse(scopes1.hasScope("RoadmA", new ReducedSchemaInfo(ObjectCreationNotification.QNAME)));
-
- assertTrue(scopes1.hasScope("RoadmA", new ReducedSchemaInfo(ProblemNotification.QNAME)));
-
- }
-
-
- private static final Scope buildScope(String nodeId, QName qname) {
- Scope scope = new Scope();
- scope.setNodeId(nodeId);
- scope.setSchema(new SchemaInfo(qname));
- return scope;
- }
-
-}