|
From: <pe...@us...> - 2003-11-28 00:12:39
|
Update of /cvsroot/neuclear/neuclear-xmlsig/src/test-cactus/org/neuclear/xml/soap
In directory sc8-pr-cvs1:/tmp/cvs-serv18623/src/test-cactus/org/neuclear/xml/soap
Modified Files:
XMLInputStreamServletTest.java
Log Message:
Getting the NeuClear web transactions working.
Index: XMLInputStreamServletTest.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-xmlsig/src/test-cactus/org/neuclear/xml/soap/XMLInputStreamServletTest.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** XMLInputStreamServletTest.java 24 Nov 2003 16:49:25 -0000 1.1
--- XMLInputStreamServletTest.java 28 Nov 2003 00:12:36 -0000 1.2
***************
*** 5,15 ****
import org.neuclear.commons.crypto.Base64;
- import javax.servlet.http.HttpServletRequest;
- import javax.servlet.http.HttpServletResponse;
import javax.servlet.ServletException;
- import java.io.InputStream;
import java.io.IOException;
- import java.io.BufferedReader;
- import java.io.InputStreamReader;
/*
--- 5,10 ----
***************
*** 33,36 ****
--- 28,34 ----
$Id$
$Log$
+ Revision 1.2 2003/11/28 00:12:36 pelle
+ Getting the NeuClear web transactions working.
+
Revision 1.1 2003/11/24 16:49:25 pelle
Added Cactus testing structure.
***************
*** 39,58 ****
*/
! public class XMLInputStreamServletTest extends ServletTestCase{
public static final String TESTSTRING = "test one two three";
! public void beginBase64(final WebRequest theRequest){
! theRequest.addParameter("base64xml",Base64.encode(TESTSTRING.getBytes()),"POST");
theRequest.setContentType("application/x-www-form-urlencoded");
theRequest.setURL("http://users.neuclear.org", "/test", "/Service",
! null, null);
}
public void testBase64() throws IOException, ServletException {
! assertEquals(request.getContentType(),"application/x-www-form-urlencoded");
! final MockXMLInputStreamServlet servlet=new MockXMLInputStreamServlet();
servlet.init(config);
! servlet.service(request,response);
! assertEquals(TESTSTRING,servlet.getLastInput());
}
--- 37,57 ----
*/
! public class XMLInputStreamServletTest extends ServletTestCase {
public static final String TESTSTRING = "test one two three";
! public void beginBase64(final WebRequest theRequest) {
! theRequest.addParameter("neuclear-request", Base64.encode(TESTSTRING.getBytes()), "POST");
theRequest.setContentType("application/x-www-form-urlencoded");
theRequest.setURL("http://users.neuclear.org", "/test", "/Service",
! null, null);
}
+
public void testBase64() throws IOException, ServletException {
! assertEquals(request.getContentType(), "application/x-www-form-urlencoded");
! final MockXMLInputStreamServlet servlet = new MockXMLInputStreamServlet();
servlet.init(config);
! servlet.service(request, response);
! assertEquals(TESTSTRING, servlet.getLastInput());
}
|