2 * Copyright (c) 2014 Cisco Systems, Inc. and others. All rights reserved.
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
8 package org.opendaylight.controller.netconf.cli.io;
10 import com.google.common.collect.Maps;
12 import junit.framework.Assert;
13 import org.junit.Test;
14 import org.opendaylight.controller.netconf.cli.commands.CommandConstants;
15 import org.opendaylight.yangtools.yang.common.QName;
17 public class IOUtilTest {
20 public void testQNameFromKeyStringNew() throws Exception {
21 final String s = IOUtil.qNameToKeyString(CommandConstants.HELP_QNAME, "module");
22 final Map<String, QName> modulesMap = Maps.newHashMap();
23 modulesMap.put("module", new QName(CommandConstants.HELP_QNAME, "module"));
24 final QName qName = IOUtil.qNameFromKeyString(s, modulesMap);
25 Assert.assertEquals(CommandConstants.HELP_QNAME, qName);