Search in sources :

Example 11 with OptionsBuilder

use of com.google.copybara.testing.OptionsBuilder in project copybara by google.

the class MainArgumentsTest method setup.

@Before
public void setup() {
    mainArguments = new MainArguments(new String[] { "one", "two" });
    fs = Jimfs.newFileSystem();
    options = new OptionsBuilder();
}
Also used : OptionsBuilder(com.google.copybara.testing.OptionsBuilder) Before(org.junit.Before)

Example 12 with OptionsBuilder

use of com.google.copybara.testing.OptionsBuilder in project copybara by google.

the class ReadConfigFromChangeWorkflowTest method setup.

@Before
public void setup() {
    options = new OptionsBuilder();
    origin = new DummyOrigin();
    destination = new RecordsProcessCallDestination();
    options.testingOptions.origin = origin;
    options.testingOptions.destination = destination;
    skylark = new SkylarkParser(ImmutableSet.of(Core.class, Authoring.Module.class, TestingModule.class));
}
Also used : RecordsProcessCallDestination(com.google.copybara.testing.RecordsProcessCallDestination) SkylarkParser(com.google.copybara.config.SkylarkParser) Authoring(com.google.copybara.authoring.Authoring) DummyOrigin(com.google.copybara.testing.DummyOrigin) OptionsBuilder(com.google.copybara.testing.OptionsBuilder) Before(org.junit.Before)

Example 13 with OptionsBuilder

use of com.google.copybara.testing.OptionsBuilder in project copybara by google.

the class SkylarkParserTest method setup.

@Before
public void setup() {
    OptionsBuilder options = new OptionsBuilder();
    console = new TestingConsole();
    options.setConsole(console);
    parser = new SkylarkTestExecutor(options, Mock.class, MockLabelsAwareModule.class);
}
Also used : TestingConsole(com.google.copybara.util.console.testing.TestingConsole) OptionsBuilder(com.google.copybara.testing.OptionsBuilder) SkylarkTestExecutor(com.google.copybara.testing.SkylarkTestExecutor) Before(org.junit.Before)

Example 14 with OptionsBuilder

use of com.google.copybara.testing.OptionsBuilder in project copybara by google.

the class FolderOriginTest method setup.

@Before
public void setup() throws IOException, RepoException {
    workdir = Files.createTempDirectory("workdir");
    options = new OptionsBuilder().setWorkdirToRealTempDir().setHomeDir(StandardSystemProperty.USER_HOME.value());
    skylark = new SkylarkTestExecutor(options, FolderModule.class);
}
Also used : OptionsBuilder(com.google.copybara.testing.OptionsBuilder) SkylarkTestExecutor(com.google.copybara.testing.SkylarkTestExecutor) Before(org.junit.Before)

Example 15 with OptionsBuilder

use of com.google.copybara.testing.OptionsBuilder in project copybara by google.

the class RemoveTest 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);
}
Also used : TestingConsole(com.google.copybara.util.console.testing.TestingConsole) FileSystem(java.nio.file.FileSystem) OptionsBuilder(com.google.copybara.testing.OptionsBuilder) SkylarkTestExecutor(com.google.copybara.testing.SkylarkTestExecutor) Core(com.google.copybara.Core) Before(org.junit.Before)

Aggregations

OptionsBuilder (com.google.copybara.testing.OptionsBuilder)34 Before (org.junit.Before)33 TestingConsole (com.google.copybara.util.console.testing.TestingConsole)28 SkylarkTestExecutor (com.google.copybara.testing.SkylarkTestExecutor)26 FileSystem (java.nio.file.FileSystem)7 Core (com.google.copybara.Core)5 SkylarkParser (com.google.copybara.config.SkylarkParser)5 DummyOrigin (com.google.copybara.testing.DummyOrigin)5 Path (java.nio.file.Path)5 Authoring (com.google.copybara.authoring.Authoring)4 RepoException (com.google.copybara.exception.RepoException)4 RecordsProcessCallDestination (com.google.copybara.testing.RecordsProcessCallDestination)4 TestGitOptions (com.google.copybara.testing.git.GitTestUtil.TestGitOptions)4 HttpTransport (com.google.api.client.http.HttpTransport)3 GitApiMockHttpTransport (com.google.copybara.testing.OptionsBuilder.GitApiMockHttpTransport)3 MockLowLevelHttpRequest (com.google.api.client.testing.http.MockLowLevelHttpRequest)2 GeneralOptions (com.google.copybara.GeneralOptions)2 GithubApi (com.google.copybara.git.github.api.GithubApi)2 TestingEventMonitor (com.google.copybara.testing.TestingEventMonitor)2 IOException (java.io.IOException)2