@Test public void testSetupMinMaxHandlersOnFocusOutWhenNewValueIsValid() { final String newValue = "2"; final String oldValue = "42"; input.value = newValue; input.max = "100"; input.min = "-100"; setupMinMaxHandlers(input); when(input.getAttribute(OLD_ATTR)).thenReturn(oldValue); final Object result = input.onfocusout.onInvoke(event); final String actualValue = input.value; assertEquals(result, true); assertEquals(actualValue, newValue); }
public static void setupMinMaxHandlers(final HTMLInputElement input) { input.onfocusout = (e) -> onFocusOut(input); input.onkeydown = (e) -> onKeyDown(input); input.onkeyup = (e) -> onKeyUp(input); }
MinMaxValueHelper { public static void setupMinMaxHandlers(final HTMLInputElement input) { input.onfocusout = (e) -> onFocusOut(input); input.onkeydown = (e) -> onKeyDown(input); input.onkeyup = (e) -> onKeyUp(input); } }
MinMaxValueHelper { public static void setupMinMaxHandlers(final HTMLInputElement input) { input.onfocusout = (e) -> onFocusOut(input); input.onkeydown = (e) -> onKeyDown(input); input.onkeyup = (e) -> onKeyUp(input); }  }
MinMaxValueHelper { public static void setupMinMaxHandlers(final HTMLInputElement input) { input.onfocusout = (e) -> onFocusOut(input); input.onkeydown = (e) -> onKeyDown(input); input.onkeyup = (e) -> onKeyUp(input); }  static void setupMinMaxHandlers(final HTMLInputElement input); static Integer toInteger(final String value,
                                    final Integer defaultValue); }
MinMaxValueHelper { public static void setupMinMaxHandlers(final HTMLInputElement input) { input.onfocusout = (e) -> onFocusOut(input); input.onkeydown = (e) -> onKeyDown(input); input.onkeyup = (e) -> onKeyUp(input); }  static void setupMinMaxHandlers(final HTMLInputElement input); static Integer toInteger(final String value,
                                    final Integer defaultValue);  }