Search in sources :

Example 11 with Metric

use of com.gitblit.models.Metric in project gitblit by gitblit.

the class MetricUtilsTest method testAuthorMetrics.

@Test
public void testAuthorMetrics() throws Exception {
    Repository repository = GitBlitSuite.getHelloworldRepository();
    List<Metric> byEmail = MetricUtils.getAuthorMetrics(repository, null, true);
    List<Metric> byName = MetricUtils.getAuthorMetrics(repository, null, false);
    repository.close();
    assertEquals("No author metrics found!", 9, byEmail.size());
    assertEquals("No author metrics found!", 8, byName.size());
}
Also used : Repository(org.eclipse.jgit.lib.Repository) Metric(com.gitblit.models.Metric) Test(org.junit.Test)

Aggregations

Metric (com.gitblit.models.Metric)11 Chart (com.gitblit.wicket.charting.Chart)7 SimpleDateFormat (java.text.SimpleDateFormat)5 Charts (com.gitblit.wicket.charting.Charts)4 Flotr2Charts (com.gitblit.wicket.charting.Flotr2Charts)4 HashMap (java.util.HashMap)4 ArrayList (java.util.ArrayList)3 Date (java.util.Date)3 ParseException (java.text.ParseException)2 HeaderContributor (org.apache.wicket.behavior.HeaderContributor)2 ObjectId (org.eclipse.jgit.lib.ObjectId)2 RevCommit (org.eclipse.jgit.revwalk.RevCommit)2 RevWalk (org.eclipse.jgit.revwalk.RevWalk)2 Activity (com.gitblit.models.Activity)1 RefLogEntry (com.gitblit.models.RefLogEntry)1 RefModel (com.gitblit.models.RefModel)1 RepositoryCommit (com.gitblit.models.RepositoryCommit)1 DateFormat (java.text.DateFormat)1 Calendar (java.util.Calendar)1 Map (java.util.Map)1