@Test public void testSetOnInputChangeCallbackWithChangeEvent() { final Event event = mock(Event.class); selectorView.setOnInputChangeCallback(eventConsumer); input.onchange.onInvoke(event); verify(eventConsumer).accept(event); }
@Override public void setOnInputChangeCallback(final Consumer<Event> onValueChangeConsumer) { input.onkeyup = event -> consume(event, onValueChangeConsumer); input.onchange = event -> consume(event, onValueChangeConsumer); }
BaseSelectorView implements BaseSelector.View { @Override public void setOnInputChangeCallback(final Consumer<Event> onValueChangeConsumer) { input.onkeyup = event -> consume(event, onValueChangeConsumer); input.onchange = event -> consume(event, onValueChangeConsumer); } }
BaseSelectorView implements BaseSelector.View { @Override public void setOnInputChangeCallback(final Consumer<Event> onValueChangeConsumer) { input.onkeyup = event -> consume(event, onValueChangeConsumer); input.onchange = event -> consume(event, onValueChangeConsumer); } @Inject  BaseSelectorView(final HTMLInputElement input); }
BaseSelectorView implements BaseSelector.View { @Override public void setOnInputChangeCallback(final Consumer<Event> onValueChangeConsumer) { input.onkeyup = event -> consume(event, onValueChangeConsumer); input.onchange = event -> consume(event, onValueChangeConsumer); } @Inject  BaseSelectorView(final HTMLInputElement input); @Override void init(final BaseSelector presenter); @Override String getValue(); @Override void setValue(final String value); @Override void setPlaceholder(final String placeholder); @Override void setOnInputChangeCallback(final Consumer<Event> onValueChangeConsumer); @Override void select(); @Override void setOnInputBlurCallback(final Consumer<BlurEvent> onValueInputBlur); @Override void setInputType(final String type); }
BaseSelectorView implements BaseSelector.View { @Override public void setOnInputChangeCallback(final Consumer<Event> onValueChangeConsumer) { input.onkeyup = event -> consume(event, onValueChangeConsumer); input.onchange = event -> consume(event, onValueChangeConsumer); } @Inject  BaseSelectorView(final HTMLInputElement input); @Override void init(final BaseSelector presenter); @Override String getValue(); @Override void setValue(final String value); @Override void setPlaceholder(final String placeholder); @Override void setOnInputChangeCallback(final Consumer<Event> onValueChangeConsumer); @Override void select(); @Override void setOnInputBlurCallback(final Consumer<BlurEvent> onValueInputBlur); @Override void setInputType(final String type);  }