use of com.google.copybara.testing.OptionsBuilder in project copybara by google.
the class CopyOrMoveTest method setup.
@Before
public void setup() throws IOException {
FileSystem fs = Jimfs.newFileSystem();
checkoutDir = fs.getPath("/test-checkoutDir");
Files.createDirectories(checkoutDir);
console = new TestingConsole();
options = new OptionsBuilder().setConsole(console);
skylark = new SkylarkTestExecutor(options, Core.class, CopyOrMove.class);
}
use of com.google.copybara.testing.OptionsBuilder in project copybara by google.
the class FolderDestinationTest method setup.
@Before
public void setup() throws IOException, RepoException {
workdir = Files.createTempDirectory("workdir");
options = new OptionsBuilder().setWorkdirToRealTempDir().setHomeDir(StandardSystemProperty.USER_HOME.value());
Files.createDirectory(workdir.resolve("dir"));
Files.write(workdir.resolve("test.txt"), new byte[] {});
Files.write(workdir.resolve("dir/file.txt"), new byte[] {});
excludedPathsForDeletion = ImmutableList.of();
skylark = new SkylarkTestExecutor(options, FolderModule.class);
}
use of com.google.copybara.testing.OptionsBuilder in project copybara by google.
the class CopybaraTest method setUp.
@Before
public void setUp() throws Exception {
optionsBuilder = new OptionsBuilder();
console = new TestingConsole();
eventMonitor = new TestingEventMonitor();
optionsBuilder.setConsole(console);
optionsBuilder.general.withEventMonitor(eventMonitor);
migration = mock(Migration.class);
config = new Config(ImmutableMap.of("workflow", migration), "foo/copy.bara.sky");
}
use of com.google.copybara.testing.OptionsBuilder in project copybara by google.
the class CoreReverseTest method setup.
@Before
public void setup() throws IOException {
OptionsBuilder options = new OptionsBuilder();
skylark = new SkylarkTestExecutor(options, Mock.class);
console = new TestingConsole();
options.setConsole(console);
}
Aggregations