Deprecate getSemanticVersion() for removal
[yangtools.git] / parser / yang-parser-rfc7950 / src / test / java / org / opendaylight / yangtools / yang / stmt / openconfigver / OpenconfigVersionImportTest.java
index 02457ddf77914e4aad518b8586ac9c11cba26c3d..520f0242be1ae18ea3918a71ba59e9c9154b8542 100644 (file)
@@ -23,6 +23,7 @@ import org.opendaylight.yangtools.yang.parser.api.YangParserConfiguration;
 import org.opendaylight.yangtools.yang.parser.spi.meta.ReactorException;
 import org.opendaylight.yangtools.yang.stmt.StmtTestUtils;
 
+@Deprecated(since = "8.0.4", forRemoval = true)
 public class OpenconfigVersionImportTest {
     private static final YangParserConfiguration SEMVER = YangParserConfiguration.builder()
         .importResolutionMode(ImportResolutionMode.OPENCONFIG_SEMVER)
@@ -43,7 +44,7 @@ public class OpenconfigVersionImportTest {
     public void importInvalidDeprecatedTest1() {
         ReactorException ex = assertThrows(ReactorException.class,
             () -> StmtTestUtils.parseYangSources("/openconfig-version/import/import-invalid-deprecated-1", SEMVER));
-        assertThat(ex.getCause().getCause().getMessage(), startsWith(
+        assertThat(ex.getCause().getMessage(), startsWith(
             "Unable to find module compatible with requested import [openconfig-extensions(1.0.0)]."));
     }
 
@@ -51,7 +52,7 @@ public class OpenconfigVersionImportTest {
     public void importInvalidDeprecatedTest2() {
         ReactorException ex = assertThrows(ReactorException.class,
             () -> StmtTestUtils.parseYangSources("/openconfig-version/import/import-invalid-deprecated-2", SEMVER));
-        assertThat(ex.getCause().getCause().getMessage(), startsWith(
+        assertThat(ex.getCause().getMessage(), startsWith(
             "Unable to find module compatible with requested import [openconfig-extensions(0.9.9)]."));
     }
 
@@ -59,7 +60,7 @@ public class OpenconfigVersionImportTest {
     public void importInvalidNotsufficientTest1() {
         ReactorException ex = assertThrows(ReactorException.class,
             () -> StmtTestUtils.parseYangSources("/openconfig-version/import/import-invalid-notsufficient-1", SEMVER));
-        assertThat(ex.getCause().getCause().getMessage(), startsWith(
+        assertThat(ex.getCause().getMessage(), startsWith(
             "Unable to find module compatible with requested import [openconfig-extensions(2.0.0)]."));
     }
 
@@ -67,7 +68,7 @@ public class OpenconfigVersionImportTest {
     public void importInvalidNotsufficientTest2() {
         ReactorException ex = assertThrows(ReactorException.class,
             () -> StmtTestUtils.parseYangSources("/openconfig-version/import/import-invalid-notsufficient-2", SEMVER));
-        assertThat(ex.getCause().getCause().getMessage(), startsWith(
+        assertThat(ex.getCause().getMessage(), startsWith(
             "Unable to find module compatible with requested import [openconfig-extensions(2.0.5)]."));
     }
 }