Package org.apache.jackrabbit.test.api
Class ExportDocViewTest
- java.lang.Object
-
- junit.framework.Assert
-
- junit.framework.TestCase
-
- org.apache.jackrabbit.test.JUnitTest
-
- org.apache.jackrabbit.test.AbstractJCRTest
-
- org.apache.jackrabbit.test.api.ExportDocViewTest
-
- All Implemented Interfaces:
junit.framework.Test
public class ExportDocViewTest extends AbstractJCRTest
ExportDocViewTesttests the two Session methods :Session.exportDocumentView(String, ContentHandler, boolean, boolean)andSession.exportDocumentView(String, java.io.OutputStream, boolean, boolean)against the required behaviours according the document view xml mapping defined in the JSR 170 specification in chapter 6.4.2, 6.4.3 and 6.4.4 .
-
-
Field Summary
-
Fields inherited from class org.apache.jackrabbit.test.AbstractJCRTest
isReadOnly, jcrBaseVersion, jcrCopiedFrom, jcrCreated, jcrFrozenNode, jcrFrozenUuid, jcrIsCheckedOut, jcrlockIsDeep, jcrLockOwner, jcrMergeFailed, jcrMixinTypes, jcrPredecessors, jcrPrimaryType, jcrRootVersion, jcrSuccessors, jcrSystem, jcrUUID, jcrVersionHistory, mixLockable, mixReferenceable, mixShareable, mixSimpleVersionable, mixTitle, mixVersionable, nodeName1, nodeName2, nodeName3, nodeName4, NS_JCR_URI, NS_MIX_URI, NS_NT_URI, NS_SV_URI, ntActivity, ntBase, ntFrozenNode, ntQuery, ntUnstructured, ntVersion, ntVersionHistory, ntVersionLabels, propertyName1, propertyName2, superuser, testNodeType, testNodeTypeNoChildren, testNodeTypeTestRoot, testRoot, testRootNode, vf, workspaceName
-
-
Constructor Summary
Constructors Constructor Description ExportDocViewTest()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddoTestExportDocView(boolean withHandler, boolean skipBinary, boolean noRecurse)Tests session.exportDocView with the different argument possibilities.protected voidsetUp()protected voidtearDown()voidtestExportDocView_handler_session_saveBinary_noRecurse()voidtestExportDocView_handler_session_saveBinary_recurse()voidtestExportDocView_handler_session_skipBinary_noRecurse()voidtestExportDocView_handler_session_skipBinary_recurse()voidtestExportDocView_stream_session_saveBinary_noRecurse()voidtestExportDocView_stream_session_saveBinary_recurse()voidtestExportDocView_stream_session_skipBinary_noRecurse()voidtestExportDocView_stream_session_skipBinary_recurse()-
Methods inherited from class org.apache.jackrabbit.test.AbstractJCRTest
checkSupportedOption, cleanUp, cleanUpTestRoot, createRandomString, ensureCanSetProperty, ensureCanSetProperty, ensureCanSetProperty, ensureKnowsNodeType, ensureLockingSupported, ensureMixinType, ensureMultipleWorkspacesSupported, getHelper, getJcrValue, getLocalName, getNonExistingWorkspaceName, getPrefix, getProperty, getProperty, getQualifiedName, getSize, isSupported, needsMixin, run
-
Methods inherited from class junit.framework.TestCase
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, countTestCases, createResult, fail, fail, failNotEquals, failNotSame, failSame, format, getName, run, runBare, runTest, setName, toString
-
-
-
-
Method Detail
-
setUp
protected void setUp() throws Exception- Overrides:
setUpin classAbstractJCRTest- Throws:
Exception
-
tearDown
protected void tearDown() throws Exception- Overrides:
tearDownin classAbstractJCRTest- Throws:
Exception
-
testExportDocView_handler_session_skipBinary_noRecurse
public void testExportDocView_handler_session_skipBinary_noRecurse() throws IOException, RepositoryException, SAXException, TransformerException
-
testExportDocView_handler_session_skipBinary_recurse
public void testExportDocView_handler_session_skipBinary_recurse() throws IOException, RepositoryException, SAXException, TransformerException
-
testExportDocView_handler_session_saveBinary_noRecurse
public void testExportDocView_handler_session_saveBinary_noRecurse() throws IOException, RepositoryException, SAXException, TransformerException
-
testExportDocView_handler_session_saveBinary_recurse
public void testExportDocView_handler_session_saveBinary_recurse() throws IOException, RepositoryException, SAXException, TransformerException
-
testExportDocView_stream_session_skipBinary_recurse
public void testExportDocView_stream_session_skipBinary_recurse() throws IOException, RepositoryException, SAXException, TransformerException
-
testExportDocView_stream_session_skipBinary_noRecurse
public void testExportDocView_stream_session_skipBinary_noRecurse() throws IOException, RepositoryException, SAXException, TransformerException
-
testExportDocView_stream_session_saveBinary_noRecurse
public void testExportDocView_stream_session_saveBinary_noRecurse() throws IOException, RepositoryException, SAXException, TransformerException
-
testExportDocView_stream_session_saveBinary_recurse
public void testExportDocView_stream_session_saveBinary_recurse() throws IOException, RepositoryException, SAXException, TransformerException
-
doTestExportDocView
public void doTestExportDocView(boolean withHandler, boolean skipBinary, boolean noRecurse) throws RepositoryException, IOException, SAXException, TransformerExceptionTests session.exportDocView with the different argument possibilities. The flag withHandler decides if the method requiring a ContentHandler as argument is called. The class org.apache.xml.serialize.XMLSerializer is taken as ContentHandler in this case. In both cases ( export with a ContentHandler and export with Stream) the test node is exported to the file defined in the setUp. This exported file is parsed using javax.xml.transform package and the receiving document is compared with the test node and its properties and child nodes in the repository.- Parameters:
withHandler- boolean, decides to call method requiring a ContentHandler as argumentskipBinary-noRecurse-- Throws:
RepositoryExceptionIOExceptionSAXExceptionTransformerException
-
-