Package org.gitective.core.filter.commit

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


    note(note);

    final AtomicReference<String> found = new AtomicReference<String>();

    CommitFinder finder = new CommitFinder(testRepo);
    finder.setFilter(new NoteContentFilter() {

      protected boolean include(RevCommit commit, Note note,
          String content) {
        found.set(content);
        return super.include(commit, note, content);
View Full Code Here


    add("test.txt", "abc");
    note("this is a note");

    CommitCountFilter count = new CommitCountFilter();
    CommitFinder finder = new CommitFinder(testRepo);
    finder.setFilter(new AndCommitFilter(new NoteContentFilter() {

      protected boolean include(RevCommit commit, Note note,
          String content) {
        return false;
      }
View Full Code Here

   */
  @Test
  public void setNoRepository() {
    NoteFilter noteFilter = new NoteFilter();
    assertSame(noteFilter, noteFilter.setRepository(null));
    NoteContentFilter noteContentFilter = new NoteContentFilter();
    assertSame(noteContentFilter, noteContentFilter.setRepository(null));
  }
View Full Code Here

   *
   * @throws Exception
   */
  @Test
  public void setRepositoryThrowsIOException() throws Exception {
    NoteContentFilter filter = new NoteContentFilter();
    final IOException exception = new IOException("message");
    Repository repo = new BadRepository(testRepo, exception);
    try {
      filter.setRepository(repo);
      fail("Exception not thrown when reading bad refs");
    } catch (GitException e) {
      assertNotNull(e);
      assertEquals(exception, e.getCause());
    }
View Full Code Here

   *
   * @throws Exception
   */
  @Test
  public void cloneContentFilter() throws Exception {
    NoteContentFilter filter = new NoteContentFilter();
    RevFilter clone = filter.clone();
    assertNotNull(clone);
    assertNotSame(filter, clone);
    assertTrue(clone instanceof NoteContentFilter);
  }
View Full Code Here

    note(note2, "commit2");

    final List<String> notes = new ArrayList<String>();

    CommitFinder finder = new CommitFinder(testRepo);
    finder.setFilter(new NoteContentFilter() {

      protected boolean include(RevCommit commit, Note note,
          String content) {
        notes.add(content);
        return super.include(commit, note, content);
View Full Code Here

TOP

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

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.