+/*
+ * 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;
.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");
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
@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