use of org.kie.soup.project.datamodel.oracle.DropDownData in project drools-wb by kiegroup.
the class ConstraintValueEditorHelperTest method isEnumEquivalentFirstNull.
@Test
public void isEnumEquivalentFirstNull() throws Exception {
final DropDownData dropDownData = mock(DropDownData.class);
doReturn(new String[0]).when(dropDownData).getFixedList();
Assertions.assertThat(ConstraintValueEditorHelper.isEnumEquivalent(null, dropDownData)).isFalse();
}
use of org.kie.soup.project.datamodel.oracle.DropDownData in project drools-wb by kiegroup.
the class ConstraintValueEditorHelperTest method isEnumEquivalentBothNull.
@Test
public void isEnumEquivalentBothNull() throws Exception {
final DropDownData dropDownData = mock(DropDownData.class);
doReturn(null).when(dropDownData).getFixedList();
Assertions.assertThat(ConstraintValueEditorHelper.isEnumEquivalent(null, dropDownData)).isTrue();
}
use of org.kie.soup.project.datamodel.oracle.DropDownData in project drools-wb by kiegroup.
the class CallMethodWidget method valueEditor.
private Widget valueEditor(final CallFieldValue val) {
String type = "";
if (oracle.isGlobalVariable(this.mCall.getVariable())) {
type = oracle.getGlobalVariable(this.mCall.getVariable());
} else {
Map<String, String> mFactTypes = scenario.getVariableTypes();
type = mFactTypes.get(this.mCall.getVariable());
}
DropDownData enums = oracle.getEnums(type, val.field, this.mCall.getCallFieldValuesMap());
return new MethodParameterCallValueEditor(val, enums, executionTrace, scenario, val.type, oracle);
}
Aggregations