You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@lenya.apache.org by Florent André <fl...@4sengines.com> on 2009/07/07 09:33:30 UTC

Testing document creation

Hi Lenya world !

This mail is about the lenyaDocWriting Transformer.

As Andreas suggest me during the meeting, I try to writing a test in order
to solve the "non publishing of documents".

Before arrived to test the publish workflow I have 2 problems : 
1) minor - there is a different access to object beetween transformer and
testClass:
-- in the transformer, we can get request & manager just with
"this.request", "this.manager"
-- in the test,we have to use getRequest(), getManager().
This is just a little bit "not cool" for easy testing for neebies like me

2) major - although I use the same code for create a document in the
transformer and in the test code, I have an error in the test ! The
creation of document in transformer work like a charm.

Here the error from the test compilation : 
Testcase: testSubmitState took 1,804 sec
	Caused an ERROR
null
java.lang.NullPointerException
	at
org.apache.lenya.cms.repository.SourceNodeRCML.checkOutIn(SourceNodeRCML.java:147)
	at
org.apache.lenya.cms.repository.SourceNodeRCML.checkOut(SourceNodeRCML.java:615)
	at
org.apache.lenya.cms.repository.SourceNode.checkout(SourceNode.java:167)
	at
org.apache.lenya.cms.repository.SourceNode.checkout(SourceNode.java:176)
	at
org.apache.lenya.transaction.UnitOfWorkImpl.commit(UnitOfWorkImpl.java:118)
	at
org.apache.lenya.cms.repository.SessionImpl.commit(SessionImpl.java:142)
	at
eu.sengines.lenya.transformation.WorkflowLenyaDocTranformerTest.createLenyaDocument(WorkflowLenyaDocTranformerTest.java:254)
	at
eu.sengines.lenya.transformation.WorkflowLenyaDocTranformerTest.testSubmitState(WorkflowLenyaDocTranformerTest.java:112)

BUILD FAILED

----------------------
If you want to see all code from this test case, you can checkout from the
svn I set up :
svn co
http://svn.4sengines.eu/modcontrib/lenyaDocWriting/exps/testDocumentCreation

Any help will be much appreciated

HAND

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
For additional commands, e-mail: user-help@lenya.apache.org