Search in sources :

Example 6 with ProcessResult

use of org.eclipse.n4js.utils.process.ProcessResult in project n4js by eclipse.

the class RunExternalLibrariesPluginTest method runClientWithTwoClosedWorkspaceProjectsThenReopenThem.

/**
 */
@Test
public void runClientWithTwoClosedWorkspaceProjectsThenReopenThem() throws CoreException {
    for (final String libProjectName : newArrayList(PB, PD)) {
        getProjectByName(libProjectName).close(new NullProgressMonitor());
        waitForAutoBuildCheckIndexRigid();
    }
    final ProcessResult firstResult = runClient();
    // @formatter:off
    assertEquals("Unexpected output after running the client module with two closed projects: " + firstResult, "Workspace A<init>" + NL + "External B<init>" + NL + "Workspace C<init>" + NL + "External D<init>" + NL, firstResult.getStdOut());
    for (final String libProjectName : newArrayList(PB, PD)) {
        getProjectByName(libProjectName).open(new NullProgressMonitor());
        waitForAutoBuildCheckIndexRigid();
    }
    final ProcessResult secondResult = runClient();
    // @formatter:off
    assertEquals("Unexpected output after running the client module with all opened projects: " + secondResult, "Workspace A<init>" + NL + "Workspace B<init>" + NL + "Workspace C<init>" + NL + "Workspace D<init>" + NL, secondResult.getStdOut());
// @formatter:on
}
Also used : NullProgressMonitor(org.eclipse.core.runtime.NullProgressMonitor) ProcessResult(org.eclipse.n4js.utils.process.ProcessResult) Test(org.junit.Test) AbstractBuilderParticipantTest(org.eclipse.n4js.tests.builder.AbstractBuilderParticipantTest)

Example 7 with ProcessResult

use of org.eclipse.n4js.utils.process.ProcessResult in project n4js by eclipse.

the class RunExternalLibrariesPluginTest method runClientWithTwoClosedWorkspaceProjectsWithDirectDependency.

/**
 */
@Test
public void runClientWithTwoClosedWorkspaceProjectsWithDirectDependency() throws CoreException {
    for (final String libProjectName : newArrayList(PB, PC)) {
        getProjectByName(libProjectName).close(new NullProgressMonitor());
        waitForAutoBuildCheckIndexRigid();
    }
    final ProcessResult result = runClient();
    // @formatter:off
    assertEquals("Unexpected output after running the client module: " + result, "Workspace A<init>" + NL + "External B<init>" + NL + "External C<init>" + NL + "Workspace D<init>" + NL, result.getStdOut());
// @formatter:on
}
Also used : NullProgressMonitor(org.eclipse.core.runtime.NullProgressMonitor) ProcessResult(org.eclipse.n4js.utils.process.ProcessResult) Test(org.junit.Test) AbstractBuilderParticipantTest(org.eclipse.n4js.tests.builder.AbstractBuilderParticipantTest)

Example 8 with ProcessResult

use of org.eclipse.n4js.utils.process.ProcessResult in project n4js by eclipse.

the class RunExternalLibrariesPluginTest method runClientWithTwoClosedWorkspaceProjectsWithTransitiveDependency.

/**
 */
@Test
public void runClientWithTwoClosedWorkspaceProjectsWithTransitiveDependency() throws CoreException {
    for (final String libProjectName : newArrayList(PB, PD)) {
        getProjectByName(libProjectName).close(new NullProgressMonitor());
        waitForAutoBuildCheckIndexRigid();
    }
    final ProcessResult result = runClient();
    // @formatter:off
    assertEquals("Unexpected output after running the client module: " + result, "Workspace A<init>" + NL + "External B<init>" + NL + "Workspace C<init>" + NL + "External D<init>" + NL, result.getStdOut());
// @formatter:on
}
Also used : NullProgressMonitor(org.eclipse.core.runtime.NullProgressMonitor) ProcessResult(org.eclipse.n4js.utils.process.ProcessResult) Test(org.junit.Test) AbstractBuilderParticipantTest(org.eclipse.n4js.tests.builder.AbstractBuilderParticipantTest)

Example 9 with ProcessResult

use of org.eclipse.n4js.utils.process.ProcessResult in project n4js by eclipse.

the class RunExternalLibrariesPluginTest method runClientWithTwoDeletedWorkspaceProjectsThenReImportThem.

/**
 */
@Test
public void runClientWithTwoDeletedWorkspaceProjectsThenReImportThem() throws Exception {
    for (final String libProjectName : newArrayList(PB, PD)) {
        getProjectByName(libProjectName).delete(true, new NullProgressMonitor());
        waitForAutoBuildCheckIndexRigid();
    }
    final ProcessResult firstResult = runClient();
    // @formatter:off
    assertEquals("Unexpected output after running the client module with two deleted projects: " + firstResult, "Workspace A<init>" + NL + "External B<init>" + NL + "Workspace C<init>" + NL + "External D<init>" + NL, firstResult.getStdOut());
    for (final String libProjectName : newArrayList(PB, PD)) {
        final File projectsRoot = new File(getResourceUri(PROBANDS, WORKSPACE_LOC));
        ProjectTestsUtils.importProject(projectsRoot, libProjectName);
        waitForAutoBuildCheckIndexRigid();
    }
    final ProcessResult secondResult = runClient();
    // @formatter:off
    assertEquals("Unexpected output after running the client module with all opened projects: " + secondResult, "Workspace A<init>" + NL + "Workspace B<init>" + NL + "Workspace C<init>" + NL + "Workspace D<init>" + NL, secondResult.getStdOut());
// @formatter:on
}
Also used : NullProgressMonitor(org.eclipse.core.runtime.NullProgressMonitor) ProcessResult(org.eclipse.n4js.utils.process.ProcessResult) File(java.io.File) Test(org.junit.Test) AbstractBuilderParticipantTest(org.eclipse.n4js.tests.builder.AbstractBuilderParticipantTest)

Example 10 with ProcessResult

use of org.eclipse.n4js.utils.process.ProcessResult in project n4js by eclipse.

the class RunExternalLibrariesPluginTest method runClientWithTwoDeletedWorkspaceProjects.

/**
 */
@Test
public void runClientWithTwoDeletedWorkspaceProjects() throws CoreException {
    for (final String libProjectName : newArrayList(PB, PD)) {
        getProjectByName(libProjectName).delete(true, new NullProgressMonitor());
        waitForAutoBuildCheckIndexRigid();
    }
    final ProcessResult result = runClient();
    // @formatter:off
    assertEquals("Unexpected output after running the client module: " + result, "Workspace A<init>" + NL + "External B<init>" + NL + "Workspace C<init>" + NL + "External D<init>" + NL, result.getStdOut());
// @formatter:on
}
Also used : NullProgressMonitor(org.eclipse.core.runtime.NullProgressMonitor) ProcessResult(org.eclipse.n4js.utils.process.ProcessResult) Test(org.junit.Test) AbstractBuilderParticipantTest(org.eclipse.n4js.tests.builder.AbstractBuilderParticipantTest)

Aggregations

ProcessResult (org.eclipse.n4js.utils.process.ProcessResult)15 Test (org.junit.Test)10 NullProgressMonitor (org.eclipse.core.runtime.NullProgressMonitor)8 AbstractBuilderParticipantTest (org.eclipse.n4js.tests.builder.AbstractBuilderParticipantTest)8 File (java.io.File)3 Version (org.eclipse.n4js.utils.Version)3 RunConfiguration (org.eclipse.n4js.runner.RunConfiguration)2 IFile (org.eclipse.core.resources.IFile)1 IProject (org.eclipse.core.resources.IProject)1 IStatus (org.eclipse.core.runtime.IStatus)1