BUG-1382: eliminate use of QName.getPrefix from yang parser
[yangtools.git] / yang / yang-parser-impl / src / test / java / org / opendaylight / yangtools / yang / parser / impl / TypesResolutionTest.java
index 53c335b874350c4f5e6b3e40d733d009a3698a41..2e7f932d3e500194d0d47db5c019b2c859cb3dba 100644 (file)
@@ -262,13 +262,12 @@ public class TypesResolutionTest {
 
         String expectedDesc = "A timezone location as defined by the IANA timezone";
         assertTrue(testedType.getDescription().contains(expectedDesc));
-        assertNull(testedType.getReference());
+        assertTrue(testedType.getReference().isEmpty());
         assertEquals(Status.CURRENT, testedType.getStatus());
 
         QName testedTypeQName = testedType.getQName();
         assertEquals(URI.create("urn:ietf:params:xml:ns:yang:iana-timezones"), testedTypeQName.getNamespace());
         assertEquals(TestUtils.createDate("2012-07-09"), testedTypeQName.getRevision());
-        assertEquals("ianatz", testedTypeQName.getPrefix());
         assertEquals("iana-timezone", testedTypeQName.getLocalName());
 
         EnumerationType enumType = (EnumerationType) testedType.getBaseType();
@@ -300,7 +299,6 @@ public class TypesResolutionTest {
         QName testedTypeQName = testedType.getQName();
         assertEquals(URI.create("urn:ietf:params:xml:ns:yang:ietf-yang-types"), testedTypeQName.getNamespace());
         assertEquals(TestUtils.createDate("2010-09-24"), testedTypeQName.getRevision());
-        assertEquals("yang", testedTypeQName.getPrefix());
         assertEquals("object-identifier-128", testedTypeQName.getLocalName());
 
         ExtendedType testedTypeBase = (ExtendedType) testedType.getBaseType();
@@ -314,7 +312,6 @@ public class TypesResolutionTest {
         QName testedTypeBaseQName = testedTypeBase.getQName();
         assertEquals(URI.create("urn:ietf:params:xml:ns:yang:ietf-yang-types"), testedTypeBaseQName.getNamespace());
         assertEquals(TestUtils.createDate("2010-09-24"), testedTypeBaseQName.getRevision());
-        assertEquals("yang", testedTypeBaseQName.getPrefix());
         assertEquals("object-identifier", testedTypeBaseQName.getLocalName());
     }
 
@@ -327,7 +324,6 @@ public class TypesResolutionTest {
         QName identity = baseType.getIdentity().getQName();
         assertEquals(URI.create("urn:custom.types.demo"), identity.getNamespace());
         assertEquals(TestUtils.createDate("2012-04-16"), identity.getRevision());
-        assertEquals("iit", identity.getPrefix());
         assertEquals("service-type", identity.getLocalName());
 
         LeafSchemaNode type = (LeafSchemaNode) tested.getDataChildByName("type");