Search in sources :

Example 1 with HeaderMetaData

use of org.uberfire.ext.wires.core.grids.client.model.GridColumn.HeaderMetaData in project drools-wb by kiegroup.

the class ScenarioSimulationBuildersTest method testHeaderBuilder.

@Test
public void testHeaderBuilder() {
    ScenarioSimulationBuilders.HeaderBuilder builder = ScenarioSimulationBuilders.HeaderBuilder.get(scenarioHeaderTextBoxSingletonDOMElementFactoryMock);
    builder.setColumnTitle(COLUMN_INSTANCE_TITLE_FIRST);
    builder.setColumnGroup(COLUMN_GROUP_FIRST);
    builder.setInstanceHeader(true);
    List<HeaderMetaData> retrieved = builder.build();
    assertNotNull(retrieved);
    assertEquals(1, retrieved.size());
    ScenarioHeaderMetaData headerMetaData = (ScenarioHeaderMetaData) retrieved.get(0);
    assertNotNull(headerMetaData);
    assertEquals(COLUMN_INSTANCE_TITLE_FIRST, headerMetaData.getTitle());
    assertEquals(COLUMN_GROUP_FIRST, headerMetaData.getColumnGroup());
    assertTrue(headerMetaData.getMetadataType().equals(ScenarioHeaderMetaData.MetadataType.INSTANCE));
    assertFalse(headerMetaData.isReadOnly());
}
Also used : ScenarioHeaderMetaData(org.drools.workbench.screens.scenariosimulation.client.metadata.ScenarioHeaderMetaData) HeaderMetaData(org.uberfire.ext.wires.core.grids.client.model.GridColumn.HeaderMetaData) ScenarioHeaderMetaData(org.drools.workbench.screens.scenariosimulation.client.metadata.ScenarioHeaderMetaData) Test(org.junit.Test)

Aggregations

ScenarioHeaderMetaData (org.drools.workbench.screens.scenariosimulation.client.metadata.ScenarioHeaderMetaData)1 Test (org.junit.Test)1 HeaderMetaData (org.uberfire.ext.wires.core.grids.client.model.GridColumn.HeaderMetaData)1