Package net.jsunit

Examples of net.jsunit.MockBrowserTestRunner


public class BrowserTestRunnerInterceptorTest extends TestCase {

    public void testSimple() throws Exception {
        MockBrowserTestRunnerAction action = new MockBrowserTestRunnerAction();
        final BrowserTestRunner mockRunner = new MockBrowserTestRunner();
        BrowserTestRunnerInterceptor.setBrowserTestRunnerSource(new BrowserTestRunnerSource() {
            public BrowserTestRunner getRunner() {
                return mockRunner;
            }
View Full Code Here


    public void testSimple() throws Exception {
        ResultAcceptorAction action = new ResultAcceptorAction();
        DummyBrowserResult dummyResult = new DummyBrowserResult(false, 1, 2);
        dummyResult.setBrowser(new Browser("browser.exe", 4));
        action.setBrowserResult(dummyResult);
        MockBrowserTestRunner mockRunner = new MockBrowserTestRunner();
        action.setBrowserTestRunner(mockRunner);
        assertEquals(ResultAcceptorAction.SUCCESS, action.execute());
        assertSame(dummyResult, mockRunner.acceptedResult);
    }
View Full Code Here

        createAction();
    }

    private void createAction() {
        action = new TestRunnerAction();
        mockRunner = new MockBrowserTestRunner();
        action.setBrowserTestRunner(mockRunner);
    }
View Full Code Here

    private MockBrowserTestRunner mockRunner;

    public void setUp() throws Exception {
        super.setUp();
        action = new ResultDisplayerAction();
        mockRunner = new MockBrowserTestRunner();
        action.setBrowserTestRunner(mockRunner);
        action.setId("12345");
        action.setBrowserId(8);
    }
View Full Code Here

    }

    public void testInvalidBrowserId() throws Exception {
        action.setId("54321");
        action.setBrowserId(12345);
        mockRunner = new MockBrowserTestRunner() {
            public BrowserResult findResultWithId(String id, int browserId) throws InvalidBrowserIdException {
                super.findResultWithId(id, browserId);
                throw new InvalidBrowserIdException(browserId);
            }
        };
View Full Code Here

TOP

Related Classes of net.jsunit.MockBrowserTestRunner

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.