use of org.eclipse.equinox.p2.metadata.IInstallableUnit in project tycho by eclipse.
the class P2DependencyGeneratorImplTest method rcpBundle.
@Test
public void rcpBundle() throws Exception {
generateDependencies("rcp-bundle", PackagingType.TYPE_ECLIPSE_APPLICATION);
assertEquals(1, units.size());
IInstallableUnit unit = units.iterator().next();
assertEquals("org.eclipse.tycho.p2.impl.test.rcp-bundle", unit.getId());
assertEquals("1.0.0.qualifier", unit.getVersion().toString());
List<IRequirement> requirements = new ArrayList<>(unit.getRequirements());
assertEquals(2, requirements.size());
assertNotNull(getRequiredCapability("included.bundle", requirements));
// implicit dependencies because includeLaunchers="true"
assertNotNull(getRequiredCapability("org.eclipse.equinox.executable.feature.group", requirements));
assertEquals(0, artifacts.size());
}
use of org.eclipse.equinox.p2.metadata.IInstallableUnit in project tycho by eclipse.
the class P2DependencyGeneratorImplTest method rcpFeature.
@Test
public void rcpFeature() throws Exception {
generateDependencies("rcp-feature", PackagingType.TYPE_ECLIPSE_APPLICATION);
assertEquals(1, units.size());
IInstallableUnit unit = units.iterator().next();
assertEquals("org.eclipse.tycho.p2.impl.test.rcp-feature", unit.getId());
assertEquals("1.0.0.qualifier", unit.getVersion().toString());
assertEquals(2, unit.getRequirements().size());
assertEquals(0, artifacts.size());
}
use of org.eclipse.equinox.p2.metadata.IInstallableUnit in project tycho by eclipse.
the class P2DependencyGeneratorImplTest method bundle.
@Test
public void bundle() throws Exception {
generateDependencies("bundle", PackagingType.TYPE_ECLIPSE_PLUGIN);
assertEquals(1, units.size());
IInstallableUnit unit = units.get(0);
assertEquals("org.eclipse.tycho.p2.impl.test.bundle", unit.getId());
assertEquals("1.0.0.qualifier", unit.getVersion().toString());
assertEquals(2, unit.getRequirements().size());
assertEquals(DEFAULT_CLASSIFIER, unit.getProperty(RepositoryLayoutHelper.PROP_CLASSIFIER));
// not really necessary, but we get this because we reuse standard p2 implementation
assertEquals(1, artifacts.size());
}
use of org.eclipse.equinox.p2.metadata.IInstallableUnit in project tycho by eclipse.
the class P2DependencyGeneratorImplTest method rcpNoLaunchers.
@Test
public void rcpNoLaunchers() throws Exception {
generateDependencies("rcp-no-launchers", PackagingType.TYPE_ECLIPSE_APPLICATION);
assertEquals(1, units.size());
IInstallableUnit unit = units.iterator().next();
assertEquals("org.eclipse.tycho.p2.impl.test.rcp-no-launchers", unit.getId());
assertEquals("1.0.0.qualifier", unit.getVersion().toString());
List<IRequirement> requirement = new ArrayList<>(unit.getRequirements());
assertEquals(0, requirement.size());
assertEquals(0, artifacts.size());
}
use of org.eclipse.equinox.p2.metadata.IInstallableUnit in project tycho by eclipse.
the class P2DependencyGeneratorImplTest method rcp_with_p2_inf.
@Test
public void rcp_with_p2_inf() throws Exception {
generateDependencies("rcp-p2-inf", PackagingType.TYPE_ECLIPSE_APPLICATION);
assertEquals(2, units.size());
IInstallableUnit unit = getUnitWithId("org.eclipse.tycho.p2.impl.test.rcp-p2-inf", units);
assertNotNull(unit);
assertEquals("1.0.0.qualifier", unit.getVersion().toString());
List<IRequirement> requirements = new ArrayList<>(unit.getRequirements());
assertEquals(1, requirements.size());
IRequiredCapability p2InfCapability = getRequiredCapability("required.p2.inf", requirements);
assertNotNull(p2InfCapability);
assertEquals(0, artifacts.size());
assertNotNull(getUnitWithId("iu.p2.inf", units));
}
Aggregations