Search in sources :

Example 21 with DMNGridData

use of org.kie.workbench.common.dmn.client.widgets.grid.model.DMNGridData in project kie-wb-common by kiegroup.

the class BaseEditorDefinitionTest method testCacheWhenNested.

@Test
public void testCacheWhenNested() {
    final Optional<String> UUID = Optional.empty();
    final GridDataCache.CacheResult<DMNGridData> result1 = definition.getData(UUID, definition.getModelClass());
    assertCacheResult(result1, false);
    final GridDataCache.CacheResult<DMNGridData> result2 = definition.getData(UUID, definition.getModelClass());
    assertCacheResult(result2, false);
    final DMNGridData uiModel1 = result1.getGridData();
    final DMNGridData uiModel2 = result2.getGridData();
    assertThat(uiModel1).isNotSameAs(uiModel2);
}
Also used : GridDataCache(org.kie.workbench.common.dmn.client.widgets.grid.model.GridDataCache) DMNGridData(org.kie.workbench.common.dmn.client.widgets.grid.model.DMNGridData) Test(org.junit.Test)

Aggregations

DMNGridData (org.kie.workbench.common.dmn.client.widgets.grid.model.DMNGridData)21 Before (org.junit.Before)15 DecisionTable (org.kie.workbench.common.dmn.api.definition.v1_1.DecisionTable)8 DecisionTableUIModelMapper (org.kie.workbench.common.dmn.client.editors.expressions.types.dtable.DecisionTableUIModelMapper)5 GridDataCache (org.kie.workbench.common.dmn.client.widgets.grid.model.GridDataCache)5 DecisionRule (org.kie.workbench.common.dmn.api.definition.v1_1.DecisionRule)4 LiteralExpression (org.kie.workbench.common.dmn.api.definition.v1_1.LiteralExpression)4 Test (org.junit.Test)3 HasExpression (org.kie.workbench.common.dmn.api.definition.HasExpression)3 HasName (org.kie.workbench.common.dmn.api.definition.HasName)3 Context (org.kie.workbench.common.dmn.api.definition.v1_1.Context)2 InputClause (org.kie.workbench.common.dmn.api.definition.v1_1.InputClause)2 OutputClause (org.kie.workbench.common.dmn.api.definition.v1_1.OutputClause)2 Relation (org.kie.workbench.common.dmn.api.definition.v1_1.Relation)2 DMNGridRow (org.kie.workbench.common.dmn.client.widgets.grid.model.DMNGridRow)2 GridCellTuple (org.kie.workbench.common.dmn.client.widgets.grid.model.GridCellTuple)2 GraphCommandExecutionContext (org.kie.workbench.common.stunner.core.graph.command.GraphCommandExecutionContext)2 BaseGridWidget (org.uberfire.ext.wires.core.grids.client.widget.grid.impl.BaseGridWidget)2 Invocation (org.kie.workbench.common.dmn.api.definition.v1_1.Invocation)1 UnaryTests (org.kie.workbench.common.dmn.api.definition.v1_1.UnaryTests)1