Package org.gitective.core

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


    assertNull(last.getLast());
    CommitLimitFilter limit = new CommitLimitFilter(2);
    AndCommitFilter filter = new AndCommitFilter(limit, last);
    CommitFinder finder = new CommitFinder(testRepo);
    finder.setFilter(filter);
    finder.find();
    assertEquals(commit2, last.getLast());
    finder.find();
    assertEquals(commit2, last.getLast());
    last.reset();
    assertNull(last.getLast());
View Full Code Here


    AndCommitFilter filter = new AndCommitFilter(limit, last);
    CommitFinder finder = new CommitFinder(testRepo);
    finder.setFilter(filter);
    finder.find();
    assertEquals(commit2, last.getLast());
    finder.find();
    assertEquals(commit2, last.getLast());
    last.reset();
    assertNull(last.getLast());
    limit.reset();
    finder.find();
View Full Code Here

    finder.find();
    assertEquals(commit2, last.getLast());
    last.reset();
    assertNull(last.getLast());
    limit.reset();
    finder.find();
    assertEquals(commit2, last.getLast());
  }

  /**
   * Test of {@link LastCommitFilter#clone()}
View Full Code Here

    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());
  }

  /**
   * Unit test of {@link AuthorDateFilter}
View Full Code Here

    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());
  }

  /**
   * Unit test of {@link AuthorDateFilter#clone()}
View Full Code Here

    CommitCountFilter count = new CommitCountFilter();

    CommitFinder finder = new CommitFinder(testRepo);
    finder.setFilter(new AndCommitFilter().add(new CommitterDateFilter(
        second.getCommitterIdent().getWhen()), count));
    finder.find();
    assertEquals(1, count.getCount());
  }

  /**
   * Unit test of {@link CommitterDateFilter}
View Full Code Here

    CommitCountFilter count = new CommitCountFilter();

    CommitFinder finder = new CommitFinder(testRepo);
    finder.setFilter(new AndCommitFilter().add(new CommitterDateFilter(
        first.getCommitterIdent().getWhen().getTime() + 1), count));
    finder.find();
    assertEquals(0, count.getCount());
  }

  /**
   * Unit test of {@link CommitterDateFilter#clone()}
View Full Code Here

    RevCommit commit = add("file.txt", "content");

    CommitListFilter filter = new CommitListFilter();
    CommitFinder service = new CommitFinder(testRepo);
    service.setFilter(filter);
    service.find();

    assertFalse(filter.getCommits().isEmpty());
    assertEquals(1, filter.getCommits().size());
    assertEquals(commit, filter.getCommits().get(0));
View Full Code Here

    filter.reset();

    assertTrue(filter.getCommits().isEmpty());

    service.find();

    assertFalse(filter.getCommits().isEmpty());
    assertEquals(1, filter.getCommits().size());
    assertEquals(commit, filter.getCommits().get(0));
  }
View Full Code Here

        "fixes a bug\nChange-Id: I12345abcde12345abcde12345abcde12345abcde");

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

    service.setFilter(new AndCommitFilter(new ChangeIdFilter().clone(),
        count));
    service.find();
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.