| | |
| | | import static org.junit.Assert.assertTrue;
|
| | |
|
| | | import java.util.List;
|
| | | import java.util.TimeZone;
|
| | |
|
| | | import org.eclipse.jgit.lib.Repository;
|
| | | import org.junit.Test;
|
| | |
| | | @Test
|
| | | public void testMetrics() throws Exception {
|
| | | testMetrics(GitBlitSuite.getHelloworldRepository());
|
| | | testMetrics(GitBlitSuite.getBluezGnomeRepository());
|
| | | testMetrics(GitBlitSuite.getJGitRepository());
|
| | | }
|
| | |
|
| | | private void testMetrics(Repository repository) throws Exception {
|
| | | List<Metric> metrics = MetricUtils.getDateMetrics(repository, null, true, null);
|
| | | List<Metric> metrics = MetricUtils.getDateMetrics(repository, null, true, null,
|
| | | TimeZone.getDefault());
|
| | | repository.close();
|
| | | assertTrue("No date metrics found!", metrics.size() > 0);
|
| | | }
|