/** * Causes this thread to call the named method, and asserts that the call returns the expected int * value. */ public void callAndAssertReturns(int expected, String methodName, Object... arguments) throws Exception { checkNotNull(methodName); checkNotNull(arguments); sendRequest(methodName, arguments); assertEquals(expected, getResponse(methodName).getResult()); }
/** * Causes this thread to call the named method, and asserts that the call throws the expected type * of throwable. */ public void callAndAssertThrows( Class<? extends Throwable> expected, String methodName, Object... arguments) throws Exception { checkNotNull(expected); checkNotNull(methodName); checkNotNull(arguments); sendRequest(methodName, arguments); assertEquals(expected, getResponse(methodName).getThrowable().getClass()); }
/** * Causes this thread to call the named method, and asserts that the call returns the expected * boolean value. */ public void callAndAssertReturns(boolean expected, String methodName, Object... arguments) throws Exception { checkNotNull(methodName); checkNotNull(arguments); sendRequest(methodName, arguments); assertEquals(expected, getResponse(methodName).getResult()); }
/** * Asserts that a prior call that had caused this thread to block or wait has since returned * normally. */ public void assertPriorCallReturns(@Nullable String methodName) throws Exception { assertEquals(null, getResponse(methodName).getResult()); }
/** * Asserts that a prior call that had caused this thread to block or wait has since returned the * expected boolean value. */ public void assertPriorCallReturns(boolean expected, @Nullable String methodName) throws Exception { assertEquals(expected, getResponse(methodName).getResult()); }
/** * Causes this thread to call the named void method, and asserts that the call returns normally. */ public void callAndAssertReturns(String methodName, Object... arguments) throws Exception { checkNotNull(methodName); checkNotNull(arguments); sendRequest(methodName, arguments); assertSame(null, getResponse(methodName).getResult()); }
/** * Asserts that a prior call that had caused this thread to block or wait has since returned * normally. */ public void assertPriorCallReturns(@Nullable String methodName) throws Exception { assertEquals(null, getResponse(methodName).getResult()); }
/** * Asserts that a prior call that had caused this thread to block or wait has since returned * the expected boolean value. */ public void assertPriorCallReturns(boolean expected, @Nullable String methodName) throws Exception { assertEquals(expected, getResponse(methodName).getResult()); }
/** * Causes this thread to call the named method, and asserts that the call throws the expected * type of throwable. */ public void callAndAssertThrows(Class<? extends Throwable> expected, String methodName, Object... arguments) throws Exception { checkNotNull(expected); checkNotNull(methodName); checkNotNull(arguments); sendRequest(methodName, arguments); assertEquals(expected, getResponse(methodName).getThrowable().getClass()); }
/** * Causes this thread to call the named method, and asserts that the call returns the expected * boolean value. */ public void callAndAssertReturns(boolean expected, String methodName, Object... arguments) throws Exception { checkNotNull(methodName); checkNotNull(arguments); sendRequest(methodName, arguments); assertEquals(expected, getResponse(methodName).getResult()); }
/** * Causes this thread to call the named method, and asserts that the call returns the expected * int value. */ public void callAndAssertReturns(int expected, String methodName, Object... arguments) throws Exception { checkNotNull(methodName); checkNotNull(arguments); sendRequest(methodName, arguments); assertEquals(expected, getResponse(methodName).getResult()); }
/** * Causes this thread to call the named void method, and asserts that the call returns normally. */ public void callAndAssertReturns(String methodName, Object... arguments) throws Exception { checkNotNull(methodName); checkNotNull(arguments); sendRequest(methodName, arguments); assertSame(null, getResponse(methodName).getResult()); }