[Yanel-dev] SetWorkFlowStatus and Unit test

arun vasireddy arunuk at gmail.com
Fri Nov 5 18:05:40 CET 2010


Hi,


I am setting the Initial workflow status for an XML node in the create()
method of a controller class which implements VersionableV2, WorkflowableV1
as below:

WorkflowHelper.setWorkflowState(getYanel().getResourceManager().getResource=
(getEnvironment(),
getRealm(),newNode.getPath()), workflow.getInitialState(),
revision.getRevisionName());


I have two questions regarding a part of the above code which is:
"getYanel().getResourceManager().getResource(getEnvironment(),
getRealm(),newNode.getPath())"

Q1. Is there any other way of getting the Resource rather than getting the
Yanel, which is a singleton. If not,

Q2. How can we Unit test the controller that has the above code?I was trying
with Powermock, but could not get it right.

Please do not hesitate to ask if you require any further details about this.

Please help me with the above questions.Thanks in advance.


Thanks&Regards
Arun V
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.wyona.org/pipermail/yanel-development/attachments/2010110=
5/00823a9f/attachment.htm


More information about the Yanel-development mailing list