Package net.jsunit

Examples of net.jsunit.DummyHttpRequest


        requestMap.put(BrowserResultWriter.USER_AGENT, new String[]{"user agent"});
        requestMap.put(BrowserResultWriter.TIME, new String[]{"4.3"});
        requestMap.put(BrowserResultWriter.JSUNIT_VERSION, new String[]{"2.5"});
        requestMap.put(BrowserResultWriter.TEST_CASE_RESULTS, new String[]{"file:///dummy/path/dummyPage.html:testFoo|1.3|S||"});
        requestMap.put("browserId", new String[]{String.valueOf(browser.getId())});
        HttpServletRequest request = new DummyHttpRequest(requestMap);
        ServletActionContext.setRequest(request);
    }
View Full Code Here


        assertEquals(action.getAllBrowsers(), action.selectedBrowsers);
    }

    private void setUpRequestWithBrowserIds(String... browserIds) {
        Map<String, String[]> requestMap = new HashMap<String, String[]>();
        HttpServletRequest request = new DummyHttpRequest(requestMap);
        String[] values = new String[browserIds.length];
        System.arraycopy(browserIds, 0, values, 0, browserIds.length);
        requestMap.put("browserId", values);
        ServletActionContext.setRequest(request);
    }
View Full Code Here

import java.util.HashMap;

public class RequestSourceInterceptorTest extends TestCase {

    public void testSimple() throws Exception {
        DummyHttpRequest request = new DummyHttpRequest(new HashMap());
        request.setIpAddress("123.456.78.9");
        request.setHost("www.example.com");
        ServletActionContext.setRequest(request);
        RequestSourceInterceptor interceptor = new RequestSourceInterceptor();
        RequestSourceAction action = new RequestSourceAction();
        MockActionInvocation invocation = new MockActionInvocation(action);
        interceptor.intercept(invocation);
View Full Code Here

TOP

Related Classes of net.jsunit.DummyHttpRequest

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.