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);
}
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());
}
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();
}
Aggregations