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%2FURITest.java;h=eef9e414e93e75d90ec29719d7f93b85952c9400;hb=681385ead5cb32ecdc5cd28c319f8f5c8894b138;hp=4e2f525d451787cc5f658495ff39e373cfaab22b;hpb=c6f0b0a402bcf177ebf9cb89c187b64490c044d5;p=controller.git diff --git a/opendaylight/md-sal/sal-rest-connector/src/test/java/org/opendaylight/controller/sal/restconf/impl/test/URITest.java b/opendaylight/md-sal/sal-rest-connector/src/test/java/org/opendaylight/controller/sal/restconf/impl/test/URITest.java index 4e2f525d45..eef9e414e9 100644 --- a/opendaylight/md-sal/sal-rest-connector/src/test/java/org/opendaylight/controller/sal/restconf/impl/test/URITest.java +++ b/opendaylight/md-sal/sal-rest-connector/src/test/java/org/opendaylight/controller/sal/restconf/impl/test/URITest.java @@ -1,3 +1,10 @@ +/* + * Copyright (c) 2014 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; @@ -47,8 +54,8 @@ public class URITest { .toInstanceIdentifier("simple-nodes:userWithoutClass/foo"); assertEquals(instanceIdentifier.getSchemaNode().getQName().getLocalName(), "userWithoutClass"); - instanceIdentifier = controllerContext.toInstanceIdentifier("simple-nodes:userWithoutClass/foo/full-name"); - assertEquals(instanceIdentifier.getSchemaNode().getQName().getLocalName(), "full-name"); + instanceIdentifier = controllerContext.toInstanceIdentifier("simple-nodes:userWithoutClass/foo"); + assertEquals(instanceIdentifier.getSchemaNode().getQName().getLocalName(), "userWithoutClass"); instanceIdentifier = controllerContext.toInstanceIdentifier("simple-nodes:user/foo/boo"); assertEquals(instanceIdentifier.getSchemaNode().getQName().getLocalName(), "user"); @@ -56,8 +63,6 @@ public class URITest { instanceIdentifier = controllerContext.toInstanceIdentifier("simple-nodes:user//boo"); assertEquals(instanceIdentifier.getSchemaNode().getQName().getLocalName(), "user"); - instanceIdentifier = controllerContext.toInstanceIdentifier("simple-nodes:users/user/foo"); - assertEquals(instanceIdentifier.getSchemaNode().getQName().getLocalName(), "user"); } @Test @@ -85,8 +90,8 @@ public class URITest { @Test public void testToInstanceIdentifierChoice() throws FileNotFoundException { InstanceIdWithSchemaNode instanceIdentifier = controllerContext - .toInstanceIdentifier("simple-nodes:food/nonalcoholic/beer"); - assertEquals(instanceIdentifier.getSchemaNode().getQName().getLocalName(), "beer"); + .toInstanceIdentifier("simple-nodes:food/nonalcoholic"); + assertEquals(instanceIdentifier.getSchemaNode().getQName().getLocalName(), "nonalcoholic"); } @Test