use of org.eclipse.tycho.test.util.ReactorProjectIdentitiesStub in project tycho by eclipse.
the class ReactorRepositoryManagerTest method testTargetPlatformComputationInIntegration.
@Test
public void testTargetPlatformComputationInIntegration() throws Exception {
subject = getService(ReactorRepositoryManagerFacade.class);
ReactorProject currentProject = new ReactorProjectStub("reactor-artifact");
TargetPlatformConfigurationStub tpConfig = new TargetPlatformConfigurationStub();
tpConfig.addP2Repository(new MavenRepositoryLocation(null, ResourceUtil.resourceFile("repositories/launchers").toURI()));
subject.computePreliminaryTargetPlatform(currentProject, tpConfig, new ExecutionEnvironmentConfigurationStub("JavaSE-1.7"), null, null);
ReactorProjectIdentities upstreamProject = new ReactorProjectIdentitiesStub(ResourceUtil.resourceFile("projectresult"));
subject.computeFinalTargetPlatform(currentProject, Arrays.asList(upstreamProject));
P2TargetPlatform finalTP = (P2TargetPlatform) currentProject.getContextValue("org.eclipse.tycho.core.TychoConstants/targetPlatform");
Collection<IInstallableUnit> units = finalTP.getInstallableUnits();
// units from the p2 repository
assertThat(units, hasItem(unitWithId("org.eclipse.equinox.launcher")));
// units from the upstream project
assertThat(units, hasItem(unitWithId("bundle")));
assertThat(units, hasItem(unitWithId("bundle.source")));
// TODO get artifact
}
use of org.eclipse.tycho.test.util.ReactorProjectIdentitiesStub in project tycho by eclipse.
the class PublishProductToolTest method before.
@Before
public void before() throws Exception {
File projectDirectory = tempManager.newFolder("projectDir");
outputRepository = new PublishingRepositoryImpl(p2Context.getAgent(), new ReactorProjectIdentitiesStub(projectDirectory));
interpolatorMock = mock(Interpolator.class);
when(interpolatorMock.interpolate(anyString())).thenAnswer(new Answer<String>() {
@Override
public String answer(InvocationOnMock invocation) throws Throwable {
// by default don't expand anything
return (String) invocation.getArguments()[0];
}
});
}
use of org.eclipse.tycho.test.util.ReactorProjectIdentitiesStub in project tycho by eclipse.
the class PublisherServiceTest method initSubject.
@Before
public void initSubject() throws Exception {
File projectDirectory = tempManager.newFolder("projectDir");
LinkedHashSet<IInstallableUnit> installableUnits = new LinkedHashSet<>();
installableUnits.add(InstallableUnitUtil.createFeatureIU("org.eclipse.example.original_feature", "1.0.0"));
IMetadataRepository context = new ImmutableInMemoryMetadataRepository(installableUnits);
// TODO these publishers don't produce artifacts, so we could run without file system
outputRepository = new PublishingRepositoryImpl(p2Context.getAgent(), new ReactorProjectIdentitiesStub(projectDirectory));
PublisherActionRunner publisherRunner = new PublisherActionRunner(context, DEFAULT_ENVIRONMENTS, logVerifier.getLogger());
subject = new PublisherServiceImpl(publisherRunner, DEFAULT_QUALIFIER, outputRepository);
}
use of org.eclipse.tycho.test.util.ReactorProjectIdentitiesStub in project tycho by eclipse.
the class PublishingRepositoryTest method initSubject.
@Before
public void initSubject() throws Exception {
project = new ReactorProjectIdentitiesStub(tempManager.newFolder("projectDir"));
subject = new PublishingRepositoryImpl(p2Context.getAgent(), project);
}
use of org.eclipse.tycho.test.util.ReactorProjectIdentitiesStub in project tycho by eclipse.
the class MirrorApplicationServiceTest method initTestContext.
@Before
public void initTestContext() throws Exception {
destinationRepo = new DestinationRepositoryDescriptor(tempFolder.newFolder("dest"), DEFAULT_NAME);
File projectFolder = tempFolder.getRoot();
ReactorProjectIdentities currentProject = new ReactorProjectIdentitiesStub(projectFolder);
context = new BuildContext(currentProject, DEFAULT_QUALIFIER, DEFAULT_ENVIRONMENTS);
subject = new MirrorApplicationServiceImpl();
MavenContext mavenContext = new MavenContextImpl(null, logVerifier.getLogger());
subject.setMavenContext(mavenContext);
}
Aggregations