1 22 package org.jboss.ejb3.test.security.unit; 23 24 import java.io.IOException ; 25 import java.net.URL ; 26 27 import junit.framework.Test; 28 29 import org.apache.commons.httpclient.Header; 30 import org.apache.commons.httpclient.HttpClient; 31 import org.apache.commons.httpclient.HttpMethodBase; 32 import org.apache.commons.httpclient.UsernamePasswordCredentials; 33 import org.jboss.test.JBossTestCase; 34 import org.jboss.ejb3.test.dd.web.util.HttpUtils; 35 36 49 public class ServletUnitTestCase extends JBossTestCase 50 { 51 private static String REALM = "JBossTest Servlets"; 52 53 public ServletUnitTestCase(String name) 54 { 55 super(name); 56 } 57 58 public void testEJBServlet() throws Exception 59 { 60 try { 61 URL url = new URL (HttpUtils.getBaseURL()+"security-web/EJBServlet"); 62 HttpUtils.accessURL(url); 63 } catch (Exception e){ 64 e.printStackTrace(); 65 throw e; 66 } 67 } 68 69 72 public static Test suite() throws Exception 73 { 74 return getDeploySetup(ServletUnitTestCase.class, "security.jar, security-web.war"); 75 } 76 77 78 } 79 | Popular Tags |