public abstract class AbstractReadOnlyContentStoreTest
extends junit.framework.TestCase
ContentStore
.ContentStore
,
ContentReader
,
ContentWriter
Modifier and Type | Field and Description |
---|---|
protected static org.springframework.context.ApplicationContext |
ctx |
protected TransactionService |
transactionService |
Constructor and Description |
---|
AbstractReadOnlyContentStoreTest() |
Modifier and Type | Method and Description |
---|---|
protected java.lang.String |
getExistingContentUrl()
Fetch a valid URL from the store.
|
protected org.alfresco.service.cmr.repository.ContentReader |
getReader(java.lang.String contentUrl)
Gets a reader for the given content URL from the store
|
protected abstract ContentStore |
getStore()
Fetch the store to be used during a test.
|
void |
setUp()
Starts a transaction
|
void |
tearDown()
Rolls back the transaction
|
void |
testBlockedWriteOperations() |
void |
testGetReaderForExistingContentUrl()
Checks that the various methods of obtaining a reader are supported.
|
void |
testIllegalReadableContentUrls()
Checks that the error handling for inappropriate content URLs
|
void |
testRandomAccessRead()
Tests random access reading
|
void |
testSetUp() |
countTestCases, createResult, getName, run, run, runBare, runTest, setName, toString
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
protected static final org.springframework.context.ApplicationContext ctx
protected TransactionService transactionService
public void setUp() throws java.lang.Exception
setUp
in class junit.framework.TestCase
java.lang.Exception
public void tearDown() throws java.lang.Exception
tearDown
in class junit.framework.TestCase
java.lang.Exception
protected abstract ContentStore getStore()
setUp
to initialise resources.
Usually tests will construct a static instance of the store to use throughout all the tests.
protected final org.alfresco.service.cmr.repository.ContentReader getReader(java.lang.String contentUrl)
protected java.lang.String getExistingContentUrl()
public void testSetUp() throws java.lang.Exception
java.lang.Exception
public void testIllegalReadableContentUrls()
public void testGetReaderForExistingContentUrl() throws java.lang.Exception
java.lang.Exception
public void testRandomAccessRead() throws java.lang.Exception
Only executes if the reader implements RandomAccessContent
.
java.lang.Exception
public void testBlockedWriteOperations() throws java.lang.Exception
java.lang.Exception
Copyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.