use of org.kie.workbench.common.dmn.api.definition.model.Expression in project kie-wb-common by kiegroup.
the class DecisionTableEditorDefinitionTest method testEditor.
@Test
public void testEditor() {
final Optional<BaseExpressionGrid<? extends Expression, ? extends GridData, ? extends BaseUIModelMapper>> oEditor = definition.getEditor(parent, Optional.empty(), decision, hasName, false, 0);
assertThat(oEditor).isPresent();
final GridWidget editor = oEditor.get();
assertThat(editor).isInstanceOf(DecisionTableGrid.class);
}
use of org.kie.workbench.common.dmn.api.definition.model.Expression in project kie-wb-common by kiegroup.
the class LiteralExpressionPMMLDocumentModelEditorDefinitionTest method testEditor.
@Test
public void testEditor() {
when(hasExpression.getExpression()).thenReturn(definition.getModelClass().get());
final Optional<BaseExpressionGrid<? extends Expression, ? extends GridData, ? extends BaseUIModelMapper>> oEditor = definition.getEditor(parent, Optional.empty(), hasExpression, hasName, false, 0);
assertTrue(oEditor.isPresent());
final GridWidget editor = oEditor.get();
assertTrue(editor instanceof LiteralExpressionPMMLGrid);
}
use of org.kie.workbench.common.dmn.api.definition.model.Expression in project kie-wb-common by kiegroup.
the class InvocationEditorDefinitionTest method testEditor.
@Test
public void testEditor() {
when(hasExpression.getExpression()).thenReturn(definition.getModelClass().get());
final Optional<BaseExpressionGrid<? extends Expression, ? extends GridData, ? extends BaseUIModelMapper>> oEditor = definition.getEditor(parent, Optional.empty(), hasExpression, hasName, false, 0);
assertTrue(oEditor.isPresent());
final GridWidget editor = oEditor.get();
assertTrue(editor instanceof InvocationGrid);
}
use of org.kie.workbench.common.dmn.api.definition.model.Expression in project kie-wb-common by kiegroup.
the class FunctionEditorDefinitionTest method testEditor.
@Test
public void testEditor() {
when(hasExpression.getExpression()).thenReturn(definition.getModelClass().get());
final Optional<BaseExpressionGrid<? extends Expression, ? extends GridData, ? extends BaseUIModelMapper>> oEditor = definition.getEditor(parent, Optional.empty(), hasExpression, hasName, false, 0);
assertTrue(oEditor.isPresent());
final GridWidget editor = oEditor.get();
assertTrue(editor instanceof FunctionGrid);
}
use of org.kie.workbench.common.dmn.api.definition.model.Expression in project kie-wb-common by kiegroup.
the class LiteralExpressionEditorDefinitionTest method testEditor.
@Test
public void testEditor() {
when(hasExpression.getExpression()).thenReturn(definition.getModelClass().get());
final Optional<BaseExpressionGrid<? extends Expression, ? extends GridData, ? extends BaseUIModelMapper>> oEditor = definition.getEditor(parent, Optional.empty(), hasExpression, hasName, false, 0);
assertThat(oEditor).isPresent();
final GridWidget editor = oEditor.get();
assertThat(editor).isInstanceOf(LiteralExpressionGrid.class);
}
Aggregations