Bug 4640: Change semantic-version to openconfig-version
[yangtools.git] / yang / yang-parser-impl / src / test / java / org / opendaylight / yangtools / yang / stmt / openconfigver / OpenconfigVersionDefaultsTest.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,40 +21,40 @@ import org.opendaylight.yangtools.yang.model.repo.api.StatementParserMode;
 import org.opendaylight.yangtools.yang.parser.spi.meta.ReactorException;
 import org.opendaylight.yangtools.yang.stmt.StmtTestUtils;
 
-public class SemanticVersionDefaultsTest {
+public class OpenconfigVersionDefaultsTest {
 
     @Test
     public void defaultsTest() throws Exception {
-        SchemaContext context = StmtTestUtils.parseYangSources("/semantic-version/defaults/defaults",
-                StatementParserMode.SEMVER_MODE);
+        SchemaContext context = StmtTestUtils.parseYangSources("/openconfig-version/defaults/defaults",
+                StatementParserMode.OPENCONFIG_VER_MODE);
         assertNotNull(context);
 
         Module foo = context.findModuleByNamespace(new URI("foo")).iterator().next();
         Module bar = context.findModuleByNamespace(new URI("bar")).iterator().next();
 
-        assertEquals(SemVer.valueOf("0.0.0"), foo.getSemanticVersion());
-        assertEquals(SemVer.valueOf("0.0.0"), bar.getSemanticVersion());
+        assertEquals(SemVer.valueOf("0.0.0"), foo.getOpenconfigVersion());
+        assertEquals(SemVer.valueOf("0.0.0"), bar.getOpenconfigVersion());
     }
 
     @Test
     public void defaultMajorValidTest() throws Exception {
-        SchemaContext context = StmtTestUtils.parseYangSources("/semantic-version/defaults/default-major-valid",
-                StatementParserMode.SEMVER_MODE);
+        SchemaContext context = StmtTestUtils.parseYangSources("/openconfig-version/defaults/default-major-valid",
+                StatementParserMode.OPENCONFIG_VER_MODE);
         assertNotNull(context);
 
         Module foo = context.findModuleByNamespace(new URI("foo")).iterator().next();
         Module bar = context.findModuleByNamespace(new URI("bar")).iterator().next();
 
-        assertEquals(SemVer.valueOf("0.0.0"), foo.getSemanticVersion());
-        assertEquals(SemVer.valueOf("0.99.99"), bar.getSemanticVersion());
+        assertEquals(SemVer.valueOf("0.0.0"), foo.getOpenconfigVersion());
+        assertEquals(SemVer.valueOf("0.99.99"), bar.getOpenconfigVersion());
     }
 
     @Test
     public void defaultMajorInvalidTest() throws Exception {
         try {
-            StmtTestUtils.parseYangSources("/semantic-version/defaults/default-major-invalid",
-                StatementParserMode.SEMVER_MODE);
-            fail("Test should fail due to invalid semantic version");
+            StmtTestUtils.parseYangSources("/openconfig-version/defaults/default-major-invalid",
+                StatementParserMode.OPENCONFIG_VER_MODE);
+            fail("Test should fail due to invalid openconfig version");
         } catch (ReactorException e) {
             assertTrue(e.getCause().getMessage()
                     .startsWith("Unable to find module compatible with requested import [bar(0.0.0)]."));