Package com.google.devtools.moe.client.testing

Examples of com.google.devtools.moe.client.testing.DummyDb


  public void testFindNewRevisions() {
    AppContextForTesting.initForTest();
    IMocksControl control = EasyMock.createControl();
    CommandRunner cmd = control.createMock(CommandRunner.class);
    AppContext.RUN.cmd = cmd;
    DummyDb db = new DummyDb(false);

    // Mock call for findHighestRevision
    try {
      expect(cmd.runCommand(
          "svn",
View Full Code Here


      return 1;
    }

    Db db;
    if (options.dbLocation.equals("dummy")) {
      db = new DummyDb(true);
    } else {
      // TODO(user): also allow for url dbLocation types
      try {
        db = FileDb.makeDbFromFile(options.dbLocation);
      } catch (MoeProblem e) {
View Full Code Here

      return 1;
    }

    Db db;
    if (options.dbLocation.equals("dummy")) {
      db = new DummyDb(true);
    } else {
      // TODO(user): also allow for url dbLocation types
      try {
        db = FileDb.makeDbFromFile(options.dbLocation);
      } catch (MoeProblem e) {
View Full Code Here

      return 1;
    }

    Db db;
    if (options.dbLocation.equals("dummy")) {
      db = new DummyDb(true);
    } else {
      // TODO(user): also allow for url dbLocation types
      try {
        db = FileDb.makeDbFromFile(options.dbLocation);
      } catch (MoeProblem e) {
View Full Code Here

      return 1;
    }

    Db db;
    if (options.dbLocation.equals("dummy")) {
      db = new DummyDb(true);
    } else {
      // TODO(user): also allow for url dbLocation types
      try {
        db = FileDb.makeDbFromFile(options.dbLocation);
      } catch (MoeProblem e) {
View Full Code Here

  @Override
  public int perform() {
    Db db;
    if (options.dbLocation.equals("dummy")) {
      db = new DummyDb(true);
    } else {
      // TODO(user): also allow for url dbLocation types
      try {
        db = FileDb.makeDbFromFile(options.dbLocation);
      } catch (MoeProblem e) {
View Full Code Here

  }

  public void testFindNewRevisions() throws Exception {
    HgClonedRepository mockRepo = mockClonedRepo(MOCK_REPO_NAME);
    expect(config.getImportBranches()).andReturn(null);
    DummyDb db = new DummyDb(false);

    expect(
        cmd.runCommand(
            "hg",
            ImmutableList.<String>of(
View Full Code Here

  }

  public void testFindNewRevisions_all() throws Exception {
    GitClonedRepository mockRepo = mockClonedRepo(repositoryName);
    mockFindHeadRevisions(mockRepo);
    DummyDb db = new DummyDb(false);

    // Breadth-first search order.
    expectLogCommand(mockRepo, LOG_FORMAT_ALL_METADATA, "mockHashID1")
        .andReturn(METADATA_JOINER.join(
            "mockHashID1", "uid@google.com", "date", "parent", "description"));
View Full Code Here

    GitClonedRepository mockRepo = mockClonedRepo(repositoryName);
    mockFindHeadRevisions(mockRepo);

    // Create a fake db that has equivalences for parent1, so that
    // parent1 isn't included in the output.
    DummyDb db = new DummyDb(true) {
      @Override public Set<Revision> findEquivalences(
          Revision revision, String otherRepository) {
        if (revision.revId.equals("parent1")) {
          return super.findEquivalences(revision, otherRepository);
        } else {
View Full Code Here

TOP

Related Classes of com.google.devtools.moe.client.testing.DummyDb

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.