import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
-import org.opendaylight.yangtools.yang.model.repo.api.StatementParserMode;
-
import java.io.FileNotFoundException;
import java.net.URI;
import java.net.URISyntaxException;
import org.opendaylight.yangtools.yang.model.api.Module;
import org.opendaylight.yangtools.yang.model.api.ModuleImport;
import org.opendaylight.yangtools.yang.model.api.SchemaContext;
-import org.opendaylight.yangtools.yang.parser.spi.meta.InferenceException;
+import org.opendaylight.yangtools.yang.model.repo.api.StatementParserMode;
import org.opendaylight.yangtools.yang.parser.spi.meta.ReactorException;
import org.opendaylight.yangtools.yang.parser.spi.source.SourceException;
import org.opendaylight.yangtools.yang.stmt.StmtTestUtils;
StmtTestUtils.parseYangSources("/semantic-version/multiple/multiple-invalid-deprecated",
StatementParserMode.SEMVER_MODE);
fail("Test should fail due to invalid semantic version");
- } catch (InferenceException e) {
- assertTrue(e.getMessage()
+ } catch (ReactorException e) {
+ assertTrue(e.getCause().getMessage()
.startsWith("Unable to find module compatible with requested import [bar(1.0.0)]."));
}
}
StmtTestUtils.parseYangSources("/semantic-version/multiple/multiple-invalid-nosufficient",
StatementParserMode.SEMVER_MODE);
fail("Test should fail due to invalid semantic version");
- } catch (InferenceException e) {
- assertTrue(e.getMessage()
+ } catch (ReactorException e) {
+ assertTrue(e.getCause().getMessage()
.startsWith("Unable to find module compatible with requested import [bar(2.5.5)]."));
}
}