use of org.apache.sling.scripting.sightly.impl.engine.SightlyEngineConfiguration in project sling by apache.
the class SightlyJavaCompilerServiceTest method setUp.
@Before
public void setUp() throws Exception {
compiler = spy(new SightlyJavaCompilerService());
resourceBackedPojoChangeMonitor = spy(new ResourceBackedPojoChangeMonitor());
SightlyEngineConfiguration sightlyEngineConfiguration = mock(SightlyEngineConfiguration.class);
when(sightlyEngineConfiguration.getBundleSymbolicName()).thenReturn("org.apache.sling.scripting.sightly");
when(sightlyEngineConfiguration.getScratchFolder()).thenReturn("/org/apache/sling/scripting/sightly");
Whitebox.setInternalState(compiler, "sightlyEngineConfiguration", sightlyEngineConfiguration);
Whitebox.setInternalState(compiler, "resourceBackedPojoChangeMonitor", resourceBackedPojoChangeMonitor);
classLoaderWriter = Mockito.mock(ClassLoaderWriter.class);
ClassLoader classLoader = Mockito.mock(ClassLoader.class);
when(classLoaderWriter.getClassLoader()).thenReturn(classLoader);
}
use of org.apache.sling.scripting.sightly.impl.engine.SightlyEngineConfiguration in project sling by apache.
the class SourceIdentifierTest method getSourceIdentifier.
private SourceIdentifier getSourceIdentifier(String path) {
Resource resource = mock(Resource.class);
when(resource.getPath()).thenReturn(path);
SightlyEngineConfiguration configuration = mock(SightlyEngineConfiguration.class);
when(configuration.getBundleSymbolicName()).thenReturn(BUNDLE_SYMBOLIC_NAME);
return new SourceIdentifier(configuration, resource.getPath());
}
Aggregations