use of org.dashbuilder.dataset.DataSet in project kie-wb-common by kiegroup.
the class ProjectMetricsScreenTest method testAlwaysShow7Days.
@Test
public void testAlwaysShow7Days() throws Exception {
AbstractDisplayer displayer = (AbstractDisplayer) presenter.getTopAuthorSelectorDisplayer();
displayer.filterUpdate(COLUMN_AUTHOR, // "user" selected
1);
DataSet dataSet = presenter.getAllCommitsDisplayer().getDataSetHandler().getLastDataSet();
assertEquals(dataSet.getRowCount(), 2);
// Bar chart must always show 7 bars, one per day of week
dataSet = presenter.getCommitsByDayOfWeekDisplayer().getDataSetHandler().getLastDataSet();
assertEquals(dataSet.getRowCount(), 7);
}
use of org.dashbuilder.dataset.DataSet in project kie-wb-common by kiegroup.
the class ProjectMetricsScreenTest method testQuarterSelector.
@Test
public void testQuarterSelector() {
Displayer displayer = presenter.getCommitsByQuarterDisplayer();
DataSet dataSet = displayer.getDataSetHandler().getLastDataSet();
assertDataSetValues(dataSet, new String[][] { { "1", "2.00" }, { "2", "2.00" } }, 0);
}
use of org.dashbuilder.dataset.DataSet in project kie-wb-common by kiegroup.
the class ProjectMetricsScreenTest method testAllCommits.
@Test
public void testAllCommits() {
Displayer displayer = presenter.getAllCommitsDisplayer();
DataSet dataSet = displayer.getDataSetHandler().getLastDataSet();
assertDataSetValues(dataSet, new String[][] { { "user2", "06/04/19 12:00", "Commit 4" }, { "user2", "04/03/19 12:00", "Commit 3" }, { "user1", "03/02/19 12:00", "Commit 2" }, { "user1", "01/01/19 12:00", "Commit 1" } }, 0);
}
use of org.dashbuilder.dataset.DataSet in project kie-wb-common by kiegroup.
the class ProjectMetricsScreenTest method testCommitsPerAuthor.
@Test
public void testCommitsPerAuthor() {
Displayer displayer = presenter.getCommitsPerAuthorDisplayer();
DataSet dataSet = displayer.getDataSetHandler().getLastDataSet();
assertDataSetValues(dataSet, new String[][] { { "user1", "2.00", "2.00", "user1", "1.00" }, { "user2", "2.00", "2.00", "user2", "1.00" } }, 0);
}
use of org.dashbuilder.dataset.DataSet in project kie-wb-common by kiegroup.
the class ProjectMetricsScreenTest method testSelectAuthorAndWeekOfDay.
@Test
public void testSelectAuthorAndWeekOfDay() throws Exception {
AbstractDisplayer displayer = (AbstractDisplayer) presenter.getTopAuthorSelectorDisplayer();
displayer.filterUpdate(COLUMN_AUTHOR, // "user" selected
1);
DataSet dataSet = presenter.getAllCommitsDisplayer().getDataSetHandler().getLastDataSet();
assertEquals(dataSet.getRowCount(), 2);
displayer = (AbstractDisplayer) presenter.getCommitsByDayOfWeekDisplayer();
displayer.filterUpdate(COLUMN_DATE, // "Tuesday" selected
2);
dataSet = presenter.getAllCommitsDisplayer().getDataSetHandler().getLastDataSet();
assertEquals(dataSet.getRowCount(), 1);
}
Aggregations