Package net.sf.jdistunit.platform.action

Examples of net.sf.jdistunit.platform.action.ITestActionResult


     * @param testList The list of test threads.
     */
    private void retrievePendingResults(List<ITestThread> testList) {
        for (int pos = testList.size() - 1; pos >= 0; pos--) {
            final ITestThread thread = testList.get(pos);
            final ITestActionResult result = thread.getActionResult();
            if (null == result) {
                continue;
            }

            // If finished, add result, and remove thread.
            switch (result.getActionStatus()) {
                case FINISHED :
                case FAILED :
                case STOPPED :
                    resultList.add(result);
                    testList.remove(pos);
View Full Code Here


            OS.sleep(200);
            sleepTime += 200;
        }

        // Get the action result.
        ITestActionResult result = thread.getActionResult();
        assertNotNull(result);

        // Check for errors.
        Throwable exc = result.getActionError();
        if (null != exc) {
            exc.printStackTrace();
        }

        // Check if the thread finished successfully.
        assertFalse(thread.isActionStopped());
        assertEquals(TestActionStatus.FINISHED, result.getActionStatus());

        // Check that the page was read.
        assertTrue(action.page.length() > 0);
        assertTrue(-1 != action.page.indexOf("JDistUnit"));
        assertTrue(-1 != action.page.indexOf("wikipedia"));
View Full Code Here

        OS.sleep(1000);
        thread.stopAction();
        assertTrue(thread.isActionStopped());

        // Get the action result.
        ITestActionResult result = thread.getActionResult();
        assertNotNull(result);

        // Check for errors.
        Throwable exc = result.getActionError();
        if (null != exc) {
            exc.printStackTrace();
        }

        // Check that the first 10 lines of the page were read.
View Full Code Here

TOP

Related Classes of net.sf.jdistunit.platform.action.ITestActionResult

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.