@Test public void testGetValueWhenValueIsEmpty() { final DayTimeValue value = mock(DayTimeValue.class); final String expected = ""; when(view.getValue()).thenReturn(value); when(value.isEmpty()).thenReturn(true); final String actual = dayTimeSelector.getValue(); assertEquals(expected, actual); }
@Override public String getValue() { final DayTimeValue value = view.getValue(); return value.isEmpty() ? "" : converter.toDMNString(value); }
DayTimeSelector implements TypedValueSelector { @Override public String getValue() { final DayTimeValue value = view.getValue(); return value.isEmpty() ? "" : converter.toDMNString(value); } }
DayTimeSelector implements TypedValueSelector { @Override public String getValue() { final DayTimeValue value = view.getValue(); return value.isEmpty() ? "" : converter.toDMNString(value); } @Inject  DayTimeSelector(final DayTimeSelector.View view,
                           final DayTimeValueConverter converter); }
DayTimeSelector implements TypedValueSelector { @Override public String getValue() { final DayTimeValue value = view.getValue(); return value.isEmpty() ? "" : converter.toDMNString(value); } @Inject  DayTimeSelector(final DayTimeSelector.View view,
                           final DayTimeValueConverter converter); @Override String getValue(); @Override void setValue(final String value); @Override void setPlaceholder(final String placeholder); @Override Element getElement(); @Override void setOnInputChangeCallback(final Consumer<Event> onValueChanged); @Override void setOnInputBlurCallback(final Consumer<BlurEvent> onValueInputBlur); @Override void select(); @Override String toDisplay(final String rawValue); }
DayTimeSelector implements TypedValueSelector { @Override public String getValue() { final DayTimeValue value = view.getValue(); return value.isEmpty() ? "" : converter.toDMNString(value); } @Inject  DayTimeSelector(final DayTimeSelector.View view,
                           final DayTimeValueConverter converter); @Override String getValue(); @Override void setValue(final String value); @Override void setPlaceholder(final String placeholder); @Override Element getElement(); @Override void setOnInputChangeCallback(final Consumer<Event> onValueChanged); @Override void setOnInputBlurCallback(final Consumer<BlurEvent> onValueInputBlur); @Override void select(); @Override String toDisplay(final String rawValue);  }