org.alfresco.deployment.transformers
Class CompressionTransformerTest

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by org.alfresco.deployment.transformers.CompressionTransformerTest
All Implemented Interfaces:
junit.framework.Test

public class CompressionTransformerTest
extends junit.framework.TestCase

Tests of the CompressionTransformer

See Also:
CompressionTransformer

Constructor Summary
CompressionTransformerTest(java.lang.String name)
           
 
Method Summary
protected  void setUp()
           
protected  void tearDown()
           
 void testAddFilter()
          Test method for org.alfresco.deployment.transformers.CompressionTransformer#addFilter(java.io.OutputStream, org.alfresco.deployment.DeploymentTransportTransformer.Direction, java.lang.String).
 void testCompressDecompressBigMessage()
          End to end test.
 void testCompressDecompressManySends()
          End to end test.
 
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, failNotEquals, failNotSame, failSame, format
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CompressionTransformerTest

public CompressionTransformerTest(java.lang.String name)
Parameters:
name -
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

testAddFilter

public void testAddFilter()
Test method for org.alfresco.deployment.transformers.CompressionTransformer#addFilter(java.io.OutputStream, org.alfresco.deployment.DeploymentTransportTransformer.Direction, java.lang.String). This test compresses a message with one transformation. Then sends the results through another instance to give us plain text again.


testCompressDecompressBigMessage

public void testCompressDecompressBigMessage()
End to end test. This test passes a big message through compression and decompression to check buffering. compression is rather good at reducing the size of the message so this test needs to generate some random clear text.


testCompressDecompressManySends

public void testCompressDecompressManySends()
End to end test. This test tests buffering by ensuring that many sends are processed correctly.



Copyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.