use of org.eclipse.tycho.p2.target.facade.TargetDefinition in project tycho by eclipse.
the class TargetDefinitionResolverTest method testMissingUnit.
@Test(expected = TargetDefinitionResolutionException.class)
public void testMissingUnit() throws Exception {
TargetDefinition definition = definitionWith(new LocationStub(TestRepositories.V2, MAIN_BUNDLE));
subject.resolveContentWithExceptions(definition);
}
use of org.eclipse.tycho.p2.target.facade.TargetDefinition in project tycho by eclipse.
the class TargetDefinitionResolverTest method testResolveMultipleRepositories.
@Test
public void testResolveMultipleRepositories() throws Exception {
TargetDefinition definition = definitionWith(new LocationStub(TestRepositories.V1_AND_V2, OPTIONAL_BUNDLE, REFERENCED_BUNDLE_V2));
TargetDefinitionContent units = subject.resolveContent(definition);
assertThat(versionedIdsOf(units), bagEquals(versionedIdList(REFERENCED_BUNDLE_V2, OPTIONAL_BUNDLE)));
}
use of org.eclipse.tycho.p2.target.facade.TargetDefinition 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 in project tycho by eclipse.
the class TargetDefinitionResolverTest method testResolveNoRepositories.
@Test
public void testResolveNoRepositories() throws Exception {
TargetDefinition definition = definitionWith(new LocationStub(TestRepositories.NONE));
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 testUnitWithWrongVersionYieldsSyntaxException.
/**
* Ideally, the interface should return strongly typed versions. Since this is not possible in
* the facade, syntax errors in the version attribute can only be detected by the resolver.
*/
@Test(expected = TargetDefinitionSyntaxException.class)
public void testUnitWithWrongVersionYieldsSyntaxException() throws Exception {
TargetDefinition definition = definitionWith(new LocationStub(TestRepositories.V1_AND_V2, REFERENCED_BUNDLE_INVALID_VERSION));
subject.resolveContentWithExceptions(definition);
}
Aggregations