Package net.sf.sahi.command

Examples of net.sf.sahi.command.MockResponder


            sendResponseToBrowser(responseFromHost);
        }
    }

    private boolean handleDifferently(final HttpRequest request) throws Exception {
        final MockResponder mockResponder = request.session().mockResponder();
        HttpResponse response = mockResponder.getResponse(request);
        if (response == null) {
            return false;
        }
        sendResponseToBrowser(response);
        return true;
View Full Code Here


*/
public class CustomResponseManagerTest extends TestCase {
  private static final long serialVersionUID = -8104865035753409420L;

  public void testGetCommand() {
        MockResponder mockResponder = new MockResponder();
        mockResponder.add(".*sahi[.]co[.]in.*", "net.sf.sahi.Test_test");
        String command = mockResponder.getCommand("http://www.sahi.co.in");
        assertEquals("net.sf.sahi.Test_test", command);
    }
View Full Code Here

TOP

Related Classes of net.sf.sahi.command.MockResponder

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.