Package org.gitective.core.stat

Examples of org.gitective.core.stat.FileHistogram


   */
  @Test
  public void resetFileFilter() throws Exception {
    add("test.txt", "content");
    FileHistogramFilter filter = new FileHistogramFilter();
    FileHistogram histogram = filter.getHistogram();
    assertNotNull(histogram);
    new CommitFinder(testRepo).setFilter(filter).find();
    assertSame(histogram, filter.getHistogram());
    filter.reset();
    assertNotNull(filter.getHistogram());
View Full Code Here


    add("file.txt", "abcd");
    FileHistogramFilter filter = new FileHistogramFilter();
    CommitFinder finder = new CommitFinder(testRepo);
    finder.setFilter(filter).find();

    FileHistogram histogram = filter.getHistogram();
    assertNotNull(histogram);
    assertNull(histogram.getActivity(null));
    FileCommitActivity activity = histogram.getActivity("file.txt");
    assertNotNull(activity);
    assertEquals(1, activity.getRevisions());
    assertEquals(1, activity.getAdds());
    assertEquals(0, activity.getCopies());
    assertEquals(0, activity.getEdits());
    assertEquals(0, activity.getDeletes());
    assertEquals(0, activity.getRenames());
    assertEquals("file.txt", activity.getPath());
    assertNotNull(activity.getPreviousPaths());
    assertTrue(activity.getPreviousPaths().isEmpty());
    assertNotNull(histogram.getFileActivity());
    assertEquals(1, histogram.getFileActivity().length);
    assertEquals(activity, histogram.getFileActivity()[0]);
  }
View Full Code Here

    FileHistogramFilter filter = new FileHistogramFilter();
    CommitFinder finder = new CommitFinder(testRepo);
    finder.setFilter(filter).find();

    FileHistogram histogram = filter.getHistogram();
    assertNotNull(histogram);
    FileCommitActivity activity = histogram.getActivity("file.txt");
    assertNotNull(activity);
    assertEquals(3, activity.getRevisions());
    assertEquals(1, activity.getAdds());
    assertEquals(1, activity.getEdits());
    assertEquals(1, activity.getDeletes());
View Full Code Here

    add("file4.txt", "1");

    FileHistogramFilter filter = new FileHistogramFilter();
    CommitFinder finder = new CommitFinder(testRepo);
    finder.setFilter(filter).find();
    FileHistogram histogram = filter.getHistogram();
    assertNotNull(histogram);
    FileCommitActivity[] files = histogram
        .getFileActivity(new RevisionCountComparator());
    assertNotNull(files);
    assertEquals(4, files.length);
    assertEquals("file1.txt", files[0].getPath());
    assertEquals("file3.txt", files[1].getPath());
View Full Code Here

TOP

Related Classes of org.gitective.core.stat.FileHistogram

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.