Bug 4640: Change semantic-version to openconfig-version
[yangtools.git] / yang / yang-parser-impl / src / test / java / org / opendaylight / yangtools / yang / stmt / openconfigver / OpenconfigVersionPositionTest.java
@@ -5,7 +5,7 @@
  * 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.yangtools.yang.stmt.semver;
+package org.opendaylight.yangtools.yang.stmt.openconfigver;
 
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertNotNull;
@@ -18,53 +18,53 @@ import org.opendaylight.yangtools.yang.model.api.SchemaContext;
 import org.opendaylight.yangtools.yang.model.repo.api.StatementParserMode;
 import org.opendaylight.yangtools.yang.stmt.StmtTestUtils;
 
-public class SemanticVersionPositionTest {
+public class OpenconfigVersionPositionTest {
 
     @Test
     public void positionHeadTest() throws Exception {
-        SchemaContext context = StmtTestUtils.parseYangSources("/semantic-version/position/position-head",
-                StatementParserMode.SEMVER_MODE);
+        SchemaContext context = StmtTestUtils.parseYangSources("/openconfig-version/position/position-head",
+                StatementParserMode.OPENCONFIG_VER_MODE);
         assertNotNull(context);
 
         Module foo = context.findModuleByNamespace(new URI("foo")).iterator().next();
         Module bar = context.findModuleByNamespace(new URI("bar")).iterator().next();
-        Module semVer = context.findModuleByNamespace(new URI("urn:opendaylight:yang:extension:semantic-version"))
+        Module semVer = context.findModuleByNamespace(new URI("http://openconfig.net/yang/openconfig-ext"))
                 .iterator().next();
 
-        assertEquals(SemVer.valueOf("0.0.1"), semVer.getSemanticVersion());
-        assertEquals(SemVer.valueOf("0.1.1"), foo.getSemanticVersion());
-        assertEquals(SemVer.valueOf("0.1.2"), bar.getSemanticVersion());
+        assertEquals(SemVer.valueOf("0.0.1"), semVer.getOpenconfigVersion());
+        assertEquals(SemVer.valueOf("0.1.1"), foo.getOpenconfigVersion());
+        assertEquals(SemVer.valueOf("0.1.2"), bar.getOpenconfigVersion());
     }
 
     @Test
     public void positionMiddleTest() throws Exception {
-        SchemaContext context = StmtTestUtils.parseYangSources("/semantic-version/position/position-middle",
-                StatementParserMode.SEMVER_MODE);
+        SchemaContext context = StmtTestUtils.parseYangSources("/openconfig-version/position/position-middle",
+                StatementParserMode.OPENCONFIG_VER_MODE);
         assertNotNull(context);
 
         Module foo = context.findModuleByNamespace(new URI("foo")).iterator().next();
         Module bar = context.findModuleByNamespace(new URI("bar")).iterator().next();
-        Module semVer = context.findModuleByNamespace(new URI("urn:opendaylight:yang:extension:semantic-version"))
+        Module semVer = context.findModuleByNamespace(new URI("http://openconfig.net/yang/openconfig-ext"))
                 .iterator().next();
 
-        assertEquals(SemVer.valueOf("0.0.1"), semVer.getSemanticVersion());
-        assertEquals(SemVer.valueOf("0.1.1"), foo.getSemanticVersion());
-        assertEquals(SemVer.valueOf("0.1.2"), bar.getSemanticVersion());
+        assertEquals(SemVer.valueOf("0.0.1"), semVer.getOpenconfigVersion());
+        assertEquals(SemVer.valueOf("0.1.1"), foo.getOpenconfigVersion());
+        assertEquals(SemVer.valueOf("0.1.2"), bar.getOpenconfigVersion());
     }
 
     @Test
     public void positiontailTest() throws Exception {
-        SchemaContext context = StmtTestUtils.parseYangSources("/semantic-version/position/position-tail",
-                StatementParserMode.SEMVER_MODE);
+        SchemaContext context = StmtTestUtils.parseYangSources("/openconfig-version/position/position-tail",
+                StatementParserMode.OPENCONFIG_VER_MODE);
         assertNotNull(context);
 
         Module foo = context.findModuleByNamespace(new URI("foo")).iterator().next();
         Module bar = context.findModuleByNamespace(new URI("bar")).iterator().next();
-        Module semVer = context.findModuleByNamespace(new URI("urn:opendaylight:yang:extension:semantic-version"))
+        Module semVer = context.findModuleByNamespace(new URI("http://openconfig.net/yang/openconfig-ext"))
                 .iterator().next();
 
-        assertEquals(SemVer.valueOf("0.0.1"), semVer.getSemanticVersion());
-        assertEquals(SemVer.valueOf("0.1.1"), foo.getSemanticVersion());
-        assertEquals(SemVer.valueOf("0.1.2"), bar.getSemanticVersion());
+        assertEquals(SemVer.valueOf("0.0.1"), semVer.getOpenconfigVersion());
+        assertEquals(SemVer.valueOf("0.1.1"), foo.getOpenconfigVersion());
+        assertEquals(SemVer.valueOf("0.1.2"), bar.getOpenconfigVersion());
     }
 }