2 * Copyright (c) 2014, 2015 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
9 package org.opendaylight.controller.cluster.datastore.node.utils;
11 import org.junit.Test;
12 import org.opendaylight.controller.cluster.datastore.util.TestModel;
13 import org.opendaylight.yangtools.yang.common.QName;
15 import static org.junit.Assert.assertEquals;
16 import static org.junit.Assert.assertFalse;
17 import static org.junit.Assert.assertTrue;
19 public class QNameFactoryTest {
22 public void testBasic(){
23 QName expected = TestModel.AUG_NAME_QNAME;
24 QName created = QNameFactory.create(expected.toString());
26 assertFalse( expected == created);
28 assertEquals(expected, created);
30 QName cached = QNameFactory.create(expected.toString());
32 assertEquals(expected, cached);
34 assertTrue( cached == created );