Java Code Examples for

Following code examples demonstrate how to use android. These examples are extracted from various highly rated open source projects. You can directly use these code snippets or view their entire linked source code. These snippets are extracted to provide contextual information about how to use this class in the real world. These samples also let you understand some good practices on how to use various code implementation of this class.

    public void test_init_and_run_for_LongTest_with_time_limit_should_report_time_out() {
        Class<?> target = LongTest.class;
        String actionName = "actionName";

        ByteArrayOutputStream baos = new ByteArrayOutputStream();
        System.setOut(new PrintStream(baos));

        runner.init(monitor, actionName, null, target, skipPastReference, testEnvironment, 0, false);"", null, null);

        verify(monitor).outcomeStarted(runner, target.getName() + "#test",

        String outStr = baos.toString();

A test case that is used to verify behavior of timeout.