use of org.craftercms.engine.scripting.impl.GroovyScriptFactory in project engine by craftercms.
the class RestScriptsControllerTest method createSiteContext.
private SiteContext createSiteContext(ContentStoreService storeService) {
SiteContext siteContext = mock(SiteContext.class);
ContentStoreResourceConnector resourceConnector = new ContentStoreResourceConnector(siteContext);
ScriptFactory scriptFactory = new GroovyScriptFactory(resourceConnector, Collections.<String, Object>emptyMap());
when(siteContext.getSiteName()).thenReturn("test");
when(siteContext.getContext()).thenReturn(mock(Context.class));
when(siteContext.getRestScriptsPath()).thenReturn("/scripts");
when(siteContext.getStoreService()).thenReturn(storeService);
when(siteContext.getScriptFactory()).thenReturn(scriptFactory);
return siteContext;
}
Aggregations