Merged BRANCHES/DEV/CLOUDSYNCLOCAL2 to HEAD:

35620: More JUnit Rules Enhancements, covering well known nodes and easier context loading


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@35621 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Nick Burch
2012-04-24 15:00:21 +00:00
parent f71280b165
commit 17ee08366f
3 changed files with 145 additions and 2 deletions

View File

@@ -108,7 +108,7 @@ public class ApplicationContextInit extends ExternalResource
return new ApplicationContextInit(contextsAsArray);
}
@Override protected void before() throws Throwable
@Override protected void before()
{
// Were any context locations specified in the constructor?
if (configLocations.length > 0)
@@ -144,6 +144,11 @@ public class ApplicationContextInit extends ExternalResource
*/
public ApplicationContext getApplicationContext()
{
if (this.appContext == null)
{
// Chain order is wrong, try to help out by doing the @Before now
before();
}
return this.appContext;
}