org.alfresco.repo.content
Class RoutingContentServiceTest

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by org.alfresco.repo.content.RoutingContentServiceTest
All Implemented Interfaces:
junit.framework.Test

public class RoutingContentServiceTest
extends junit.framework.TestCase

See Also:
RoutingContentService

Constructor Summary
RoutingContentServiceTest()
           
 
Method Summary
 void onContentReadBehaviourTest(org.alfresco.service.cmr.repository.NodeRef nodeRef)
           
 void onContentUpdateBehaviourTest(org.alfresco.service.cmr.repository.NodeRef nodeRef, boolean newContent)
           
 void setUp()
           
 void tearDown()
           
 void testAutoSettingOfProperties()
          Checks that the URL, mimetype and encoding are automatically set on the readers and writers
 void testConcurrentWritesNoTxn()
          Checks that multiple writes can occur to the same node outside of any transactions.
 void testConcurrentWritesWithMultipleTxns()
          Create several threads that will attempt to write to the same node property.
 void testConcurrentWritesWithSingleTxn()
           
 void testContentStoreSizes()
           
 void testGetRawReader()
           
 void testMissingContent()
          Checks what happens when the physical content disappears
 void testNullReaderForNullUrl()
           
 void testOnContentReadPolicy()
           
 void testOnContentUpdatePolicy()
          Tests that the content update policy firs correctly
 void testPostCopyContentRetrieval()
          Checks that node copy and delete behaviour behaves correctly w.r.t.
 void testRollbackCleanup_ALF2890()
          Ensure that content URLs outside of a transaction are not touched on rollback.
 void testSetUp()
           
 void testSimpleNonTempWriter()
          Check that a valid writer into the content store can be retrieved and used.
 void testSimpleWrite()
          Tests simple writes that don't automatically update the node content URL
 void testTempWrite()
           
 void testTransformation()
           
 void testUnknownMimetype()
          Check that the system is able to handle the uploading of content with an unknown mimetype.
 void testUpdatingWrite()
          Tests the automatic updating of nodes' content URLs
 void testWriteToNodeWithoutAnyContentProperties()
           
 
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

RoutingContentServiceTest

public RoutingContentServiceTest()
Method Detail

setUp

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

tearDown

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

testSetUp

public void testSetUp()
               throws java.lang.Exception
Throws:
java.lang.Exception

testSimpleNonTempWriter

public void testSimpleNonTempWriter()
                             throws java.lang.Exception
Check that a valid writer into the content store can be retrieved and used.

Throws:
java.lang.Exception

testAutoSettingOfProperties

public void testAutoSettingOfProperties()
                                 throws java.lang.Exception
Checks that the URL, mimetype and encoding are automatically set on the readers and writers

Throws:
java.lang.Exception

testWriteToNodeWithoutAnyContentProperties

public void testWriteToNodeWithoutAnyContentProperties()
                                                throws java.lang.Exception
Throws:
java.lang.Exception

testNullReaderForNullUrl

public void testNullReaderForNullUrl()
                              throws java.lang.Exception
Throws:
java.lang.Exception

testContentStoreSizes

public void testContentStoreSizes()
                           throws java.lang.Exception
Throws:
java.lang.Exception

testGetRawReader

public void testGetRawReader()
                      throws java.lang.Exception
Throws:
java.lang.Exception

testMissingContent

public void testMissingContent()
                        throws java.lang.Exception
Checks what happens when the physical content disappears

Throws:
java.lang.Exception

testSimpleWrite

public void testSimpleWrite()
                     throws java.lang.Exception
Tests simple writes that don't automatically update the node content URL

Throws:
java.lang.Exception

testOnContentUpdatePolicy

public void testOnContentUpdatePolicy()
Tests that the content update policy firs correctly


onContentUpdateBehaviourTest

public void onContentUpdateBehaviourTest(org.alfresco.service.cmr.repository.NodeRef nodeRef,
                                         boolean newContent)

testOnContentReadPolicy

public void testOnContentReadPolicy()

onContentReadBehaviourTest

public void onContentReadBehaviourTest(org.alfresco.service.cmr.repository.NodeRef nodeRef)

testTempWrite

public void testTempWrite()
                   throws java.lang.Exception
Throws:
java.lang.Exception

testUpdatingWrite

public void testUpdatingWrite()
                       throws java.lang.Exception
Tests the automatic updating of nodes' content URLs

Throws:
java.lang.Exception

testConcurrentWritesNoTxn

public void testConcurrentWritesNoTxn()
                               throws java.lang.Exception
Checks that multiple writes can occur to the same node outside of any transactions.

It is only when the streams are closed that the node is updated.

Throws:
java.lang.Exception

testConcurrentWritesWithSingleTxn

public void testConcurrentWritesWithSingleTxn()
                                       throws java.lang.Exception
Throws:
java.lang.Exception

testConcurrentWritesWithMultipleTxns

public void testConcurrentWritesWithMultipleTxns()
                                          throws java.lang.Exception
Create several threads that will attempt to write to the same node property. The ContentWriter is handed to the thread, so this checks that the stream closure uses the transaction that called close and not the transaction that fetched the ContentWriter.

Throws:
java.lang.Exception

testTransformation

public void testTransformation()
                        throws java.lang.Exception
Throws:
java.lang.Exception

testUnknownMimetype

public void testUnknownMimetype()
                         throws java.lang.Exception
Check that the system is able to handle the uploading of content with an unknown mimetype. The unknown mimetype should be preserved, but treated just like an octet stream.

Throws:
java.lang.Exception

testPostCopyContentRetrieval

public void testPostCopyContentRetrieval()
                                  throws java.lang.Exception
Checks that node copy and delete behaviour behaves correctly w.r.t. cleanup and shared URLs

Throws:
java.lang.Exception

testRollbackCleanup_ALF2890

public void testRollbackCleanup_ALF2890()
                                 throws java.lang.Exception
Ensure that content URLs outside of a transaction are not touched on rollback.

Throws:
java.lang.Exception


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