Search in sources :

Example 26 with DataSet

use of org.dashbuilder.dataset.DataSet in project kie-wb-common by kiegroup.

the class ContributorsDashboardTest method testDayOfWeekSelector.

@Test
public void testDayOfWeekSelector() {
    Displayer displayer = presenter.getDayOfWeekSelectorDisplayer();
    DataSet dataSet = displayer.getDataSetHandler().getLastDataSet();
    assertDataSetValues(dataSet, new String[][] { { "1", "0.00" }, { "2", "0.00" }, { "3", "2.00" }, { "4", "1.00" }, { "5", "1.00" }, { "6", "2.00" }, { "7", "2.00" } }, 0);
}
Also used : DataSet(org.dashbuilder.dataset.DataSet) SelectorDisplayer(org.dashbuilder.renderer.client.selector.SelectorDisplayer) AbstractDisplayer(org.dashbuilder.displayer.client.AbstractDisplayer) Displayer(org.dashbuilder.displayer.client.Displayer) Test(org.junit.Test) AbstractDisplayerTest(org.dashbuilder.displayer.client.AbstractDisplayerTest)

Example 27 with DataSet

use of org.dashbuilder.dataset.DataSet in project kie-wb-common by kiegroup.

the class ContributorsDashboardTest method testSelectYear.

@Test
public void testSelectYear() throws Exception {
    // "2019" selected
    yearsSelectorDisplayer.filterUpdate(COLUMN_DATE, 0);
    DataSet dataSet = allCommitsDisplayer.getDataSetHandler().getLastDataSet();
    assertEquals(dataSet.getRowCount(), 7);
}
Also used : DataSet(org.dashbuilder.dataset.DataSet) Test(org.junit.Test) AbstractDisplayerTest(org.dashbuilder.displayer.client.AbstractDisplayerTest)

Example 28 with DataSet

use of org.dashbuilder.dataset.DataSet in project kie-wb-common by kiegroup.

the class ContributorsDashboardTest method testYearsSelector.

@Test
public void testYearsSelector() {
    Displayer displayer = presenter.getYearsSelectorDisplayer();
    DataSet dataSet = displayer.getDataSetHandler().getLastDataSet();
    assertDataSetValues(dataSet, new String[][] { { "2019", "7.00" }, { "2020", "1.00" } }, 0);
}
Also used : DataSet(org.dashbuilder.dataset.DataSet) SelectorDisplayer(org.dashbuilder.renderer.client.selector.SelectorDisplayer) AbstractDisplayer(org.dashbuilder.displayer.client.AbstractDisplayer) Displayer(org.dashbuilder.displayer.client.Displayer) Test(org.junit.Test) AbstractDisplayerTest(org.dashbuilder.displayer.client.AbstractDisplayerTest)

Example 29 with DataSet

use of org.dashbuilder.dataset.DataSet in project kie-wb-common by kiegroup.

the class ProjectMetricsScreenTest method testSelectYear.

@Test
public void testSelectYear() throws Exception {
    AbstractDisplayer displayer = (AbstractDisplayer) presenter.getCommitsByYearDisplayer();
    displayer.filterUpdate(COLUMN_DATE, // "2019" selected
    0);
    DataSet dataSet = presenter.getAllCommitsDisplayer().getDataSetHandler().getLastDataSet();
    assertEquals(dataSet.getRowCount(), 4);
}
Also used : AbstractDisplayer(org.dashbuilder.displayer.client.AbstractDisplayer) DataSet(org.dashbuilder.dataset.DataSet) RawDataSet(org.dashbuilder.dataset.RawDataSet) AbstractDisplayerTest(org.dashbuilder.displayer.client.AbstractDisplayerTest) Test(org.junit.Test)

Example 30 with DataSet

use of org.dashbuilder.dataset.DataSet in project kie-wb-common by kiegroup.

the class ProjectMetricsScreenTest method testSelectWeekOfDay.

@Test
public void testSelectWeekOfDay() throws Exception {
    AbstractDisplayer displayer = (AbstractDisplayer) presenter.getCommitsByDayOfWeekDisplayer();
    displayer.filterUpdate(COLUMN_DATE, // "Tuesday" selected
    2);
    DataSet dataSet = presenter.getAllCommitsDisplayer().getDataSetHandler().getLastDataSet();
    assertEquals(dataSet.getRowCount(), 2);
}
Also used : AbstractDisplayer(org.dashbuilder.displayer.client.AbstractDisplayer) DataSet(org.dashbuilder.dataset.DataSet) RawDataSet(org.dashbuilder.dataset.RawDataSet) AbstractDisplayerTest(org.dashbuilder.displayer.client.AbstractDisplayerTest) Test(org.junit.Test)

Aggregations

DataSet (org.dashbuilder.dataset.DataSet)41 Test (org.junit.Test)27 AbstractDisplayerTest (org.dashbuilder.displayer.client.AbstractDisplayerTest)25 AbstractDisplayer (org.dashbuilder.displayer.client.AbstractDisplayer)17 Displayer (org.dashbuilder.displayer.client.Displayer)13 ArrayList (java.util.ArrayList)12 RawDataSet (org.dashbuilder.dataset.RawDataSet)11 HashMap (java.util.HashMap)6 SelectorDisplayer (org.dashbuilder.renderer.client.selector.SelectorDisplayer)6 DataColumn (org.dashbuilder.dataset.DataColumn)3 DataSetLookup (org.dashbuilder.dataset.DataSetLookup)2 ProcessInstanceWithVarsDesc (org.jbpm.services.api.model.ProcessInstanceWithVarsDesc)2 UserTaskInstanceWithPotOwnerDesc (org.jbpm.services.api.model.UserTaskInstanceWithPotOwnerDesc)2 UserTaskInstanceWithVarsDesc (org.jbpm.services.api.model.UserTaskInstanceWithVarsDesc)2 Date (java.util.Date)1 List (java.util.List)1 DataSetBuilder (org.dashbuilder.dataset.DataSetBuilder)1 DataSetMetadata (org.dashbuilder.dataset.DataSetMetadata)1 DataColumnDef (org.dashbuilder.dataset.def.DataColumnDef)1 DataSetDef (org.dashbuilder.dataset.def.DataSetDef)1