use of org.dashbuilder.displayer.DisplayerSettings in project kie-wb-common by kiegroup.
the class ProjectMetricsScreenTest method dateSelectorFormatTest.
@Test
public void dateSelectorFormatTest() {
DisplayerSettings settings = metricsFactory.buildDateSelectorSettings(project);
assertEquals(settings.getColumnSettings(COLUMN_DATE).getValuePattern(), "dd MMM, yyyy HH:mm");
}
use of org.dashbuilder.displayer.DisplayerSettings in project kie-wb-common by kiegroup.
the class ProjectMetricsFactory method lookupCommitsOverTimeDisplayer_small.
public Displayer lookupCommitsOverTimeDisplayer_small(WorkspaceProject project) {
DisplayerSettings settings = buildCommitsOverTimeSettings(project);
settings.setChartWidth(300);
settings.setChartHeight(80);
settings.setChartMarginTop(5);
settings.setChartMarginBottom(5);
settings.setTitleVisible(false);
settings.setYAxisTitle(null);
return displayerLocator.lookupDisplayer(settings);
}
use of org.dashbuilder.displayer.DisplayerSettings in project kie-wb-common by kiegroup.
the class DataManagementServiceImplTest method testGetDisplayerSettings.
@Test
public void testGetDisplayerSettings() {
expectedDataSetUUID = DATASOURCE_UUID + SEPARATOR + SCHEMA + SEPARATOR + TABLE;
DataSetLookup expectedLookup = new DataSetLookup();
expectedLookup.setDataSetUUID(expectedDataSetUUID);
DataSet expectedSet = mock(DataSet.class);
List<DataColumn> dataColumns = new ArrayList<>();
for (int i = 0; i < COLUMNS_COUNT; i++) {
DataColumn dataColumn = mock(DataColumn.class);
when(dataColumn.getId()).thenReturn(DATA_COLUMN + String.valueOf(i));
dataColumns.add(dataColumn);
}
when(expectedSet.getColumns()).thenReturn(dataColumns);
when(dataSetManager.lookupDataSet(expectedLookup)).thenReturn(expectedSet);
DisplayerSettings settings = dataManagementService.getDisplayerSettings(DATASOURCE_UUID, SCHEMA, TABLE);
verify(dataSetDefRegistry, times(1)).registerDataSetDef(dataSetDefCaptor.capture());
verifyDataSetDef(dataSetDefCaptor.getValue());
verifySettings(settings);
}
Aggregations