use of org.kie.workbench.common.dmn.api.definition.v1_1.DecisionTableOrientation in project kie-wb-common by kiegroup.
the class DecisionTableGridTest method testSetDecisionTableOrientation.
@Test
public void testSetDecisionTableOrientation() {
final DecisionTableOrientation orientation = DecisionTableOrientation.RULE_AS_ROW;
setupGrid(makeHasNameForDecision(), 0);
grid.setDecisionTableOrientation(orientation);
verify(sessionCommandManager).execute(eq(canvasHandler), setOrientationCommandCaptor.capture());
final SetOrientationCommand setOrientationCommand = setOrientationCommandCaptor.getValue();
setOrientationCommand.execute(canvasHandler);
verify(gridLayer).batch();
}
use of org.kie.workbench.common.dmn.api.definition.v1_1.DecisionTableOrientation in project kie-wb-common by kiegroup.
the class HitPolicyEditorImplTest method testSetOrientationNonNullControl.
@Test
public void testSetOrientationNonNullControl() {
final DecisionTableOrientation orientation = DecisionTableOrientation.RULE_AS_ROW;
when(control.getDecisionTableOrientation()).thenReturn(orientation);
editor.bind(control, UI_ROW_INDEX, UI_COLUMN_INDEX);
reset(view);
editor.setDecisionTableOrientation(orientation);
verify(control).setDecisionTableOrientation(eq(orientation));
}
use of org.kie.workbench.common.dmn.api.definition.v1_1.DecisionTableOrientation in project kie-wb-common by kiegroup.
the class SetOrientationCommandTest method makeCommand.
private void makeCommand(final DecisionTableOrientation orientation) {
this.dtable = new DecisionTable();
this.dtable.setPreferredOrientation(orientation);
this.command = new SetOrientationCommand(dtable, NEW_ORIENTATION, canvasOperation);
}
use of org.kie.workbench.common.dmn.api.definition.v1_1.DecisionTableOrientation in project kie-wb-common by kiegroup.
the class HitPolicyEditorViewImpl method setupDecisionTableOrientationEventHandler.
private void setupDecisionTableOrientationEventHandler() {
setupChangeEventHandler(lstDecisionTableOrientation, () -> {
final DecisionTableOrientation orientation = DecisionTableOrientation.fromValue(lstDecisionTableOrientation.getValue());
presenter.setDecisionTableOrientation(orientation);
});
}
use of org.kie.workbench.common.dmn.api.definition.v1_1.DecisionTableOrientation in project kie-wb-common by kiegroup.
the class HitPolicyEditorImplTest method testBindNonNullControlOrientation.
@Test
public void testBindNonNullControlOrientation() {
final DecisionTableOrientation orientation = DecisionTableOrientation.RULE_AS_ROW;
reset(view);
when(control.getDecisionTableOrientation()).thenReturn(orientation);
editor.bind(control, UI_ROW_INDEX, UI_COLUMN_INDEX);
verify(view).enableHitPolicies(eq(false));
verify(view).enableBuiltinAggregators(eq(false));
verify(view).enableDecisionTableOrientation(eq(true));
verify(view).initSelectedDecisionTableOrientation(eq(orientation));
}
Aggregations