mirror of
https://github.com/haraldk/TwelveMonkeys.git
synced 2026-03-20 00:00:03 -04:00
Renamed servlet to own groupId. Fixed naming of ImageIO
This commit is contained in:
438
servlet/src/test/java/com/twelvemonkeys/servlet/FilterAbstractTestCase.java
Executable file
438
servlet/src/test/java/com/twelvemonkeys/servlet/FilterAbstractTestCase.java
Executable file
@@ -0,0 +1,438 @@
|
||||
package com.twelvemonkeys.servlet;
|
||||
|
||||
import com.twelvemonkeys.lang.ObjectAbstractTestCase;
|
||||
|
||||
import java.util.*;
|
||||
import java.net.URL;
|
||||
import java.net.MalformedURLException;
|
||||
import java.io.*;
|
||||
|
||||
import javax.servlet.*;
|
||||
|
||||
/**
|
||||
* FilterAbstractTestCase
|
||||
* <p/>
|
||||
*
|
||||
* @author <a href="mailto:harald.kuhr@gmail.com">Harald Kuhr</a>
|
||||
* @author last modified by $Author: haku $
|
||||
* @version $Id: //depot/branches/personal/haraldk/twelvemonkeys/release-2/twelvemonkeys-servlet/src/test/java/com/twelvemonkeys/servlet/FilterAbstractTestCase.java#1 $
|
||||
*/
|
||||
public abstract class FilterAbstractTestCase extends ObjectAbstractTestCase {
|
||||
protected Object makeObject() {
|
||||
return makeFilter();
|
||||
}
|
||||
|
||||
protected abstract Filter makeFilter();
|
||||
|
||||
// TODO: Is it a good thing to have an API like this?
|
||||
protected FilterConfig makeFilterConfig() {
|
||||
return makeFilterConfig(new HashMap());
|
||||
}
|
||||
|
||||
protected FilterConfig makeFilterConfig(Map pParams) {
|
||||
return new MockFilterConfig(pParams);
|
||||
}
|
||||
|
||||
protected ServletRequest makeRequest() {
|
||||
return new MockServletRequest();
|
||||
}
|
||||
|
||||
protected ServletResponse makeResponse() {
|
||||
return new MockServletResponse();
|
||||
}
|
||||
|
||||
protected FilterChain makeFilterChain() {
|
||||
return new MockFilterChain();
|
||||
}
|
||||
|
||||
public void testInitNull() {
|
||||
Filter filter = makeFilter();
|
||||
|
||||
// The spec seems to be a little unclear on this issue, but anyway,
|
||||
// the container should never invoke init(null)...
|
||||
try {
|
||||
filter.init(null);
|
||||
fail("Should throw Exception on init(null)");
|
||||
}
|
||||
catch (IllegalArgumentException e) {
|
||||
// Good
|
||||
}
|
||||
catch (NullPointerException e) {
|
||||
// Bad (but not unreasonable)
|
||||
}
|
||||
catch (ServletException e) {
|
||||
// Hmmm.. The jury is still out.
|
||||
}
|
||||
}
|
||||
|
||||
public void testInit() {
|
||||
Filter filter = makeFilter();
|
||||
|
||||
try {
|
||||
filter.init(makeFilterConfig());
|
||||
}
|
||||
catch (ServletException e) {
|
||||
assertNotNull(e.getMessage());
|
||||
}
|
||||
finally {
|
||||
filter.destroy();
|
||||
}
|
||||
}
|
||||
|
||||
public void testLifeCycle() throws ServletException {
|
||||
Filter filter = makeFilter();
|
||||
|
||||
try {
|
||||
filter.init(makeFilterConfig());
|
||||
}
|
||||
finally {
|
||||
filter.destroy();
|
||||
}
|
||||
}
|
||||
|
||||
public void testFilterBasic() throws ServletException, IOException {
|
||||
Filter filter = makeFilter();
|
||||
|
||||
try {
|
||||
filter.init(makeFilterConfig());
|
||||
|
||||
filter.doFilter(makeRequest(), makeResponse(), makeFilterChain());
|
||||
}
|
||||
finally {
|
||||
filter.destroy();
|
||||
}
|
||||
}
|
||||
|
||||
public void testDestroy() {
|
||||
// TODO: Implement
|
||||
}
|
||||
|
||||
static class MockFilterConfig implements FilterConfig {
|
||||
private final Map mParams;
|
||||
|
||||
MockFilterConfig() {
|
||||
this(new HashMap());
|
||||
}
|
||||
|
||||
MockFilterConfig(Map pParams) {
|
||||
if (pParams == null) {
|
||||
throw new IllegalArgumentException("params == null");
|
||||
}
|
||||
mParams = pParams;
|
||||
}
|
||||
|
||||
public String getFilterName() {
|
||||
return "mock-filter";
|
||||
}
|
||||
|
||||
public String getInitParameter(String pName) {
|
||||
return (String) mParams.get(pName);
|
||||
}
|
||||
|
||||
public Enumeration getInitParameterNames() {
|
||||
return Collections.enumeration(mParams.keySet());
|
||||
}
|
||||
|
||||
public ServletContext getServletContext() {
|
||||
return new MockServletContext();
|
||||
}
|
||||
|
||||
private static class MockServletContext implements ServletContext {
|
||||
private final Map mAttributes;
|
||||
private final Map mParams;
|
||||
|
||||
MockServletContext() {
|
||||
mAttributes = new HashMap();
|
||||
mParams = new HashMap();
|
||||
}
|
||||
|
||||
public Object getAttribute(String s) {
|
||||
return mAttributes.get(s);
|
||||
}
|
||||
|
||||
public Enumeration getAttributeNames() {
|
||||
return Collections.enumeration(mAttributes.keySet());
|
||||
}
|
||||
|
||||
public ServletContext getContext(String s) {
|
||||
return null; // TODO: Implement
|
||||
}
|
||||
|
||||
public String getInitParameter(String s) {
|
||||
return (String) mParams.get(s);
|
||||
}
|
||||
|
||||
public Enumeration getInitParameterNames() {
|
||||
return Collections.enumeration(mParams.keySet());
|
||||
}
|
||||
|
||||
public int getMajorVersion() {
|
||||
return 0; // TODO: Implement
|
||||
}
|
||||
|
||||
public String getMimeType(String s) {
|
||||
return null; // TODO: Implement
|
||||
}
|
||||
|
||||
public int getMinorVersion() {
|
||||
return 0; // TODO: Implement
|
||||
}
|
||||
|
||||
public RequestDispatcher getNamedDispatcher(String s) {
|
||||
return null; // TODO: Implement
|
||||
}
|
||||
|
||||
public String getRealPath(String s) {
|
||||
return null; // TODO: Implement
|
||||
}
|
||||
|
||||
public RequestDispatcher getRequestDispatcher(String s) {
|
||||
return null; // TODO: Implement
|
||||
}
|
||||
|
||||
public URL getResource(String s) throws MalformedURLException {
|
||||
return null; // TODO: Implement
|
||||
}
|
||||
|
||||
public InputStream getResourceAsStream(String s) {
|
||||
return null; // TODO: Implement
|
||||
}
|
||||
|
||||
public Set getResourcePaths(String s) {
|
||||
return null; // TODO: Implement
|
||||
}
|
||||
|
||||
public String getServerInfo() {
|
||||
return null; // TODO: Implement
|
||||
}
|
||||
|
||||
public Servlet getServlet(String s) throws ServletException {
|
||||
return null; // TODO: Implement
|
||||
}
|
||||
|
||||
public String getServletContextName() {
|
||||
return "mock";
|
||||
}
|
||||
|
||||
public Enumeration getServletNames() {
|
||||
return null; // TODO: Implement
|
||||
}
|
||||
|
||||
public Enumeration getServlets() {
|
||||
return null; // TODO: Implement
|
||||
}
|
||||
|
||||
public void log(Exception exception, String s) {
|
||||
// TODO: Implement
|
||||
}
|
||||
|
||||
public void log(String s) {
|
||||
// TODO: Implement
|
||||
}
|
||||
|
||||
public void log(String s, Throwable throwable) {
|
||||
// TODO: Implement
|
||||
}
|
||||
|
||||
public void removeAttribute(String s) {
|
||||
mAttributes.remove(s);
|
||||
}
|
||||
|
||||
public void setAttribute(String s, Object obj) {
|
||||
mAttributes.put(s, obj);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static class MockServletRequest implements ServletRequest {
|
||||
final private Map mAttributes;
|
||||
|
||||
public MockServletRequest() {
|
||||
mAttributes = new HashMap();
|
||||
}
|
||||
|
||||
public Object getAttribute(String pKey) {
|
||||
return mAttributes.get(pKey);
|
||||
}
|
||||
|
||||
public Enumeration getAttributeNames() {
|
||||
return Collections.enumeration(mAttributes.keySet());
|
||||
}
|
||||
|
||||
public String getCharacterEncoding() {
|
||||
return null; // TODO: Implement
|
||||
}
|
||||
|
||||
public void setCharacterEncoding(String pMessage) throws UnsupportedEncodingException {
|
||||
// TODO: Implement
|
||||
}
|
||||
|
||||
public int getContentLength() {
|
||||
return 0; // TODO: Implement
|
||||
}
|
||||
|
||||
public String getContentType() {
|
||||
return null; // TODO: Implement
|
||||
}
|
||||
|
||||
public ServletInputStream getInputStream() throws IOException {
|
||||
return null; // TODO: Implement
|
||||
}
|
||||
|
||||
public String getParameter(String pMessage) {
|
||||
return null; // TODO: Implement
|
||||
}
|
||||
|
||||
public Enumeration getParameterNames() {
|
||||
return null; // TODO: Implement
|
||||
}
|
||||
|
||||
public String[] getParameterValues(String pMessage) {
|
||||
return new String[0]; // TODO: Implement
|
||||
}
|
||||
|
||||
public Map getParameterMap() {
|
||||
return null; // TODO: Implement
|
||||
}
|
||||
|
||||
public String getProtocol() {
|
||||
return null; // TODO: Implement
|
||||
}
|
||||
|
||||
public String getScheme() {
|
||||
return null; // TODO: Implement
|
||||
}
|
||||
|
||||
public String getServerName() {
|
||||
return null; // TODO: Implement
|
||||
}
|
||||
|
||||
public int getServerPort() {
|
||||
return 0; // TODO: Implement
|
||||
}
|
||||
|
||||
public BufferedReader getReader() throws IOException {
|
||||
return null; // TODO: Implement
|
||||
}
|
||||
|
||||
public String getRemoteAddr() {
|
||||
return null; // TODO: Implement
|
||||
}
|
||||
|
||||
public String getRemoteHost() {
|
||||
return null; // TODO: Implement
|
||||
}
|
||||
|
||||
public void setAttribute(String pKey, Object pValue) {
|
||||
mAttributes.put(pKey, pValue);
|
||||
}
|
||||
|
||||
public void removeAttribute(String pKey) {
|
||||
mAttributes.remove(pKey);
|
||||
}
|
||||
|
||||
public Locale getLocale() {
|
||||
return null; // TODO: Implement
|
||||
}
|
||||
|
||||
public Enumeration getLocales() {
|
||||
return null; // TODO: Implement
|
||||
}
|
||||
|
||||
public boolean isSecure() {
|
||||
return false; // TODO: Implement
|
||||
}
|
||||
|
||||
public RequestDispatcher getRequestDispatcher(String pMessage) {
|
||||
return null; // TODO: Implement
|
||||
}
|
||||
|
||||
public String getRealPath(String pMessage) {
|
||||
return null; // TODO: Implement
|
||||
}
|
||||
|
||||
public int getRemotePort() {
|
||||
throw new UnsupportedOperationException("Method getRemotePort not implemented");// TODO: Implement
|
||||
}
|
||||
|
||||
public String getLocalName() {
|
||||
throw new UnsupportedOperationException("Method getLocalName not implemented");// TODO: Implement
|
||||
}
|
||||
|
||||
public String getLocalAddr() {
|
||||
throw new UnsupportedOperationException("Method getLocalAddr not implemented");// TODO: Implement
|
||||
}
|
||||
|
||||
public int getLocalPort() {
|
||||
throw new UnsupportedOperationException("Method getLocalPort not implemented");// TODO: Implement
|
||||
}
|
||||
}
|
||||
|
||||
static class MockServletResponse implements ServletResponse {
|
||||
public void flushBuffer() throws IOException {
|
||||
// TODO: Implement
|
||||
}
|
||||
|
||||
public int getBufferSize() {
|
||||
return 0; // TODO: Implement
|
||||
}
|
||||
|
||||
public String getCharacterEncoding() {
|
||||
return null; // TODO: Implement
|
||||
}
|
||||
|
||||
public String getContentType() {
|
||||
throw new UnsupportedOperationException("Method getContentType not implemented");// TODO: Implement
|
||||
}
|
||||
|
||||
public Locale getLocale() {
|
||||
return null; // TODO: Implement
|
||||
}
|
||||
|
||||
public ServletOutputStream getOutputStream() throws IOException {
|
||||
return null; // TODO: Implement
|
||||
}
|
||||
|
||||
public PrintWriter getWriter() throws IOException {
|
||||
return null; // TODO: Implement
|
||||
}
|
||||
|
||||
public void setCharacterEncoding(String charset) {
|
||||
throw new UnsupportedOperationException("Method setCharacterEncoding not implemented");// TODO: Implement
|
||||
}
|
||||
|
||||
public boolean isCommitted() {
|
||||
return false; // TODO: Implement
|
||||
}
|
||||
|
||||
public void reset() {
|
||||
// TODO: Implement
|
||||
}
|
||||
|
||||
public void resetBuffer() {
|
||||
// TODO: Implement
|
||||
}
|
||||
|
||||
public void setBufferSize(int pLength) {
|
||||
// TODO: Implement
|
||||
}
|
||||
|
||||
public void setContentLength(int pLength) {
|
||||
// TODO: Implement
|
||||
}
|
||||
|
||||
public void setContentType(String pMessage) {
|
||||
// TODO: Implement
|
||||
}
|
||||
|
||||
public void setLocale(Locale pLocale) {
|
||||
// TODO: Implement
|
||||
}
|
||||
}
|
||||
|
||||
static class MockFilterChain implements FilterChain {
|
||||
public void doFilter(ServletRequest pRequest, ServletResponse pResponse) throws IOException, ServletException {
|
||||
// TODO: Implement
|
||||
}
|
||||
}
|
||||
}
|
||||
151
servlet/src/test/java/com/twelvemonkeys/servlet/GenericFilterTestCase.java
Executable file
151
servlet/src/test/java/com/twelvemonkeys/servlet/GenericFilterTestCase.java
Executable file
@@ -0,0 +1,151 @@
|
||||
package com.twelvemonkeys.servlet;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.Map;
|
||||
import java.util.HashMap;
|
||||
|
||||
import javax.servlet.*;
|
||||
|
||||
/**
|
||||
* GenericFilterTestCase
|
||||
* <p/>
|
||||
*
|
||||
* @author <a href="mailto:harald.kuhr@gmail.com">Harald Kuhr</a>
|
||||
* @author last modified by $Author: haku $
|
||||
* @version $Id: //depot/branches/personal/haraldk/twelvemonkeys/release-2/twelvemonkeys-servlet/src/test/java/com/twelvemonkeys/servlet/GenericFilterTestCase.java#1 $
|
||||
*/
|
||||
public final class GenericFilterTestCase extends FilterAbstractTestCase {
|
||||
protected Filter makeFilter() {
|
||||
return new GenericFilterImpl();
|
||||
}
|
||||
|
||||
public void testInitOncePerRequest() {
|
||||
// Default FALSE
|
||||
GenericFilter filter = new GenericFilterImpl();
|
||||
|
||||
try {
|
||||
filter.init(makeFilterConfig());
|
||||
}
|
||||
catch (ServletException e) {
|
||||
fail(e.getMessage());
|
||||
}
|
||||
|
||||
assertFalse("OncePerRequest should default to false", filter.mOncePerRequest);
|
||||
filter.destroy();
|
||||
|
||||
// TRUE
|
||||
filter = new GenericFilterImpl();
|
||||
Map params = new HashMap();
|
||||
params.put("once-per-request", "true");
|
||||
|
||||
try {
|
||||
filter.init(makeFilterConfig(params));
|
||||
}
|
||||
catch (ServletException e) {
|
||||
fail(e.getMessage());
|
||||
}
|
||||
|
||||
assertTrue("oncePerRequest should be true", filter.mOncePerRequest);
|
||||
filter.destroy();
|
||||
|
||||
// TRUE
|
||||
filter = new GenericFilterImpl();
|
||||
params = new HashMap();
|
||||
params.put("oncePerRequest", "true");
|
||||
|
||||
try {
|
||||
filter.init(makeFilterConfig(params));
|
||||
}
|
||||
catch (ServletException e) {
|
||||
fail(e.getMessage());
|
||||
}
|
||||
|
||||
assertTrue("oncePerRequest should be true", filter.mOncePerRequest);
|
||||
filter.destroy();
|
||||
}
|
||||
|
||||
public void testFilterOnlyOnce() {
|
||||
final GenericFilterImpl filter = new GenericFilterImpl();
|
||||
filter.setOncePerRequest(true);
|
||||
|
||||
try {
|
||||
filter.init(makeFilterConfig());
|
||||
}
|
||||
catch (ServletException e) {
|
||||
fail(e.getMessage());
|
||||
}
|
||||
|
||||
FilterChain chain = new MyFilterChain(new Filter[] {filter, filter, filter});
|
||||
|
||||
try {
|
||||
chain.doFilter(makeRequest(), makeResponse());
|
||||
}
|
||||
catch (IOException e) {
|
||||
fail(e.getMessage());
|
||||
}
|
||||
catch (ServletException e) {
|
||||
fail(e.getMessage());
|
||||
}
|
||||
|
||||
assertEquals("Filter was invoked more than once!", 1, filter.invocationCount);
|
||||
|
||||
filter.destroy();
|
||||
}
|
||||
|
||||
public void testFilterMultiple() {
|
||||
final GenericFilterImpl filter = new GenericFilterImpl();
|
||||
|
||||
try {
|
||||
filter.init(makeFilterConfig());
|
||||
}
|
||||
catch (ServletException e) {
|
||||
fail(e.getMessage());
|
||||
}
|
||||
|
||||
FilterChain chain = new MyFilterChain(new Filter[] {
|
||||
filter, filter, filter, filter, filter
|
||||
});
|
||||
|
||||
try {
|
||||
chain.doFilter(makeRequest(), makeResponse());
|
||||
}
|
||||
catch (IOException e) {
|
||||
fail(e.getMessage());
|
||||
}
|
||||
catch (ServletException e) {
|
||||
fail(e.getMessage());
|
||||
}
|
||||
|
||||
assertEquals("Filter was invoked not invoked five times!", 5, filter.invocationCount);
|
||||
|
||||
filter.destroy();
|
||||
}
|
||||
|
||||
private static class GenericFilterImpl extends GenericFilter {
|
||||
int invocationCount;
|
||||
protected void doFilterImpl(ServletRequest pRequest, ServletResponse pResponse, FilterChain pChain) throws IOException, ServletException {
|
||||
invocationCount++;
|
||||
pChain.doFilter(pRequest, pResponse);
|
||||
}
|
||||
}
|
||||
|
||||
private static class MyFilterChain implements FilterChain {
|
||||
|
||||
Filter[] mFilters;
|
||||
int mCurrentFilter;
|
||||
|
||||
public MyFilterChain(Filter[] pFilters) {
|
||||
if (pFilters == null) {
|
||||
throw new IllegalArgumentException("filters == null");
|
||||
}
|
||||
mFilters = pFilters;
|
||||
mCurrentFilter = 0;
|
||||
}
|
||||
|
||||
public void doFilter(ServletRequest pRequest, ServletResponse pResponse) throws IOException, ServletException {
|
||||
if (mCurrentFilter < mFilters.length) {
|
||||
mFilters[mCurrentFilter++].doFilter(pRequest, pResponse, this);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,93 @@
|
||||
package com.twelvemonkeys.servlet;
|
||||
|
||||
import com.twelvemonkeys.io.NullOutputStream;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
|
||||
import java.io.PrintWriter;
|
||||
|
||||
/**
|
||||
* ServletConfigExceptionTestCase
|
||||
*
|
||||
* @author <a href="mailto:harald.kuhr@gmail.com">Harald Kuhr</a>
|
||||
* @author last modified by $Author: haku $
|
||||
* @version $Id: //depot/branches/personal/haraldk/twelvemonkeys/release-2/twelvemonkeys-servlet/src/test/java/com/twelvemonkeys/servlet/ServletConfigExceptionTestCase.java#2 $
|
||||
*/
|
||||
public class ServletConfigExceptionTestCase extends TestCase {
|
||||
public void testThrowCatchPrintStacktrace() {
|
||||
try {
|
||||
throw new ServletConfigException("FooBar!");
|
||||
}
|
||||
catch (ServletConfigException e) {
|
||||
e.printStackTrace(new PrintWriter(new NullOutputStream()));
|
||||
}
|
||||
}
|
||||
|
||||
public void testThrowCatchGetNoCause() {
|
||||
try {
|
||||
throw new ServletConfigException("FooBar!");
|
||||
}
|
||||
catch (ServletConfigException e) {
|
||||
assertEquals(null, e.getRootCause()); // Old API
|
||||
assertEquals(null, e.getCause());
|
||||
|
||||
e.printStackTrace(new PrintWriter(new NullOutputStream()));
|
||||
}
|
||||
}
|
||||
|
||||
public void testThrowCatchInitCauseNull() {
|
||||
try {
|
||||
ServletConfigException e = new ServletConfigException("FooBar!");
|
||||
e.initCause(null);
|
||||
throw e;
|
||||
}
|
||||
catch (ServletConfigException e) {
|
||||
assertEquals(null, e.getRootCause()); // Old API
|
||||
assertEquals(null, e.getCause());
|
||||
|
||||
e.printStackTrace(new PrintWriter(new NullOutputStream()));
|
||||
}
|
||||
}
|
||||
|
||||
public void testThrowCatchInitCause() {
|
||||
//noinspection ThrowableInstanceNeverThrown
|
||||
Exception cause = new Exception();
|
||||
try {
|
||||
ServletConfigException exception = new ServletConfigException("FooBar!");
|
||||
exception.initCause(cause);
|
||||
throw exception;
|
||||
}
|
||||
catch (ServletConfigException e) {
|
||||
// NOTE: We don't know how the superclass is implemented, so we assume nothing here
|
||||
//assertEquals(null, e.getRootCause()); // Old API
|
||||
assertSame(cause, e.getCause());
|
||||
|
||||
e.printStackTrace(new PrintWriter(new NullOutputStream()));
|
||||
}
|
||||
}
|
||||
|
||||
public void testThrowCatchGetNullCause() {
|
||||
try {
|
||||
throw new ServletConfigException("FooBar!", null);
|
||||
}
|
||||
catch (ServletConfigException e) {
|
||||
assertEquals(null, e.getRootCause()); // Old API
|
||||
assertEquals(null, e.getCause());
|
||||
|
||||
e.printStackTrace(new PrintWriter(new NullOutputStream()));
|
||||
}
|
||||
}
|
||||
|
||||
public void testThrowCatchGetCause() {
|
||||
IllegalStateException cause = new IllegalStateException();
|
||||
try {
|
||||
throw new ServletConfigException("FooBar caused by stupid API!", cause);
|
||||
}
|
||||
catch (ServletConfigException e) {
|
||||
assertSame(cause, e.getRootCause()); // Old API
|
||||
assertSame(cause, e.getCause());
|
||||
|
||||
e.printStackTrace(new PrintWriter(new NullOutputStream()));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,192 @@
|
||||
package com.twelvemonkeys.servlet;
|
||||
|
||||
import com.twelvemonkeys.util.MapAbstractTestCase;
|
||||
|
||||
import javax.servlet.*;
|
||||
import java.util.*;
|
||||
import java.io.Serializable;
|
||||
import java.io.InputStream;
|
||||
import java.net.URL;
|
||||
import java.net.MalformedURLException;
|
||||
|
||||
/**
|
||||
* ServletConfigMapAdapterTestCase
|
||||
* <p/>
|
||||
*
|
||||
* @author <a href="mailto:harald.kuhr@gmail.com">Harald Kuhr</a>
|
||||
* @version $Id: //depot/branches/personal/haraldk/twelvemonkeys/release-2/twelvemonkeys-servlet/src/test/java/com/twelvemonkeys/servlet/ServletConfigMapAdapterTestCase.java#3 $
|
||||
*/
|
||||
public abstract class ServletConfigMapAdapterTestCase extends MapAbstractTestCase {
|
||||
|
||||
public boolean isPutAddSupported() {
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean isPutChangeSupported() {
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean isRemoveSupported() {
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean isSetValueSupported() {
|
||||
return false;
|
||||
}
|
||||
|
||||
private static class TestConfig implements ServletConfig, FilterConfig, ServletContext, Serializable, Cloneable {
|
||||
Map mMap = new HashMap();
|
||||
|
||||
public String getServletName() {
|
||||
return "dummy"; // Not needed for this test
|
||||
}
|
||||
|
||||
public String getFilterName() {
|
||||
return getServletName();
|
||||
}
|
||||
|
||||
public String getServletContextName() {
|
||||
return getServletName();
|
||||
}
|
||||
|
||||
|
||||
public ServletContext getServletContext() {
|
||||
throw new UnsupportedOperationException("Method getSerlvetContext not implemented");
|
||||
}
|
||||
|
||||
public String getInitParameter(String s) {
|
||||
return (String) mMap.get(s);
|
||||
}
|
||||
|
||||
public Enumeration getInitParameterNames() {
|
||||
//noinspection unchecked
|
||||
return Collections.enumeration(mMap.keySet());
|
||||
}
|
||||
|
||||
public ServletContext getContext(String uripath) {
|
||||
throw new UnsupportedOperationException("Method getContext not implemented");
|
||||
}
|
||||
|
||||
public int getMajorVersion() {
|
||||
throw new UnsupportedOperationException("Method getMajorVersion not implemented");
|
||||
}
|
||||
|
||||
public int getMinorVersion() {
|
||||
throw new UnsupportedOperationException("Method getMinorVersion not implemented");
|
||||
}
|
||||
|
||||
public String getMimeType(String file) {
|
||||
throw new UnsupportedOperationException("Method getMimeType not implemented");
|
||||
}
|
||||
|
||||
public Set getResourcePaths(String path) {
|
||||
throw new UnsupportedOperationException("Method getResourcePaths not implemented");
|
||||
}
|
||||
|
||||
public URL getResource(String path) throws MalformedURLException {
|
||||
throw new UnsupportedOperationException("Method getResource not implemented");
|
||||
}
|
||||
|
||||
public InputStream getResourceAsStream(String path) {
|
||||
throw new UnsupportedOperationException("Method getResourceAsStream not implemented");
|
||||
}
|
||||
|
||||
public RequestDispatcher getRequestDispatcher(String path) {
|
||||
throw new UnsupportedOperationException("Method getRequestDispatcher not implemented");
|
||||
}
|
||||
|
||||
public RequestDispatcher getNamedDispatcher(String name) {
|
||||
throw new UnsupportedOperationException("Method getNamedDispatcher not implemented");
|
||||
}
|
||||
|
||||
public Servlet getServlet(String name) throws ServletException {
|
||||
throw new UnsupportedOperationException("Method getServlet not implemented");
|
||||
}
|
||||
|
||||
public Enumeration getServlets() {
|
||||
throw new UnsupportedOperationException("Method getServlets not implemented");
|
||||
}
|
||||
|
||||
public Enumeration getServletNames() {
|
||||
throw new UnsupportedOperationException("Method getServletNames not implemented");
|
||||
}
|
||||
|
||||
public void log(String msg) {
|
||||
throw new UnsupportedOperationException("Method log not implemented");
|
||||
}
|
||||
|
||||
public void log(Exception exception, String msg) {
|
||||
throw new UnsupportedOperationException("Method log not implemented");
|
||||
}
|
||||
|
||||
public void log(String message, Throwable throwable) {
|
||||
throw new UnsupportedOperationException("Method log not implemented");
|
||||
}
|
||||
|
||||
public String getRealPath(String path) {
|
||||
throw new UnsupportedOperationException("Method getRealPath not implemented");
|
||||
}
|
||||
|
||||
public String getServerInfo() {
|
||||
throw new UnsupportedOperationException("Method getServerInfo not implemented");
|
||||
}
|
||||
|
||||
public Object getAttribute(String name) {
|
||||
throw new UnsupportedOperationException("Method getAttribute not implemented");
|
||||
}
|
||||
|
||||
public Enumeration getAttributeNames() {
|
||||
throw new UnsupportedOperationException("Method getAttributeNames not implemented");
|
||||
}
|
||||
|
||||
public void setAttribute(String name, Object object) {
|
||||
throw new UnsupportedOperationException("Method setAttribute not implemented");
|
||||
}
|
||||
|
||||
public void removeAttribute(String name) {
|
||||
throw new UnsupportedOperationException("Method removeAttribute not implemented");
|
||||
}
|
||||
}
|
||||
|
||||
public static final class ServletConfigMapTestCase extends ServletConfigMapAdapterTestCase {
|
||||
|
||||
public Map makeEmptyMap() {
|
||||
ServletConfig config = new TestConfig();
|
||||
return new ServletConfigMapAdapter(config);
|
||||
}
|
||||
|
||||
public Map makeFullMap() {
|
||||
ServletConfig config = new TestConfig();
|
||||
addSampleMappings(((TestConfig) config).mMap);
|
||||
return new ServletConfigMapAdapter(config);
|
||||
}
|
||||
}
|
||||
|
||||
public static final class FilterConfigMapTestCase extends ServletConfigMapAdapterTestCase {
|
||||
|
||||
public Map makeEmptyMap() {
|
||||
FilterConfig config = new TestConfig();
|
||||
return new ServletConfigMapAdapter(config);
|
||||
}
|
||||
|
||||
public Map makeFullMap() {
|
||||
FilterConfig config = new TestConfig();
|
||||
addSampleMappings(((TestConfig) config).mMap);
|
||||
return new ServletConfigMapAdapter(config);
|
||||
}
|
||||
}
|
||||
|
||||
public static final class ServletContextMapTestCase extends ServletConfigMapAdapterTestCase {
|
||||
|
||||
public Map makeEmptyMap() {
|
||||
ServletContext config = new TestConfig();
|
||||
return new ServletConfigMapAdapter(config);
|
||||
}
|
||||
|
||||
public Map makeFullMap() {
|
||||
FilterConfig config = new TestConfig();
|
||||
addSampleMappings(((TestConfig) config).mMap);
|
||||
return new ServletConfigMapAdapter(config);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,103 @@
|
||||
package com.twelvemonkeys.servlet;
|
||||
|
||||
import com.twelvemonkeys.util.MapAbstractTestCase;
|
||||
import org.jmock.Mock;
|
||||
import org.jmock.core.Invocation;
|
||||
import org.jmock.core.Stub;
|
||||
import org.jmock.core.stub.CustomStub;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* ServletConfigMapAdapterTestCase
|
||||
* <p/>
|
||||
*
|
||||
* @author <a href="mailto:harald.kuhr@gmail.com">Harald Kuhr</a>
|
||||
* @version $Id: //depot/branches/personal/haraldk/twelvemonkeys/release-2/twelvemonkeys-servlet/src/test/java/com/twelvemonkeys/servlet/ServletHeadersMapAdapterTestCase.java#1 $
|
||||
*/
|
||||
public class ServletHeadersMapAdapterTestCase extends MapAbstractTestCase {
|
||||
private static final List<String> HEADER_VALUE_ETAG = Arrays.asList("\"1234567890abcdef\"");
|
||||
private static final List<String> HEADER_VALUE_DATE = Arrays.asList(new Date().toString());
|
||||
private static final List<String> HEADER_VALUE_FOO = Arrays.asList("one", "two");
|
||||
|
||||
public boolean isPutAddSupported() {
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean isPutChangeSupported() {
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean isRemoveSupported() {
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean isSetValueSupported() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isTestSerialization() {
|
||||
return false;
|
||||
}
|
||||
|
||||
public Map makeEmptyMap() {
|
||||
Mock mockRequest = mock(HttpServletRequest.class);
|
||||
mockRequest.stubs().method("getHeaderNames").will(returnValue(Collections.enumeration(Collections.emptyList())));
|
||||
mockRequest.stubs().method("getHeaders").will(returnValue(null));
|
||||
|
||||
return new SerlvetHeadersMapAdapter((HttpServletRequest) mockRequest.proxy());
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map makeFullMap() {
|
||||
Mock mockRequest = mock(HttpServletRequest.class);
|
||||
|
||||
mockRequest.stubs().method("getHeaderNames").will(returnEnumeration("ETag", "Date", "X-Foo"));
|
||||
mockRequest.stubs().method("getHeaders").with(eq("Date")).will(returnEnumeration(HEADER_VALUE_DATE));
|
||||
mockRequest.stubs().method("getHeaders").with(eq("ETag")).will(returnEnumeration(HEADER_VALUE_ETAG));
|
||||
mockRequest.stubs().method("getHeaders").with(eq("X-Foo")).will(returnEnumeration(HEADER_VALUE_FOO));
|
||||
mockRequest.stubs().method("getHeaders").with(not(or(eq("Date"), or(eq("ETag"), eq("X-Foo"))))).will(returnValue(null));
|
||||
|
||||
return new SerlvetHeadersMapAdapter((HttpServletRequest) mockRequest.proxy());
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object[] getSampleKeys() {
|
||||
return new String[] {"Date", "ETag", "X-Foo"};
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object[] getSampleValues() {
|
||||
return new Object[] {HEADER_VALUE_DATE, HEADER_VALUE_ETAG, HEADER_VALUE_FOO};
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public Object[] getNewSampleValues() {
|
||||
// Needs to be same length but different values
|
||||
return new Object[3];
|
||||
}
|
||||
|
||||
protected Stub returnEnumeration(final Object... pValues) {
|
||||
return new EnumerationStub(Arrays.asList(pValues));
|
||||
}
|
||||
|
||||
protected Stub returnEnumeration(final List<?> pValues) {
|
||||
return new EnumerationStub(pValues);
|
||||
}
|
||||
|
||||
private static class EnumerationStub extends CustomStub {
|
||||
private List<?> mValues;
|
||||
|
||||
public EnumerationStub(final List<?> pValues) {
|
||||
super("Returns a new enumeration");
|
||||
mValues = pValues;
|
||||
}
|
||||
|
||||
public Object invoke(Invocation invocation) throws Throwable {
|
||||
return Collections.enumeration(mValues);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,102 @@
|
||||
package com.twelvemonkeys.servlet;
|
||||
|
||||
import com.twelvemonkeys.util.MapAbstractTestCase;
|
||||
import org.jmock.Mock;
|
||||
import org.jmock.core.Invocation;
|
||||
import org.jmock.core.Stub;
|
||||
import org.jmock.core.stub.CustomStub;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* ServletConfigMapAdapterTestCase
|
||||
* <p/>
|
||||
*
|
||||
* @author <a href="mailto:harald.kuhr@gmail.com">Harald Kuhr</a>
|
||||
* @version $Id: //depot/branches/personal/haraldk/twelvemonkeys/release-2/twelvemonkeys-servlet/src/test/java/com/twelvemonkeys/servlet/ServletParametersMapAdapterTestCase.java#1 $
|
||||
*/
|
||||
public class ServletParametersMapAdapterTestCase extends MapAbstractTestCase {
|
||||
private static final List<String> PARAM_VALUE_ETAG = Arrays.asList("\"1234567890abcdef\"");
|
||||
private static final List<String> PARAM_VALUE_DATE = Arrays.asList(new Date().toString());
|
||||
private static final List<String> PARAM_VALUE_FOO = Arrays.asList("one", "two");
|
||||
|
||||
public boolean isPutAddSupported() {
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean isPutChangeSupported() {
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean isRemoveSupported() {
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean isSetValueSupported() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isTestSerialization() {
|
||||
return false;
|
||||
}
|
||||
|
||||
public Map makeEmptyMap() {
|
||||
Mock mockRequest = mock(HttpServletRequest.class);
|
||||
mockRequest.stubs().method("getParameterNames").will(returnValue(Collections.enumeration(Collections.emptyList())));
|
||||
mockRequest.stubs().method("getParameterValues").will(returnValue(null));
|
||||
|
||||
return new SerlvetParametersMapAdapter((HttpServletRequest) mockRequest.proxy());
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map makeFullMap() {
|
||||
Mock mockRequest = mock(HttpServletRequest.class);
|
||||
|
||||
mockRequest.stubs().method("getParameterNames").will(returnEnumeration("tag", "date", "foo"));
|
||||
mockRequest.stubs().method("getParameterValues").with(eq("date")).will(returnValue(PARAM_VALUE_DATE.toArray(new String[PARAM_VALUE_DATE.size()])));
|
||||
mockRequest.stubs().method("getParameterValues").with(eq("tag")).will(returnValue(PARAM_VALUE_ETAG.toArray(new String[PARAM_VALUE_ETAG.size()])));
|
||||
mockRequest.stubs().method("getParameterValues").with(eq("foo")).will(returnValue(PARAM_VALUE_FOO.toArray(new String[PARAM_VALUE_FOO.size()])));
|
||||
mockRequest.stubs().method("getParameterValues").with(not(or(eq("date"), or(eq("tag"), eq("foo"))))).will(returnValue(null));
|
||||
|
||||
return new SerlvetParametersMapAdapter((HttpServletRequest) mockRequest.proxy());
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object[] getSampleKeys() {
|
||||
return new String[] {"date", "tag", "foo"};
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object[] getSampleValues() {
|
||||
return new Object[] {PARAM_VALUE_DATE, PARAM_VALUE_ETAG, PARAM_VALUE_FOO};
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object[] getNewSampleValues() {
|
||||
// Needs to be same length but different values
|
||||
return new Object[3];
|
||||
}
|
||||
|
||||
protected Stub returnEnumeration(final Object... pValues) {
|
||||
return new EnumerationStub(Arrays.asList(pValues));
|
||||
}
|
||||
|
||||
protected Stub returnEnumeration(final List<?> pValues) {
|
||||
return new EnumerationStub(pValues);
|
||||
}
|
||||
|
||||
private static class EnumerationStub extends CustomStub {
|
||||
private List<?> mValues;
|
||||
|
||||
public EnumerationStub(final List<?> pValues) {
|
||||
super("Returns a new enumeration");
|
||||
mValues = pValues;
|
||||
}
|
||||
|
||||
public Object invoke(Invocation invocation) throws Throwable {
|
||||
return Collections.enumeration(mValues);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
package com.twelvemonkeys.servlet;
|
||||
|
||||
import com.twelvemonkeys.lang.ObjectAbstractTestCase;
|
||||
|
||||
import javax.servlet.ServletResponse;
|
||||
|
||||
/**
|
||||
* ServletResponseAbsrtactTestCase
|
||||
* <p/>
|
||||
*
|
||||
* @author <a href="mailto:harald.kuhr@gmail.com">Harald Kuhr</a>
|
||||
* @author last modified by $Author: haku $
|
||||
* @version $Id: //depot/branches/personal/haraldk/twelvemonkeys/release-2/twelvemonkeys-servlet/src/test/java/com/twelvemonkeys/servlet/ServletResponseAbsrtactTestCase.java#1 $
|
||||
*/
|
||||
public abstract class ServletResponseAbsrtactTestCase extends ObjectAbstractTestCase {
|
||||
protected Object makeObject() {
|
||||
return makeServletResponse();
|
||||
}
|
||||
|
||||
protected abstract ServletResponse makeServletResponse();
|
||||
|
||||
// TODO: Implement
|
||||
}
|
||||
@@ -0,0 +1,111 @@
|
||||
package com.twelvemonkeys.servlet;
|
||||
|
||||
import com.twelvemonkeys.io.OutputStreamAbstractTestCase;
|
||||
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.OutputStream;
|
||||
|
||||
import javax.servlet.Filter;
|
||||
import javax.servlet.ServletResponse;
|
||||
|
||||
/**
|
||||
* TrimWhiteSpaceFilterTestCase
|
||||
* <p/>
|
||||
*
|
||||
* @author <a href="mailto:harald.kuhr@gmail.com">Harald Kuhr</a>
|
||||
* @author last modified by $Author: haku $
|
||||
* @version $Id: //depot/branches/personal/haraldk/twelvemonkeys/release-2/twelvemonkeys-servlet/src/test/java/com/twelvemonkeys/servlet/TrimWhiteSpaceFilterTestCase.java#1 $
|
||||
*/
|
||||
public class TrimWhiteSpaceFilterTestCase extends FilterAbstractTestCase {
|
||||
protected Filter makeFilter() {
|
||||
return new TrimWhiteSpaceFilter();
|
||||
}
|
||||
|
||||
public static final class TrimWSFilterOutputStreamTestCase extends OutputStreamAbstractTestCase {
|
||||
|
||||
protected OutputStream makeObject() {
|
||||
// NOTE: ByteArrayOutputStream does not implement flush or close...
|
||||
return makeOutputStream(new ByteArrayOutputStream(16));
|
||||
}
|
||||
|
||||
protected OutputStream makeOutputStream(OutputStream pWrapped) {
|
||||
return new TrimWhiteSpaceFilter.TrimWSFilterOutputStream(pWrapped);
|
||||
}
|
||||
|
||||
public void testTrimWSOnlyWS() throws IOException {
|
||||
ByteArrayOutputStream out = new ByteArrayOutputStream(64);
|
||||
OutputStream trim = makeOutputStream(out);
|
||||
|
||||
String input = " \n\n\t \t" + (char) 0x0a + ' ' + (char) 0x0d + "\r ";
|
||||
|
||||
trim.write(input.getBytes());
|
||||
trim.flush();
|
||||
trim.close();
|
||||
|
||||
assertEquals("Should be trimmed", "\"\"", '"' + new String(out.toByteArray()) + '"');
|
||||
}
|
||||
|
||||
public void testTrimWSLeading() throws IOException {
|
||||
ByteArrayOutputStream out = new ByteArrayOutputStream(64);
|
||||
OutputStream trim = makeOutputStream(out);
|
||||
|
||||
byte[] input = " \n<?xml version=\"1.0\"?>\n\t <not-really-well-formed/> \t".getBytes();
|
||||
String trimmed = "<?xml version=\"1.0\"?>\n<not-really-well-formed/> "; // TODO: This is pr spec (the trailing space). But probably quite stupid...
|
||||
|
||||
trim.write(input);
|
||||
trim.flush();
|
||||
trim.close();
|
||||
|
||||
assertEquals("Should be trimmed", '"' + trimmed + '"', '"' + new String(out.toByteArray()) + '"');
|
||||
}
|
||||
|
||||
public void testTrimWSOffsetLength() throws IOException {
|
||||
ByteArrayOutputStream out = new ByteArrayOutputStream(64);
|
||||
OutputStream trim = makeOutputStream(out);
|
||||
|
||||
// Kindly generated by http://lipsum.org/ :-)
|
||||
byte[] input = (" \n\tLorem ipsum dolor sit amet, consectetuer adipiscing elit.\n\r\n\r" +
|
||||
"Etiam arcu neque, \n\rmalesuada blandit,\t\n\r\n\r\n\n\n\r\n\r\r\n\n\t rutrum quis, molestie at, diam.\n" +
|
||||
" Nulla elementum elementum eros.\n \t\t\n\r" +
|
||||
"Ut rhoncus, turpis in pellentesque volutpat, sapien sem accumsan augue, a scelerisque nibh erat vel magna.\n" +
|
||||
" Phasellus diam orci, dignissim et, gravida vitae, venenatis eu, elit.\n" +
|
||||
"\t\t\tSuspendisse dictum enim at nisl. Integer magna erat, viverra sit amet, consectetuer nec, accumsan ut, mi.\n" +
|
||||
"\n\r\r\r\n\rNunc ultricies \n\n\n consectetuer mauris. " +
|
||||
"Nulla lectus mauris, viverra ac, pulvinar a, commodo quis, nulla.\n " +
|
||||
"Ut eget nulla. In est dolor, convallis \t non, tincidunt \tvestibulum, porttitor et, eros.\n " +
|
||||
"\t\t \t \n\rDonec vehicula ultrices nisl.").getBytes();
|
||||
|
||||
String trimmed = "Lorem ipsum dolor sit amet, consectetuer adipiscing elit.\n" +
|
||||
"Etiam arcu neque, malesuada blandit,\trutrum quis, molestie at, diam.\n" +
|
||||
"Nulla elementum elementum eros.\n" +
|
||||
"Ut rhoncus, turpis in pellentesque volutpat, sapien sem accumsan augue, a scelerisque nibh erat vel magna.\n" +
|
||||
"Phasellus diam orci, dignissim et, gravida vitae, venenatis eu, elit.\n" +
|
||||
"Suspendisse dictum enim at nisl. Integer magna erat, viverra sit amet, consectetuer nec, accumsan ut, mi.\n" +
|
||||
"Nunc ultricies consectetuer mauris. Nulla lectus mauris, viverra ac, pulvinar a, commodo quis, nulla.\n" +
|
||||
"Ut eget nulla. In est dolor, convallis non, tincidunt vestibulum, porttitor et, eros.\n" +
|
||||
"Donec vehicula ultrices nisl.";
|
||||
|
||||
int chunkLenght = 5;
|
||||
int bytesLeft = input.length;
|
||||
while (bytesLeft > chunkLenght) {
|
||||
trim.write(input, input.length - bytesLeft, chunkLenght);
|
||||
bytesLeft -= chunkLenght;
|
||||
}
|
||||
trim.write(input, input.length - bytesLeft, bytesLeft);
|
||||
|
||||
trim.flush();
|
||||
trim.close();
|
||||
|
||||
assertEquals("Should be trimmed", '"' + trimmed + '"', '"' + new String(out.toByteArray()) + '"');
|
||||
}
|
||||
|
||||
// TODO: Test that we DON'T remove too much...
|
||||
}
|
||||
|
||||
public static final class TrimWSServletResponseWrapperTestCase extends ServletResponseAbsrtactTestCase {
|
||||
protected ServletResponse makeServletResponse() {
|
||||
return new TrimWhiteSpaceFilter.TrimWSServletResponseWrapper(new MockServletResponse());
|
||||
}
|
||||
}
|
||||
}
|
||||
1308
servlet/src/test/java/com/twelvemonkeys/servlet/cache/HTTPCacheTestCase.java
vendored
Executable file
1308
servlet/src/test/java/com/twelvemonkeys/servlet/cache/HTTPCacheTestCase.java
vendored
Executable file
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
BIN
servlet/src/test/resources/com/twelvemonkeys/servlet/image/12monkeys-splash.png
Executable file
BIN
servlet/src/test/resources/com/twelvemonkeys/servlet/image/12monkeys-splash.png
Executable file
Binary file not shown.
|
After Width: | Height: | Size: 102 KiB |
1
servlet/src/test/resources/com/twelvemonkeys/servlet/image/foo.txt
Executable file
1
servlet/src/test/resources/com/twelvemonkeys/servlet/image/foo.txt
Executable file
@@ -0,0 +1 @@
|
||||
This is just a text file.
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 5.7 KiB |
Reference in New Issue
Block a user