Package com.google.devtools.moe.client.project

Examples of com.google.devtools.moe.client.project.RepositoryConfig


    FileSystem fileSystem = control.createMock(FileSystem.class);
    CommandRunner cmd = control.createMock(CommandRunner.class);
    AppContext.RUN.cmd = cmd;
    AppContext.RUN.fileSystem = fileSystem;

    RepositoryConfig mockConfig = control.createMock(RepositoryConfig.class);
    expect(mockConfig.getUrl()).andReturn("http://foo/svn/trunk/").anyTimes();
    expect(mockConfig.getProjectSpace()).andReturn("internal").anyTimes();
    expect(mockConfig.getIgnoreFileRes()).andReturn(ImmutableList.<String>of()).anyTimes();

    Revision result = new Revision("45", "");
    expect(fileSystem.getTemporaryDirectory("svn_writer_45_")).
        andReturn(new File("/dummy/path/45"));
    expect(revisionHistory.findHighestRevision("45")).andReturn(result);
View Full Code Here


    FileSystem fileSystem = control.createMock(FileSystem.class);
    CommandRunner cmd = control.createMock(CommandRunner.class);
    AppContext.RUN.cmd = cmd;
    AppContext.RUN.fileSystem = fileSystem;
   
    RepositoryConfig mockConfig = control.createMock(RepositoryConfig.class);
    expect(mockConfig.getUrl()).andReturn("http://foo/svn/trunk/").anyTimes();
    expect(mockConfig.getProjectSpace()).andReturn("internal").anyTimes();
    expect(mockConfig.getIgnoreFileRes()).andReturn(ImmutableList.<String>of()).anyTimes();

    expect(revisionHistory.findHighestRevision("46")).andReturn(result);
    expect(fileSystem.getTemporaryDirectory("svn_export_testing_45_")).
        andReturn(new File("/dummy/path/45"));
    expect(cmd.runCommand(
View Full Code Here

    AppContextForTesting.initForTest();
    IMocksControl control = EasyMock.createControl();

    String repositoryName = "mockrepo";
    String repositoryURL = "http://foo/hg";
    RepositoryConfig repositoryConfig = control.createMock(RepositoryConfig.class);
    expect(repositoryConfig.getUrl()).andReturn(repositoryURL).anyTimes();
    String localCloneTempDir = "/tmp/hg_clone_mockrepo_12345";

    // Mock AppContext.RUN.fileSystem.getTemporaryDirectory()
    FileSystem mockFS = control.createMock(FileSystem.class);
    // The Lifetimes of clones in these tests are arbitrary since we're not really creating any
View Full Code Here

  }

  private GitClonedRepository mockClonedRepo(String repoName) {
    GitClonedRepository mockRepo = control.createMock(GitClonedRepository.class);

    RepositoryConfig repositoryConfig = control.createMock(RepositoryConfig.class);
    expect(repositoryConfig.getUrl()).andReturn(localCloneTempDir).anyTimes();
    expect(repositoryConfig.getImportBranches())
        .andReturn(ImmutableList.of("branch1", "branch2")).anyTimes();

    expect(mockRepo.getRepositoryName()).andReturn(repoName).anyTimes();
    expect(mockRepo.getConfig()).andReturn(repositoryConfig).anyTimes();
    return mockRepo;
View Full Code Here

TOP

Related Classes of com.google.devtools.moe.client.project.RepositoryConfig

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.