use of org.kie.workbench.common.stunner.bpmn.definition.property.event.timer.TimerSettingsValue in project kie-wb-common by kiegroup.
the class TimerSettingsTypeSerializerTest method testParse.
@Test
public void testParse() {
TimerSettingsValue result = serializer.parse(timerSettingsSerialized);
assertEquals(TIME_DATE, result.getTimeDate());
assertEquals(TIME_DURATION, result.getTimeDuration());
assertEquals(TIME_CYCLE, result.getTimeCycle());
assertEquals(TIME_CYCLE_LANGUAGE, result.getTimeCycleLanguage());
}
use of org.kie.workbench.common.stunner.bpmn.definition.property.event.timer.TimerSettingsValue in project kie-wb-common by kiegroup.
the class TimerSettingsFieldEditorPresenterTest method testSetTimeDateTimerValue.
@Test
public void testSetTimeDateTimerValue() {
TimerSettingsValue value = new TimerSettingsValue();
value.setTimeDate(VALUE_1);
editor.setValue(value);
verifyHideParams(3);
verify(view, times(1)).clear();
verifyDurationTimerDisplayMode(2, true);
verifyTimeDateTimerDisplayMode(1, true);
verify(view, times(1)).setTimeDate(VALUE_1);
}
use of org.kie.workbench.common.stunner.bpmn.definition.property.event.timer.TimerSettingsValue in project kie-wb-common by kiegroup.
the class TimerSettingsFieldEditorPresenterTest method testOnTimerDurationChange.
@Test
public void testOnTimerDurationChange() {
TimerSettingsValue value = new TimerSettingsValue();
editor.setValue(value);
when(view.getTimeDuration()).thenReturn(VALUE_1);
editor.onTimerDurationChange();
verify(changeHandler, times(1)).onValueChange(oldValueCaptor.capture(), newValueCaptor.capture());
assertEquals(value, oldValueCaptor.getValue());
value.setTimeDuration(VALUE_1);
assertEquals(value, newValueCaptor.getValue());
}
use of org.kie.workbench.common.stunner.bpmn.definition.property.event.timer.TimerSettingsValue in project kie-wb-common by kiegroup.
the class TimerSettingsFieldEditorPresenterTest method testSetDurationTimerValue.
@Test
public void testSetDurationTimerValue() {
TimerSettingsValue value = new TimerSettingsValue();
value.setTimeDuration(VALUE_1);
editor.setValue(value);
verify(view, times(1)).clear();
verifyHideParams(3);
verifyDurationTimerDisplayMode(3, true);
verify(view, times(1)).setTimeDuration(VALUE_1);
}
use of org.kie.workbench.common.stunner.bpmn.definition.property.event.timer.TimerSettingsValue in project kie-wb-common by kiegroup.
the class TimerSettingsFieldEditorPresenterTest method testOnTimeCycleChange.
@Test
public void testOnTimeCycleChange() {
TimerSettingsValue value = new TimerSettingsValue();
editor.setValue(value);
when(view.getTimeCycle()).thenReturn(VALUE_1);
when(view.getTimeCycleLanguage()).thenReturn(VALUE_2);
editor.onTimeCycleChange();
verifyMultipleTimerChange(value);
}
Aggregations