Search in sources :

Example 26 with TargetDefinition

use of org.eclipse.tycho.p2.target.facade.TargetDefinition in project tycho by eclipse.

the class TargetDefinitionResolverIncludeModeTest method testResolveConflictingIncludeMode.

@Test(expected = TargetDefinitionResolutionException.class)
public void testResolveConflictingIncludeMode() throws Exception {
    TargetDefinition definition = definitionWith(new SlicerLocationStub(TestRepositories.V1, MAIN_BUNDLE), new PlannerLocationStub(TestRepositories.V2));
    subject.resolveContentWithExceptions(definition);
}
Also used : TargetDefinition(org.eclipse.tycho.p2.target.facade.TargetDefinition) Test(org.junit.Test)

Example 27 with TargetDefinition

use of org.eclipse.tycho.p2.target.facade.TargetDefinition in project tycho by eclipse.

the class TargetDefinitionResolverIncludeModeTest method testUnsatisfiedDependencyWithSlicerIsOk.

@Test
public void testUnsatisfiedDependencyWithSlicerIsOk() throws Exception {
    TargetDefinition definition = definitionWith(new SlicerLocationStub(TestRepositories.UNSATISFIED, MAIN_BUNDLE));
    TargetDefinitionContent units = subject.resolveContent(definition);
    assertThat(versionedIdsOf(units), bagEquals(versionedIdList(MAIN_BUNDLE)));
}
Also used : TargetDefinition(org.eclipse.tycho.p2.target.facade.TargetDefinition) Test(org.junit.Test)

Example 28 with TargetDefinition

use of org.eclipse.tycho.p2.target.facade.TargetDefinition in project tycho by eclipse.

the class TargetDefinitionResolverIncludeModeTest method testResolveWithPlanner.

@Test
public void testResolveWithPlanner() throws Exception {
    TargetDefinition definition = definitionWith(new PlannerLocationStub(TestRepositories.V1_AND_V2, TARGET_FEATURE));
    TargetDefinitionContent units = subject.resolveContent(definition);
    assertThat(versionedIdsOf(units), bagEquals(versionedIdList(TARGET_FEATURE, MAIN_BUNDLE, REFERENCED_BUNDLE_V1, OPTIONAL_BUNDLE)));
}
Also used : TargetDefinition(org.eclipse.tycho.p2.target.facade.TargetDefinition) Test(org.junit.Test)

Example 29 with TargetDefinition

use of org.eclipse.tycho.p2.target.facade.TargetDefinition in project tycho by eclipse.

the class TargetDefinitionResolverIncludeModeTest method testResolveWithSlicer.

@Test
public void testResolveWithSlicer() throws Exception {
    TargetDefinition definition = definitionWith(new SlicerLocationStub(TestRepositories.V1_AND_V2, TARGET_FEATURE));
    TargetDefinitionContent units = subject.resolveContent(definition);
    assertThat(versionedIdsOf(units), bagEquals(versionedIdList(TARGET_FEATURE, MAIN_BUNDLE, REFERENCED_BUNDLE_V1)));
}
Also used : TargetDefinition(org.eclipse.tycho.p2.target.facade.TargetDefinition) Test(org.junit.Test)

Example 30 with TargetDefinition

use of org.eclipse.tycho.p2.target.facade.TargetDefinition in project tycho by eclipse.

the class TargetDefinitionResolverIncludeSourceTest method testIncludeSourceWithSlicerMode.

@Test
public void testIncludeSourceWithSlicerMode() throws Exception {
    TargetDefinition definition = definitionWith(new WithSourceLocationStub(IncludeMode.SLICER, TestRepositories.SOURCES, BUNDLE_WITH_SOURCES));
    TargetDefinitionContent content = subject.resolveContentWithExceptions(definition);
    assertThat(versionedIdsOf(content), hasItem(BUNDLE_WITH_SOURCES));
    assertThat(versionedIdsOf(content), hasItem(SOURCE_BUNDLE));
    assertThat(content.getUnits().size(), is(2));
}
Also used : TargetDefinition(org.eclipse.tycho.p2.target.facade.TargetDefinition) Test(org.junit.Test)

Aggregations

TargetDefinition (org.eclipse.tycho.p2.target.facade.TargetDefinition)31 Test (org.junit.Test)30 ArrayList (java.util.ArrayList)2 IInstallableUnit (org.eclipse.equinox.p2.metadata.IInstallableUnit)2 InstallableUnitLocation (org.eclipse.tycho.p2.target.facade.TargetDefinition.InstallableUnitLocation)2 Location (org.eclipse.tycho.p2.target.facade.TargetDefinition.Location)2 URI (java.net.URI)1 IMetadataRepository (org.eclipse.equinox.p2.repository.metadata.IMetadataRepository)1 Repository (org.eclipse.tycho.p2.target.facade.TargetDefinition.Repository)1