use of com.google.copybara.testing.OptionsBuilder in project copybara by google.
the class ReplaceTest method setup.
@Before
public void setup() throws IOException {
fs = Jimfs.newFileSystem();
checkoutDir = fs.getPath("/");
Files.createDirectories(checkoutDir);
console = new TestingConsole();
options = new OptionsBuilder().setConsole(console);
skylark = new SkylarkTestExecutor(options, Core.class);
}
use of com.google.copybara.testing.OptionsBuilder in project copybara by google.
the class TodoReplaceTest method setup.
@Before
public void setup() throws IOException {
FileSystem fs = Jimfs.newFileSystem();
checkoutDir = fs.getPath("/");
Files.createDirectories(checkoutDir);
console = new TestingConsole();
OptionsBuilder options = new OptionsBuilder().setConsole(console);
skylark = new SkylarkTestExecutor(options, Core.class);
}
use of com.google.copybara.testing.OptionsBuilder in project copybara by google.
the class RevisionMigratorTest method setUp.
@Before
public void setUp() throws Exception {
FileSystem fs = Jimfs.newFileSystem();
checkoutDir = fs.getPath("/test-checkoutDir");
origin = new DummyOrigin();
destinationReader = new MockReader();
location = new Location(1, 2) {
@Override
public PathFragment getPath() {
return null;
}
};
referenceMigrator = ReferenceMigrator.create("http://internalReviews.com/${reference}", "http://externalreviews.com/view?${reference}", Pattern.compile("[0-9]+"), Pattern.compile("[0-9a-f]+"), ImmutableList.of(), location);
OptionsBuilder options = new OptionsBuilder();
console = new TestingConsole();
options.setConsole(console);
skylark = new SkylarkTestExecutor(options, MetadataModule.class);
}
use of com.google.copybara.testing.OptionsBuilder in project copybara by google.
the class GlobTest method setup.
@Before
public void setup() throws IOException, RepoException {
workdir = Files.createTempDirectory("workdir");
OptionsBuilder options = new OptionsBuilder().setWorkdirToRealTempDir().setConsole(new TestingConsole());
skylark = new SkylarkTestExecutor(options);
}
use of com.google.copybara.testing.OptionsBuilder in project copybara by google.
the class SequenceTest method setup.
@Before
public void setup() throws IOException {
FileSystem fs = Jimfs.newFileSystem();
checkoutDir = fs.getPath("/test-checkoutDir");
Files.createDirectories(checkoutDir);
OptionsBuilder options = new OptionsBuilder();
console = new TestingConsole();
options.setConsole(console);
sequence = new Sequence(options.general.profiler(), /*joinTransformations*/
true, ImmutableList.of(t1, t2));
}
Aggregations