Specifically, this code in your test case does the trick:<br><br><br>   @Test<br>   public void testGitPluginNoProject() throws Exception<br>   {<br>       getShell().setCurrentResource(createTempFolder());<br>       ...<br>
   }<br><br>As long as you are extending from AbstractShellTest, these functions will be available.<br><br><div class="gmail_quote">On Thu, Mar 8, 2012 at 10:30 AM, Lincoln Baxter, III <span dir="ltr">&lt;<a href="mailto:lincolnbaxter@gmail.com">lincolnbaxter@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hey guys,<br><br>I saw this come up during the meeting, and wanted to share the answer. It should be straightforward to simulate working &quot;outside&quot; 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:<br>

<br clear="all"><blockquote style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex" class="gmail_quote">shell.setCurrentResource(directory);<br></blockquote><div><br>This is the best way I can think of to achieve this. If it&#39;s not working, then there&#39;s a bug somewhere, probably a nasty one :)<span class="HOEnZb"><font color="#888888"><br>

<br>~Lincoln <br></font></span></div><span class="HOEnZb"><font color="#888888"><br clear="all">-- <br>Lincoln Baxter, III<br><a href="http://ocpsoft.com" target="_blank">http://ocpsoft.com</a><br><a href="http://scrumshark.com" target="_blank">http://scrumshark.com</a><br>
&quot;Keep it Simple&quot;<br>
</font></span></blockquote></div><br><br clear="all"><br>-- <br>Lincoln Baxter, III<br><a href="http://ocpsoft.com">http://ocpsoft.com</a><br><a href="http://scrumshark.com">http://scrumshark.com</a><br>&quot;Keep it Simple&quot;<br>