use of org.eclipse.tycho.p2.target.facade.TargetDefinition.Location in project tycho by eclipse.
the class TargetDefinitionResolverTest method testResolveOtherLocationYieldsWarning.
@Test
public void testResolveOtherLocationYieldsWarning() throws Exception {
TargetDefinition definition = definitionWith(new OtherLocationStub(), new LocationStub(TARGET_FEATURE));
TargetDefinitionContent units = subject.resolveContent(definition);
assertThat(versionedIdsOf(units), hasItem(MAIN_BUNDLE));
logVerifier.expectWarning("Target location type 'Directory' is not supported");
}
use of org.eclipse.tycho.p2.target.facade.TargetDefinition.Location in project tycho by eclipse.
the class TargetDefinitionFileTest method testInvalidIncludeMode.
public void testInvalidIncludeMode() throws Exception {
expectedException.expect(TargetDefinitionSyntaxException.class);
List<? extends Location> locations = readTarget("invalidMode.target").getLocations();
// allow exception to be thrown late
InstallableUnitLocation invalidIncludeModeLocation = (InstallableUnitLocation) locations.get(0);
invalidIncludeModeLocation.getIncludeMode();
}
use of org.eclipse.tycho.p2.target.facade.TargetDefinition.Location in project tycho by eclipse.
the class TargetDefinitionFileTest method testTarget.
@Test
public void testTarget() throws Exception {
List<? extends Location> locations = readTarget("target.target").getLocations();
assertEquals(2, locations.size());
InstallableUnitLocation location = (InstallableUnitLocation) locations.get(0);
assertEquals(1, location.getRepositories().size());
assertEquals(URI.create("http://download.eclipse.org/eclipse/updates/3.5/"), location.getRepositories().get(0).getLocation());
assertEquals(1, location.getUnits().size());
assertEquals("org.eclipse.platform.sdk", location.getUnits().get(0).getId());
assertEquals("3.5.2.M20100211-1343", location.getUnits().get(0).getVersion());
InstallableUnitLocation l02 = (InstallableUnitLocation) locations.get(1);
assertEquals(5, l02.getUnits().size());
assertEquals(2, l02.getRepositories().size());
assertEquals(URI.create("http://subclipse.tigris.org/update_1.6.x/"), l02.getRepositories().get(0).getLocation());
assertEquals(URI.create("http://download.eclipse.org/tools/mylyn/update/e3.4/"), l02.getRepositories().get(1).getLocation());
}
use of org.eclipse.tycho.p2.target.facade.TargetDefinition.Location in project tycho by eclipse.
the class TargetDefinitionFileTest method testDefaultIncludeModeValues.
@Test
public void testDefaultIncludeModeValues() throws Exception {
List<? extends Location> locations = readTarget("includeModes.target").getLocations();
InstallableUnitLocation locationWithDefaults = (InstallableUnitLocation) locations.get(0);
assertEquals(IncludeMode.PLANNER, locationWithDefaults.getIncludeMode());
assertEquals(false, locationWithDefaults.includeAllEnvironments());
}
use of org.eclipse.tycho.p2.target.facade.TargetDefinition.Location 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");
}
Aggregations