Package com.google.devtools.moe.client.repositories

Examples of com.google.devtools.moe.client.repositories.Repository


    RepositoryConfig config = EasyMock.createNiceMock(RepositoryConfig.class);
    expect(config.getType()).andReturn(RepositoryType.dummy);
    EasyMock.replay(config);

    // Test the .makeRepositoryFromConfig method.
    Repository repository = ProjectContext.makeRepositoryFromConfig("myRepository", config);
    assertNotNull(repository);
    assertEquals("myRepository", repository.name);
  }
View Full Code Here


    EasyMock.replay(config);

    // Test the method with all reserved repository keywords.
    for (String keyword : ImmutableList.of("file")) {
      try {
        Repository repository = ProjectContext.makeRepositoryFromConfig(keyword, config);
        fail("ProjectContext.makeRepositoryFromConfig does not check " +
             "for the reserved keyword '" + keyword + "' in the repository name.");
      } catch (InvalidProject expected) {}
    }
  }
View Full Code Here

    if (repoEx1.getOption("revision") == null || repoEx2.getOption("revision") == null) {
      throw new MoeProblem("You must specify a revision in each repo, e.g. 'internal(revision=2)'");
    }

    // Sanity check: make sure the given repos and revisions exist.
    Repository repo1 = context.repositories.get(repoEx1.getRepositoryName());
    Repository repo2 = context.repositories.get(repoEx2.getRepositoryName());
    if (repo1 == null || repo2 == null) {
      AppContext.RUN.ui.error(
          "Unknown repository: " +
          (repo1 == null ? repoEx1.getRepositoryName() : repoEx2.getRepositoryName()));
      return 1;
View Full Code Here

    TranslatorPath tPath = new TranslatorPath("foo", "public");
    Translator t = new ForwardTranslator(ImmutableList.<TranslatorStep>of(
        new TranslatorStep("quux", translatorEditor)));
   
    ProjectContext context = ProjectContext.builder()
        .withRepositories(ImmutableMap.of("foo", new Repository("foo", null, cc, null)))
        .withTranslators(ImmutableMap.of(tPath, t))
        .withEditors(ImmutableMap.of("bar", e)).build();

    Codebase firstCb = new Codebase(new File("/first"), "foo",
        new RepositoryExpression(new Term("foo", EMPTY_MAP)));
View Full Code Here

TOP

Related Classes of com.google.devtools.moe.client.repositories.Repository

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.