X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fsal-rest-connector%2Fsrc%2Ftest%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fsal%2Frestconf%2Fimpl%2Ftest%2FBug3595Test.java;fp=opendaylight%2Fmd-sal%2Fsal-rest-connector%2Fsrc%2Ftest%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fsal%2Frestconf%2Fimpl%2Ftest%2FBug3595Test.java;h=0000000000000000000000000000000000000000;hb=89b8b59cd26fd4810293ff14386eb29a71da9fac;hp=6ab6b85e0e0318825dc402515f335fcd5388e8dc;hpb=9ba2b4eca79bcc0e78099b133296801c8d45a6c4;p=controller.git diff --git a/opendaylight/md-sal/sal-rest-connector/src/test/java/org/opendaylight/controller/sal/restconf/impl/test/Bug3595Test.java b/opendaylight/md-sal/sal-rest-connector/src/test/java/org/opendaylight/controller/sal/restconf/impl/test/Bug3595Test.java deleted file mode 100644 index 6ab6b85e0e..0000000000 --- a/opendaylight/md-sal/sal-rest-connector/src/test/java/org/opendaylight/controller/sal/restconf/impl/test/Bug3595Test.java +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Copyright (c) 2015 Cisco Systems, Inc. and others. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0 which accompanies this distribution, - * and is available at http://www.eclipse.org/legal/epl-v10.html - */ - -package org.opendaylight.controller.sal.restconf.impl.test; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotNull; -import java.io.FileNotFoundException; -import org.junit.BeforeClass; -import org.junit.Test; -import org.opendaylight.controller.sal.restconf.impl.ControllerContext; -import org.opendaylight.controller.sal.restconf.impl.InstanceIdentifierContext; -import org.opendaylight.yangtools.yang.common.QName; -import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier; -import org.opendaylight.yangtools.yang.model.api.Module; -import org.opendaylight.yangtools.yang.model.api.SchemaContext; - -public class Bug3595Test { - - private static final QName CONT_QNAME = QName.create("leafref:module", "2014-04-17", "cont"); - private static final QName LST_WITH_LFREF_KEY_QNAME = QName.create(CONT_QNAME, "lst-with-lfref-key"); - private static final QName LFREF_KEY_QNAME = QName.create(CONT_QNAME, "lfref-key"); - - - private static ControllerContext controllerContext = ControllerContext.getInstance(); - - @BeforeClass - public static void initialize() throws FileNotFoundException { - SchemaContext schemaContext = TestUtils.loadSchemaContext("/leafref/yang"); - Module module = TestUtils.findModule(schemaContext.getModules(), "leafref-module"); - assertNotNull(module); - module = TestUtils.findModule(schemaContext.getModules(), "referenced-module"); - assertNotNull(module); - - controllerContext.setGlobalSchema(schemaContext); - } - - @Test - public void testLeafrefListKeyDeserializtion() { - final YangInstanceIdentifier node1IIexpected = YangInstanceIdentifier.of(CONT_QNAME) - .node(LST_WITH_LFREF_KEY_QNAME).node(new YangInstanceIdentifier.NodeIdentifierWithPredicates( - LST_WITH_LFREF_KEY_QNAME, LFREF_KEY_QNAME, "node1")); - final InstanceIdentifierContext iiContext = - controllerContext.toInstanceIdentifier("leafref-module:cont/lst-with-lfref-key/node1"); - iiContext.getInstanceIdentifier(); - assertEquals(node1IIexpected, iiContext.getInstanceIdentifier()); - } -}