Examples of LongestAuthorEmailFilter


Examples of org.gitective.core.filter.commit.LongestAuthorEmailFilter

  /**
   * Verify state when no commits are visited
   */
  @Test
  public void noAuthorCommitsIncluded() {
    LongestAuthorEmailFilter filter = new LongestAuthorEmailFilter();
    assertEquals(-1, filter.getLength());
    assertNotNull(filter.getCommits());
    assertEquals(0, filter.getCommits().size());
  }
View Full Code Here

Examples of org.gitective.core.filter.commit.LongestAuthorEmailFilter

   *
   * @throws Exception
   */
  @Test
  public void singleLongestAuthorEmail() throws Exception {
    LongestAuthorEmailFilter filter = new LongestAuthorEmailFilter();
    author = new PersonIdent("a", "a@b.c");
    add("test.txt", "test1");
    author = new PersonIdent("a", "a@b.cd");
    add("test.txt", "test2");
    author = new PersonIdent("a", "a@b.cde");
    RevCommit longest = add("test.txt", "test3");
    author = new PersonIdent("a", "a@b.f");
    add("test.txt", "test4");
    new CommitFinder(testRepo).setFilter(filter).find();
    assertEquals(7, filter.getLength());
    assertNotNull(filter.getCommits());
    assertEquals(1, filter.getCommits().size());
    assertEquals(longest, filter.getCommits().iterator().next());
  }
View Full Code Here

Examples of org.gitective.core.filter.commit.LongestAuthorEmailFilter

   *
   * @throws Exception
   */
  @Test
  public void multipleLongestAuthorEmails() throws Exception {
    LongestAuthorEmailFilter filter = new LongestAuthorEmailFilter();
    author = new PersonIdent("a", "a@b.c");
    add("test.txt", "test1");
    author = new PersonIdent("a", "a@b.cd");
    add("test.txt", "test2");
    author = new PersonIdent("a", "a@b.cde");
    RevCommit longest1 = add("test.txt", "test3");
    author = new PersonIdent("a", "a@b.cf");
    add("test.txt", "test4");
    author = new PersonIdent("a", "a@b.cdg");
    RevCommit longest2 = add("test.txt", "test5");
    new CommitFinder(testRepo).setFilter(filter).find();
    assertEquals(7, filter.getLength());
    assertNotNull(filter.getCommits());
    assertEquals(2, filter.getCommits().size());
    assertTrue(filter.getCommits().contains(longest1));
    assertTrue(filter.getCommits().contains(longest2));
  }
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.