Search in sources :

Example 1 with IllegalVersionChangeException

use of org.eclipse.tycho.versions.engine.IllegalVersionChangeException in project tycho by eclipse.

the class VersionsEngineTest method assertNonOsgiVersionOsgiProject.

private void assertNonOsgiVersionOsgiProject(String artifactId) throws Exception {
    File basedir = TestUtil.getBasedir("projects/nonosgiversion/" + artifactId);
    VersionsEngine engine = newEngine(basedir);
    engine.addVersionChange(artifactId, "1.0.1-01");
    try {
        engine.apply();
        fail();
    } catch (IllegalVersionChangeException e) {
        // not a valid osgi version
        assertEquals(1, e.getErrors().size());
    }
}
Also used : IllegalVersionChangeException(org.eclipse.tycho.versions.engine.IllegalVersionChangeException) VersionsEngine(org.eclipse.tycho.versions.engine.VersionsEngine) File(java.io.File)

Aggregations

File (java.io.File)1 IllegalVersionChangeException (org.eclipse.tycho.versions.engine.IllegalVersionChangeException)1 VersionsEngine (org.eclipse.tycho.versions.engine.VersionsEngine)1