Hi, I'm trying to do a test like the following:

<code>
   public void testUnsuccessfulLogin() {
       WebTester tester = new WebTester();
tester.getTestContext().setBaseUrl("http://localhost:8084";); tester.getTestContext().setAuthorization("badUsr", "badPwd");
       tester.beginAt("/fof");
assertEquals(HttpServletResponse.SC_UNAUTHORIZED, tester.getDialog().getResponse().getResponseCode()); } </code>

Is it possible or do i have to catch the RuntimeException(com.meterware.httpunit.AuthorizationRequiredException: Basic authentication required: realm="localhost:8084")?

Marco



-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
Jwebunit-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jwebunit-users

Reply via email to