com.atlassian.gzipfilter
Class TestSelectingResponseWrapper

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by com.atlassian.gzipfilter.TestSelectingResponseWrapper
All Implemented Interfaces:
junit.framework.Test

public class TestSelectingResponseWrapper
extends junit.framework.TestCase

This Class currently only tests that the content-encoding header is not set when a redirect/error occurs.

todo: Write tests for most of the functionality.


Constructor Summary
TestSelectingResponseWrapper()
           
 
Method Summary
protected  void setUp()
           
protected  void tearDown()
           
 void testNoZipOnNoContentResponse()
          Tests that the response is not gzipped when the response code is HttpServletResponse.SC_NO_CONTENT
 void testNoZipOnNotModifiedResponse()
          Tests that the response is not gzipped when the response code is HttpServletResponse.SC_NOT_MODIFIED
 void testNoZipOnRedirect()
           
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runBare, runTest, setName, toString
 
Methods inherited from class junit.framework.Assert
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TestSelectingResponseWrapper

public TestSelectingResponseWrapper()
Method Detail

setUp

protected void setUp()
              throws java.lang.Exception
Overrides:
setUp in class junit.framework.TestCase
Throws:
java.lang.Exception

tearDown

protected void tearDown()
                 throws java.lang.Exception
Overrides:
tearDown in class junit.framework.TestCase
Throws:
java.lang.Exception

testNoZipOnRedirect

public void testNoZipOnRedirect()
                         throws java.io.IOException
Throws:
java.io.IOException

testNoZipOnNoContentResponse

public void testNoZipOnNoContentResponse()
Tests that the response is not gzipped when the response code is HttpServletResponse.SC_NO_CONTENT


testNoZipOnNotModifiedResponse

public void testNoZipOnNotModifiedResponse()
Tests that the response is not gzipped when the response code is HttpServletResponse.SC_NOT_MODIFIED



Copyright © 2008 Atlassian Pty Ltd. All Rights Reserved.