Search in sources :

Example 1 with TestProcessExecutorFactory

use of com.facebook.buck.util.TestProcessExecutorFactory in project buck by facebook.

the class HgCmdLineInterfaceIntegrationTest method testHgRootOutsideRepo.

@Test
public void testHgRootOutsideRepo() throws VersionControlCommandFailedException, InterruptedException {
    // Note: reposPath is not a hg repository, so we have to create a HgCmdLineInterface directly
    // here.
    HgCmdLineInterface hgCmdLineInterface = new HgCmdLineInterface(new TestProcessExecutorFactory(), reposPath, new VersionControlBuckConfig(FakeBuckConfig.builder().build()).getHgCmd(), ImmutableMap.of());
    Path result = hgCmdLineInterface.getHgRoot();
    assertNull(result);
}
Also used : Path(java.nio.file.Path) TestProcessExecutorFactory(com.facebook.buck.util.TestProcessExecutorFactory) Test(org.junit.Test)

Example 2 with TestProcessExecutorFactory

use of com.facebook.buck.util.TestProcessExecutorFactory in project buck by facebook.

the class HgCmdLineInterfaceIntegrationTest method givenNonVcDirThenFactoryReturnsNoOpCmdLine.

@Test
public void givenNonVcDirThenFactoryReturnsNoOpCmdLine() throws InterruptedException {
    DefaultVersionControlCmdLineInterfaceFactory vcFactory = new DefaultVersionControlCmdLineInterfaceFactory(tempFolder.getRoot().toPath(), new TestProcessExecutorFactory(), new VersionControlBuckConfig(FakeBuckConfig.builder().build()), ImmutableMap.of());
    VersionControlCmdLineInterface cmdLineInterface = vcFactory.createCmdLineInterface();
    assertEquals(NoOpCmdLineInterface.class, cmdLineInterface.getClass());
}
Also used : TestProcessExecutorFactory(com.facebook.buck.util.TestProcessExecutorFactory) Test(org.junit.Test)

Example 3 with TestProcessExecutorFactory

use of com.facebook.buck.util.TestProcessExecutorFactory in project buck by facebook.

the class AutoSparseIntegrationTest method setUpClass.

@BeforeClass
public static void setUpClass() throws IOException, InterruptedException {
    repoPath = explodeRepoZip();
    DefaultVersionControlCmdLineInterfaceFactory vcFactory = new DefaultVersionControlCmdLineInterfaceFactory(repoPath, new TestProcessExecutorFactory(), new VersionControlBuckConfig(FakeBuckConfig.builder().build()), ImmutableMap.of());
    repoCmdline = vcFactory.createCmdLineInterface();
}
Also used : DefaultVersionControlCmdLineInterfaceFactory(com.facebook.buck.util.versioncontrol.DefaultVersionControlCmdLineInterfaceFactory) VersionControlBuckConfig(com.facebook.buck.util.versioncontrol.VersionControlBuckConfig) TestProcessExecutorFactory(com.facebook.buck.util.TestProcessExecutorFactory) BeforeClass(org.junit.BeforeClass)

Aggregations

TestProcessExecutorFactory (com.facebook.buck.util.TestProcessExecutorFactory)3 Test (org.junit.Test)2 DefaultVersionControlCmdLineInterfaceFactory (com.facebook.buck.util.versioncontrol.DefaultVersionControlCmdLineInterfaceFactory)1 VersionControlBuckConfig (com.facebook.buck.util.versioncontrol.VersionControlBuckConfig)1 Path (java.nio.file.Path)1 BeforeClass (org.junit.BeforeClass)1