[forge-dev] Working outside of a project during test case execution.

Lincoln Baxter, III lincolnbaxter at gmail.com
Thu Mar 8 10:30:27 EST 2012


Hey guys,

I saw this come up during the meeting, and wanted to share the answer. It
should be straightforward to simulate working "outside" of a project in a
test case. Just create a temp folder (using the Java file API) then either
CD to that folder, or get a resource handle to it by @Injecting the
ResourceFactory, then set that resource as the current resource using:

shell.setCurrentResource(directory);
>

This is the best way I can think of to achieve this. If it's not working,
then there's a bug somewhere, probably a nasty one :)

~Lincoln

-- 
Lincoln Baxter, III
http://ocpsoft.com
http://scrumshark.com
"Keep it Simple"
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/forge-dev/attachments/20120308/5c87e374/attachment.html 


More information about the forge-dev mailing list