diff options
author | highstreetherbert <herbert.eiselt@highstreet-technologies.com> | 2021-04-29 19:06:54 +0200 |
---|---|---|
committer | KAPIL SINGAL <ks220y@att.com> | 2021-06-11 00:45:36 +0000 |
commit | db9f267b3930a28054e967c75db228e27663aedc (patch) | |
tree | e8ecaeff503afaa9c00b31781003b92a6f1844f2 /sdnr/wt/websocketmanager/provider/src/test | |
parent | e536aaa0422660283fa388c1a5d1a9c32dc52f9e (diff) |
migrate features to silicon
migrate features to silicon
Issue-ID: CCSDK-3278
Signed-off-by: highstreetherbert <herbert.eiselt@highstreet-technologies.com>
Change-Id: Icabe6bd5b760438eedd8c6b78a70197c287c5199
Signed-off-by: highstreetherbert <herbert.eiselt@highstreet-technologies.com>
Diffstat (limited to 'sdnr/wt/websocketmanager/provider/src/test')
2 files changed, 0 insertions, 120 deletions
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; - } - -} |