com.buglabs.osgi.http.test
Class BinaryTestCases
java.lang.Object
TestCase
com.buglabs.osgi.http.test.BinaryTestCases
public class BinaryTestCases
- extends TestCase
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
doPostCalled
public boolean doPostCalled
doPutCalled
public boolean doPutCalled
doGetCalled
public boolean doGetCalled
doDeleteCalled
public boolean doDeleteCalled
TARGET_HOST
public static java.lang.String TARGET_HOST
SERVLET_ALIAS
public static java.lang.String SERVLET_ALIAS
BinaryTestCases
public BinaryTestCases()
setUp
protected void setUp()
throws java.lang.Exception
- Throws:
java.lang.Exception
testGetHTTPService
public void testGetHTTPService()
testRegisterServlet
public void testRegisterServlet()
throws javax.servlet.ServletException,
org.osgi.service.http.NamespaceException,
java.net.MalformedURLException,
java.io.IOException,
org.xml.sax.SAXException
- Throws:
javax.servlet.ServletException
org.osgi.service.http.NamespaceException
java.net.MalformedURLException
java.io.IOException
org.xml.sax.SAXException
testDoPut
public void testDoPut()
throws javax.servlet.ServletException,
org.osgi.service.http.NamespaceException,
java.net.MalformedURLException,
java.io.IOException,
org.xml.sax.SAXException
- Throws:
javax.servlet.ServletException
org.osgi.service.http.NamespaceException
java.net.MalformedURLException
java.io.IOException
org.xml.sax.SAXException
testDoPostBinaryFile
public void testDoPostBinaryFile()
throws javax.servlet.ServletException,
org.osgi.service.http.NamespaceException,
java.net.MalformedURLException,
java.io.IOException,
org.xml.sax.SAXException
- This tests that POST message body does not get mangled by the server. It
does this by passing in a specific message, relying on the servlet on
passing the message back after writing it to a file, and then comparing
them.
- Throws:
javax.servlet.ServletException
org.osgi.service.http.NamespaceException
java.net.MalformedURLException
java.io.IOException
org.xml.sax.SAXException
testDoGet
public void testDoGet()
throws javax.servlet.ServletException,
org.osgi.service.http.NamespaceException,
java.net.MalformedURLException,
java.io.IOException,
org.xml.sax.SAXException,
java.lang.InterruptedException
- Throws:
javax.servlet.ServletException
org.osgi.service.http.NamespaceException
java.net.MalformedURLException
java.io.IOException
org.xml.sax.SAXException
java.lang.InterruptedException
testDoPostFile
public void testDoPostFile()
throws javax.servlet.ServletException,
org.osgi.service.http.NamespaceException,
java.net.MalformedURLException,
java.io.IOException,
org.xml.sax.SAXException
- This tests that POST message body does not get mangled by the server. It
does this by passing in a specific message, relying on the servlet on
passing the message back after writing it to a file, and then comparing
them.
- Throws:
javax.servlet.ServletException
org.osgi.service.http.NamespaceException
java.net.MalformedURLException
java.io.IOException
org.xml.sax.SAXException
testDoPostFileUnicode
public void testDoPostFileUnicode()
throws javax.servlet.ServletException,
org.osgi.service.http.NamespaceException,
java.net.MalformedURLException,
java.io.IOException,
org.xml.sax.SAXException
- This tests that POST message body does not get mangled by the server. It
does this by passing in a specific message, relying on the servlet on
passing the message back after writing it to a file, and then comparing
them.
- Throws:
javax.servlet.ServletException
org.osgi.service.http.NamespaceException
java.net.MalformedURLException
java.io.IOException
org.xml.sax.SAXException
testDoPostBase64BinaryFile
public void testDoPostBase64BinaryFile()
throws javax.servlet.ServletException,
org.osgi.service.http.NamespaceException,
java.net.MalformedURLException,
java.io.IOException,
org.xml.sax.SAXException
- This tests that POST message body does not get mangled by the server. It
does this by passing in a specific message, relying on the servlet on
passing the message back after writing it to a file, and then comparing
them.
- Throws:
javax.servlet.ServletException
org.osgi.service.http.NamespaceException
java.net.MalformedURLException
java.io.IOException
org.xml.sax.SAXException
testDoPost
public void testDoPost()
throws javax.servlet.ServletException,
org.osgi.service.http.NamespaceException,
java.net.MalformedURLException,
java.io.IOException,
org.xml.sax.SAXException
- Throws:
javax.servlet.ServletException
org.osgi.service.http.NamespaceException
java.net.MalformedURLException
java.io.IOException
org.xml.sax.SAXException
streamToByteArray
public static byte[] streamToByteArray(java.io.InputStream in)
throws java.io.IOException
- Throws:
java.io.IOException