Package org.gitective.core.filter.commit

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


   * @throws Exception
   */
  @Test
  public void matc() throws Exception {
    add("file.txt", "content", "matchmiddlehere");
    CommitMessageFindFilter find = new CommitMessageFindFilter("middle");
    CommitCountFilter count = new CommitCountFilter();
    CommitFinder service = new CommitFinder(testRepo);
    service.setFilter(new AndCommitFilter(find, count)).find();
    assertEquals(1, count.getCount());
  }
View Full Code Here


   * @throws Exception
   */
  @Test
  public void nonMatch() throws Exception {
    add("file.txt", "content", "matchmiddlehere");
    CommitMessageFindFilter find = new CommitMessageFindFilter("nomatch");
    CommitCountFilter count = new CommitCountFilter();
    CommitFinder service = new CommitFinder(testRepo);
    service.setFilter(new AndCommitFilter(find, count)).find();
    assertEquals(0, count.getCount());
  }
View Full Code Here

   *
   * @throws Exception
   */
  @Test
  public void cloneFilter() throws Exception {
    CommitMessageFindFilter find = new CommitMessageFindFilter("content");
    RevFilter clone = find.clone();
    assertNotNull(clone);
    assertNotSame(find, clone);
    assertTrue(clone instanceof CommitMessageFindFilter);
  }
View Full Code Here

  /**
   * Test constructor with null pattern
   */
  @Test(expected = IllegalArgumentException.class)
  public void constructorNullPattern() {
    new CommitMessageFindFilter(null);
  }
View Full Code Here

  /**
   * Test constructor with empty pattern
   */
  @Test(expected = IllegalArgumentException.class)
  public void constructorEmptyPattern() {
    new CommitMessageFindFilter("");
  }
View Full Code Here

TOP

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

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.