Bug 4640: Change semantic-version to openconfig-version
[yangtools.git] / yang / yang-parser-impl / src / test / java / org / opendaylight / yangtools / yang / stmt / openconfigver / OpenconfigVersionComplexTest.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;
@@ -21,19 +21,19 @@ import org.opendaylight.yangtools.yang.model.util.RevisionAwareXPathImpl;
 import org.opendaylight.yangtools.yang.model.util.SchemaContextUtil;
 import org.opendaylight.yangtools.yang.stmt.StmtTestUtils;
 
-public class SemanticVersionComplexTest {
+public class OpenconfigVersionComplexTest {
 
     @Test
     public void complexTest1() throws Exception {
-        final SchemaContext context = StmtTestUtils.parseYangSources("/semantic-version/complex/complex-1",
-                StatementParserMode.SEMVER_MODE);
+        final SchemaContext context = StmtTestUtils.parseYangSources("/openconfig-version/complex/complex-1",
+                StatementParserMode.OPENCONFIG_VER_MODE);
         verifySchemaContextTest1(context);
     }
 
     @Test
     public void complexTest1Yang1_1() throws Exception {
-        final SchemaContext context = StmtTestUtils.parseYangSources("/rfc7950/semantic-version/complex-1",
-                StatementParserMode.SEMVER_MODE);
+        final SchemaContext context = StmtTestUtils.parseYangSources("/rfc7950/openconfig-version/complex-1",
+                StatementParserMode.OPENCONFIG_VER_MODE);
         verifySchemaContextTest1(context);
     }
 
@@ -42,17 +42,17 @@ public class SemanticVersionComplexTest {
 
         final Module foo = context.findModuleByNamespace(URI.create("foo")).iterator().next();
         final Module semVer = context.findModuleByNamespace(
-            URI.create("urn:opendaylight:yang:extension:semantic-version")).iterator().next();
+            URI.create("http://openconfig.net/yang/openconfig-ext")).iterator().next();
 
         // check module versions
-        assertEquals(SemVer.valueOf("1.3.95"), semVer.getSemanticVersion());
-        assertEquals(SemVer.valueOf("1.50.2"), foo.getSemanticVersion());
+        assertEquals(SemVer.valueOf("1.3.95"), semVer.getOpenconfigVersion());
+        assertEquals(SemVer.valueOf("1.50.2"), foo.getOpenconfigVersion());
 
         final Module bar = StmtTestUtils.findImportedModule(context, foo, "bar");
-        assertEquals(SemVer.valueOf("1.2.6"), bar.getSemanticVersion());
+        assertEquals(SemVer.valueOf("1.2.6"), bar.getOpenconfigVersion());
 
         final Module foobar = StmtTestUtils.findImportedModule(context, bar, "foobar");
-        assertEquals(SemVer.valueOf("2.26.465"), foobar.getSemanticVersion());
+        assertEquals(SemVer.valueOf("2.26.465"), foobar.getOpenconfigVersion());
 
         // check imported components
         assertNotNull("This component should be present", SchemaContextUtil.findDataSchemaNode(context, foo,
@@ -71,15 +71,15 @@ public class SemanticVersionComplexTest {
 
     @Test
     public void complexTest2() throws Exception {
-        final SchemaContext context = StmtTestUtils.parseYangSources("/semantic-version/complex/complex-2",
-                StatementParserMode.SEMVER_MODE);
+        final SchemaContext context = StmtTestUtils.parseYangSources("/openconfig-version/complex/complex-2",
+                StatementParserMode.OPENCONFIG_VER_MODE);
         verifySchemaContextTest2(context);
     }
 
     @Test
     public void complexTest2Yang1_1() throws Exception {
-        final SchemaContext context = StmtTestUtils.parseYangSources("/rfc7950/semantic-version/complex-2",
-                StatementParserMode.SEMVER_MODE);
+        final SchemaContext context = StmtTestUtils.parseYangSources("/rfc7950/openconfig-version/complex-2",
+                StatementParserMode.OPENCONFIG_VER_MODE);
         verifySchemaContextTest2(context);
     }
 
@@ -88,17 +88,17 @@ public class SemanticVersionComplexTest {
 
         final Module foo = context.findModuleByNamespace(URI.create("foo")).iterator().next();
         final Module semVer = context.findModuleByNamespace(URI.create(
-            "urn:opendaylight:yang:extension:semantic-version")).iterator().next();
+            "http://openconfig.net/yang/openconfig-ext")).iterator().next();
 
         // check module versions
-        assertEquals(SemVer.valueOf("2.5.50"), semVer.getSemanticVersion());
-        assertEquals(SemVer.valueOf("2.32.2"), foo.getSemanticVersion());
+        assertEquals(SemVer.valueOf("2.5.50"), semVer.getOpenconfigVersion());
+        assertEquals(SemVer.valueOf("2.32.2"), foo.getOpenconfigVersion());
 
         final Module bar = StmtTestUtils.findImportedModule(context, foo, "bar");
-        assertEquals(SemVer.valueOf("4.9.8"), bar.getSemanticVersion());
+        assertEquals(SemVer.valueOf("4.9.8"), bar.getOpenconfigVersion());
 
         final Module foobar = StmtTestUtils.findImportedModule(context, bar, "foobar");
-        assertEquals(SemVer.valueOf("7.13.99"), foobar.getSemanticVersion());
+        assertEquals(SemVer.valueOf("7.13.99"), foobar.getOpenconfigVersion());
 
         // check used augmentations
         assertNotNull("This component should be present", SchemaContextUtil.findDataSchemaNode(context, bar,