Package org.gitective.core.filter.commit

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


    author = new PersonIdent("Test Author", "author@test.com");
    RevCommit second = add("file.txt", "b");
    CommitCountFilter count = new CommitCountFilter();

    CommitFinder finder = new CommitFinder(testRepo);
    finder.setFilter(new AndCommitFilter().add(new AuthorDateFilter(second
        .getAuthorIdent().getWhen()), count));
    finder.find();
    assertEquals(1, count.getCount());
  }
View Full Code Here


  public void authorNonMatch() throws Exception {
    RevCommit first = add("file.txt", "a");
    CommitCountFilter count = new CommitCountFilter();

    CommitFinder finder = new CommitFinder(testRepo);
    finder.setFilter(new AndCommitFilter().add(new AuthorDateFilter(first
        .getAuthorIdent().getWhen().getTime() + 1), count));
    finder.find();
    assertEquals(0, count.getCount());
  }
View Full Code Here

   *
   * @throws Exception
   */
  @Test
  public void authorClone() throws Exception {
    AuthorDateFilter date = new AuthorDateFilter(2);
    RevFilter clone = date.clone();
    assertNotNull(clone);
    assertNotSame(date, clone);
    assertTrue(clone instanceof AuthorDateFilter);
  }
View Full Code Here

  /**
   * Create author date filter with null date
   */
  @Test(expected = IllegalArgumentException.class)
  public void constructorWithNullDate() {
    new AuthorDateFilter(null);
  }
View Full Code Here

TOP

Related Classes of org.gitective.core.filter.commit.AuthorDateFilter

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.