Searched refs:mockRunnable (Results 1 – 2 of 2) sorted by relevance
162 IRunUtil.IRunnableResult mockRunnable = mock(IRunUtil.IRunnableResult.class); in testRunTimed() local163 when(mockRunnable.getCommand()).thenReturn(new ArrayList<>()); in testRunTimed()164 when(mockRunnable.run()).thenReturn(Boolean.TRUE); in testRunTimed()167 CommandStatus.SUCCESS, mRunUtil.runTimed(SHORT_TIMEOUT_MS, mockRunnable, true)); in testRunTimed()173 IRunUtil.IRunnableResult mockRunnable = mock(IRunUtil.IRunnableResult.class); in testRunTimed_failed() local174 when(mockRunnable.getCommand()).thenReturn(new ArrayList<>()); in testRunTimed_failed()175 when(mockRunnable.run()).thenReturn(Boolean.FALSE); in testRunTimed_failed()177 assertEquals(CommandStatus.FAILED, mRunUtil.runTimed(SHORT_TIMEOUT_MS, mockRunnable, true)); in testRunTimed_failed()183 IRunUtil.IRunnableResult mockRunnable = mock(IRunUtil.IRunnableResult.class); in testRunTimed_exception() local184 when(mockRunnable.getCommand()).thenReturn(new ArrayList<>()); in testRunTimed_exception()[all …]
55 MyRunnable mockRunnable = new MyRunnable() { in testRunTimed_timeout() local67 mockRunnable, true)); in testRunTimed_timeout()68 assertTrue(mockRunnable.mCanceled); in testRunTimed_timeout()78 IRunUtil.IRunnableResult mockRunnable = new IRunUtil.IRunnableResult() { in testRunTimedRetry() local92 mockRunnable)); in testRunTimedRetry()