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 OpenconfigVersionTest {
private static final YangParserConfiguration SEMVER = YangParserConfiguration.builder()
.importResolutionMode(ImportResolutionMode.OPENCONFIG_SEMVER)
}
@Test
- public void basicImportErrTest1() throws Exception {
+ public void basicImportErrTest1() {
ReactorException ex = assertThrows(ReactorException.class,
() -> StmtTestUtils.parseYangSources("/openconfig-version/basic-import-invalid-1", SEMVER));
- assertThat(ex.getCause().getCause().getMessage(),
+ assertThat(ex.getCause().getMessage(),
startsWith("Unable to find module compatible with requested import [bar(0.1.2)]."));
}
@Test
- public void basicImportErrTest2() throws Exception {
+ public void basicImportErrTest2() {
ReactorException ex = assertThrows(ReactorException.class,
() -> StmtTestUtils.parseYangSources("/openconfig-version/basic-import-invalid-2", SEMVER));
- assertThat(ex.getCause().getCause().getMessage(),
+ assertThat(ex.getCause().getMessage(),
startsWith("Unable to find module compatible with requested import [bar(0.1.2)]."));
}