use of org.kie.workbench.common.dmn.client.widgets.grid.columns.ValueAndDataTypeHeaderMetaData in project kie-wb-common by kiegroup.
the class DecisionTableGridTest method testSetDisplayNameSingleInputClauseWithNullValue.
@Test
@SuppressWarnings("unchecked")
public void testSetDisplayNameSingleInputClauseWithNullValue() {
setupGrid(makeHasNameForDecision(), 0);
final Consumer<ValueAndDataTypeHeaderMetaData> test = (md) -> md.setValue(null);
assertHeaderMetaDataTest(0, 1, test, DeleteHasValueCommand.class);
compositeCommandCaptor.getValue().execute(canvasHandler);
assertThat(expression.get().getInput().get(0).getInputExpression().getText()).isEqualTo(new Text());
}
use of org.kie.workbench.common.dmn.client.widgets.grid.columns.ValueAndDataTypeHeaderMetaData in project kie-wb-common by kiegroup.
the class DecisionTableGridTest method testSetTypeRefSingleOutputClause.
@Test
@SuppressWarnings("unchecked")
public void testSetTypeRefSingleOutputClause() {
setupGrid(makeHasNameForDecision(), 0);
final QName typeRef = new QName(QName.NULL_NS_URI, BuiltInType.DATE.getName());
final Consumer<ValueAndDataTypeHeaderMetaData> test = (md) -> md.setTypeRef(typeRef);
assertHeaderMetaDataTest(0, 2, test, SetTypeRefCommand.class, SetTypeRefCommand.class);
compositeCommandCaptor.getValue().execute(canvasHandler);
assertThat(hasExpression.getVariable().getTypeRef()).isEqualTo(typeRef);
assertThat(expression.get().getOutput().get(0).getTypeRef()).isEqualTo(typeRef);
}
use of org.kie.workbench.common.dmn.client.widgets.grid.columns.ValueAndDataTypeHeaderMetaData in project kie-wb-common by kiegroup.
the class DecisionTableGridTest method testSetDisplayNameSingleInputClauseWithEmptyValue.
@Test
@SuppressWarnings("unchecked")
public void testSetDisplayNameSingleInputClauseWithEmptyValue() {
setupGrid(makeHasNameForDecision(), 0);
final Consumer<ValueAndDataTypeHeaderMetaData> test = (md) -> md.setValue(new Text());
assertHeaderMetaDataTest(0, 1, test, DeleteHasValueCommand.class);
compositeCommandCaptor.getValue().execute(canvasHandler);
assertThat(expression.get().getInput().get(0).getInputExpression().getText()).isEqualTo(new Text());
}
use of org.kie.workbench.common.dmn.client.widgets.grid.columns.ValueAndDataTypeHeaderMetaData in project kie-wb-common by kiegroup.
the class DecisionTableGridTest method testSetDisplayNameMultipleOutputClauseWithEmptyValue.
@Test
public void testSetDisplayNameMultipleOutputClauseWithEmptyValue() {
setupGrid(makeHasNameForDecision(), 0);
final Consumer<ValueAndDataTypeHeaderMetaData> test = (md) -> md.setValue(new Name());
addOutputClause(3);
assertDisplayNameMultipleOutputClause(test);
}
use of org.kie.workbench.common.dmn.client.widgets.grid.columns.ValueAndDataTypeHeaderMetaData in project kie-wb-common by kiegroup.
the class DecisionTableGridTest method testSetDisplayNameSingleInputClauseWithNonEmptyValue.
@Test
@SuppressWarnings("unchecked")
public void testSetDisplayNameSingleInputClauseWithNonEmptyValue() {
setupGrid(makeHasNameForDecision(), 0);
final Consumer<ValueAndDataTypeHeaderMetaData> test = (md) -> md.setValue(new Text(NAME_NEW));
assertHeaderMetaDataTest(0, 1, test, SetHasValueCommand.class);
compositeCommandCaptor.getValue().execute(canvasHandler);
assertThat(expression.get().getInput().get(0).getInputExpression().getText()).isEqualTo(new Text(NAME_NEW));
}
Aggregations