@Test public void testRequestStatusInvalid() { assertThat(captureThrowable(() -> requestStatus(null))) .isInstanceOf(IllegalArgumentException.class) .hasMessage("invalid integer format"); assertThat(captureThrowable(() -> requestStatus(""))) .isInstanceOf(IllegalArgumentException.class) .hasMessage("invalid integer format"); assertThat(captureThrowable(() -> requestStatus("AAA"))) .isInstanceOf(IllegalArgumentException.class) .hasMessage("invalid integer format"); assertThat(captureThrowable(() -> requestStatus("-1"))) .isInstanceOf(IllegalArgumentException.class) .hasMessage("value must be between 0 and 9999"); assertThat(captureThrowable(() -> requestStatus("10000"))) .isInstanceOf(IllegalArgumentException.class) .hasMessage("value must be between 0 and 9999"); }
public static Automation requestStatus(String where) { checkRange(WHERE_MIN_VALUE, WHERE_MAX_VALUE, checkIsInteger(where)); return new Automation(format(FORMAT_STATUS, WHO, where)); }
Automation extends BaseOpenMessage { public static Automation requestStatus(String where) { checkRange(WHERE_MIN_VALUE, WHERE_MAX_VALUE, checkIsInteger(where)); return new Automation(format(FORMAT_STATUS, WHO, where)); } }
Automation extends BaseOpenMessage { public static Automation requestStatus(String where) { checkRange(WHERE_MIN_VALUE, WHERE_MAX_VALUE, checkIsInteger(where)); return new Automation(format(FORMAT_STATUS, WHO, where)); } private  Automation(String value); }
Automation extends BaseOpenMessage { public static Automation requestStatus(String where) { checkRange(WHERE_MIN_VALUE, WHERE_MAX_VALUE, checkIsInteger(where)); return new Automation(format(FORMAT_STATUS, WHO, where)); } private  Automation(String value); static Automation requestStop(String where); static Automation requestStop(String where, Type type, String bus); static Automation requestMoveUp(String where); static Automation requestMoveUp(String where, Type type, String bus); static Automation requestMoveDown(String where); static Automation requestMoveDown(String where, Type type, String bus); static Func1<OpenSession, OpenSession> handleResponse(Action0 onSuccess, Action0 onFail); static Automation requestStatus(String where); static Automation requestStatus(String where, Type type, String bus); static Func1<OpenSession, OpenSession> handleStatus(Action0 stopAction, Action0 upAction, Action0 downAction); static boolean isValidRangeType(String where, Type type, String bus); }
Automation extends BaseOpenMessage { public static Automation requestStatus(String where) { checkRange(WHERE_MIN_VALUE, WHERE_MAX_VALUE, checkIsInteger(where)); return new Automation(format(FORMAT_STATUS, WHO, where)); } private  Automation(String value); static Automation requestStop(String where); static Automation requestStop(String where, Type type, String bus); static Automation requestMoveUp(String where); static Automation requestMoveUp(String where, Type type, String bus); static Automation requestMoveDown(String where); static Automation requestMoveDown(String where, Type type, String bus); static Func1<OpenSession, OpenSession> handleResponse(Action0 onSuccess, Action0 onFail); static Automation requestStatus(String where); static Automation requestStatus(String where, Type type, String bus); static Func1<OpenSession, OpenSession> handleStatus(Action0 stopAction, Action0 upAction, Action0 downAction); static boolean isValidRangeType(String where, Type type, String bus);  }