use of org.eclipse.tycho.p2.target.facade.TargetDefinition in project tycho by eclipse.
the class TargetDefinitionResolverTest method testResolveNoLocations.
@Test
public void testResolveNoLocations() throws Exception {
TargetDefinition definition = definitionWith();
TargetDefinitionContent units = subject.resolveContent(definition);
assertThat(versionedIdsOf(units), bagEquals(versionedIdList()));
}
use of org.eclipse.tycho.p2.target.facade.TargetDefinition in project tycho by eclipse.
the class TargetDefinitionResolverTest method testResolveWithBundleInclusionListYieldsWarning.
@Test
public void testResolveWithBundleInclusionListYieldsWarning() {
List<Location> noLocations = Collections.emptyList();
TargetDefinition definition = new TargetDefinitionStub(noLocations, true);
subject.resolveContent(definition);
// this was bug 373776: the includeBundles tag (which is the selection on the Content tab) was silently ignored
logVerifier.expectWarning("De-selecting bundles in a target definition file is not supported");
}
use of org.eclipse.tycho.p2.target.facade.TargetDefinition in project tycho by eclipse.
the class TargetDefinitionResolverTest method testUnitWithExactVersion.
@Test
public void testUnitWithExactVersion() {
TargetDefinition definition = definitionWith(new LocationStub(TestRepositories.V1_AND_V2, REFERENCED_BUNDLE_V1));
TargetDefinitionContent units = subject.resolveContent(definition);
assertThat(versionedIdsOf(units), bagEquals(versionedIdList(REFERENCED_BUNDLE_V1)));
}
use of org.eclipse.tycho.p2.target.facade.TargetDefinition in project tycho by eclipse.
the class TargetDefinitionResolverExecutionEnvironmentTest method testRestrictedExecutionEnvironment.
@Test
public void testRestrictedExecutionEnvironment() throws Exception {
subject = targetResolverForEE("CDC-1.0/Foundation-1.0");
TargetDefinition definition = definitionWith(new AlternatePackageProviderLocationStub());
Collection<IInstallableUnit> units = subject.resolveContent(definition).getUnits();
// expect that resolver included a bundle providing org.w3c.dom (here javax.xml)...
assertThat(units, hasItem(unit("javax.xml", "0.0.1.SNAPSHOT")));
// ... and did not match the import against the "a.jre" IU also in the repository
assertThat(units, not(hasItem(unitWithId("a.jre"))));
}
use of org.eclipse.tycho.p2.target.facade.TargetDefinition in project tycho by eclipse.
the class TargetDefinitionResolverIncludeModeTest method testUnsatisfiedInclusionWithSlicerFails.
@Test(expected = ResolverException.class)
public void testUnsatisfiedInclusionWithSlicerFails() throws Exception {
TargetDefinition definition = definitionWith(new SlicerLocationStub(TestRepositories.UNSATISFIED, TARGET_FEATURE));
subject.resolveContentWithExceptions(definition);
}
Aggregations