@Test public void testSetValue() { final String dmnString = "duration(\"P2Y1M\")"; final YearsMonthsValue value = mock(YearsMonthsValue.class); when(value.getYears()).thenReturn("2"); when(value.getMonths()).thenReturn("1"); when(converter.fromDMNString(dmnString)).thenReturn(value); selector.setValue(dmnString); verify(view).setValue(value); }
@Override public void setValue(final String value) { final YearsMonthsValue yearsMonths = converter.fromDMNString(value); view.setValue(yearsMonths); }
YearsMonthsSelector implements TypedValueSelector { @Override public void setValue(final String value) { final YearsMonthsValue yearsMonths = converter.fromDMNString(value); view.setValue(yearsMonths); } }
YearsMonthsSelector implements TypedValueSelector { @Override public void setValue(final String value) { final YearsMonthsValue yearsMonths = converter.fromDMNString(value); view.setValue(yearsMonths); } @Inject  YearsMonthsSelector(final YearsMonthsSelector.View view,
                               final YearsMonthsValueConverter converter); }
YearsMonthsSelector implements TypedValueSelector { @Override public void setValue(final String value) { final YearsMonthsValue yearsMonths = converter.fromDMNString(value); view.setValue(yearsMonths); } @Inject  YearsMonthsSelector(final YearsMonthsSelector.View view,
                               final YearsMonthsValueConverter 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> blurEvent); @Override void select(); @Override String toDisplay(final String rawValue); }
YearsMonthsSelector implements TypedValueSelector { @Override public void setValue(final String value) { final YearsMonthsValue yearsMonths = converter.fromDMNString(value); view.setValue(yearsMonths); } @Inject  YearsMonthsSelector(final YearsMonthsSelector.View view,
                               final YearsMonthsValueConverter 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> blurEvent); @Override void select(); @Override String toDisplay(final String rawValue);  }