Package org.gitective.core

Examples of org.gitective.core.CommitFinder.find()


    CommitCountFilter count = new CommitCountFilter();
    CommitLimitFilter limit = new CommitLimitFilter(2);
    service.setFilter(new AndCommitFilter(limit, count));
    service.find();
    assertEquals(1, count.getCount());
    service.find();
    assertEquals(2, count.getCount());
    service.find();
    assertEquals(2, count.getCount());
    limit.reset();
    service.find();
View Full Code Here


    service.setFilter(new AndCommitFilter(limit, count));
    service.find();
    assertEquals(1, count.getCount());
    service.find();
    assertEquals(2, count.getCount());
    service.find();
    assertEquals(2, count.getCount());
    limit.reset();
    service.find();
    assertEquals(3, count.getCount());
  }
View Full Code Here

    service.find();
    assertEquals(2, count.getCount());
    service.find();
    assertEquals(2, count.getCount());
    limit.reset();
    service.find();
    assertEquals(3, count.getCount());
  }

  /**
   * Test limiting number of commits in walk
View Full Code Here

    add("file2.txt", "b");
    add("file3.txt", "c");
    CommitFinder service = new CommitFinder(testRepo);
    CommitCountFilter count = new CommitCountFilter();
    service.setFilter(new AndCommitFilter(new CommitLimitFilter(1), count));
    service.find();
    assertEquals(1, count.getCount());
    count.reset();
    service.setFilter(new AndCommitFilter(new CommitLimitFilter(3), count));
    service.find();
    assertEquals(3, count.getCount());
View Full Code Here

    service.setFilter(new AndCommitFilter(new CommitLimitFilter(1), count));
    service.find();
    assertEquals(1, count.getCount());
    count.reset();
    service.setFilter(new AndCommitFilter(new CommitLimitFilter(3), count));
    service.find();
    assertEquals(3, count.getCount());
  }
}
View Full Code Here

    CommitFinder service = new CommitFinder(testRepo);
    CommitCountFilter count = new CommitCountFilter();
    service.setFilter(new AndCommitFilter(new SignedOffByFilter(person),
        count));
    service.find();
    assertEquals(1, count.getCount());

    service.setFilter(new AndCommitFilter(new SignedOffByFilter(person)
        .clone(), count));
    service.find();
View Full Code Here

    service.find();
    assertEquals(1, count.getCount());

    service.setFilter(new AndCommitFilter(new SignedOffByFilter(person)
        .clone(), count));
    service.find();
    assertEquals(2, count.getCount());
  }

  /**
   * Test non-match
View Full Code Here

    CommitFinder service = new CommitFinder(testRepo);
    CommitCountFilter count = new CommitCountFilter();
    service.setFilter(new AndCommitFilter(new SignedOffByFilter(person),
        count));
    service.find();
    assertEquals(0, count.getCount());
  }
}
View Full Code Here

      public RevFilter clone() {
        return this;
      }
    });
    try {
      finder.find();
      fail("Exception not thrown by matcher filter");
    } catch (GitException e) {
      assertNotNull(e);
      assertEquals(exception, e.getCause());
    }
View Full Code Here

      public RevFilter clone() {
        return this;
      }
    }, count));
    finder.find();
    assertEquals(0, count.getCount());
  }

  /**
   * Test searching commit range that has none in-between start and end
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.