Search in sources :

Example 1 with RuntimeContext

use of org.pentaho.platform.engine.services.runtime.RuntimeContext in project pentaho-platform by pentaho.

the class MessageFormatterTest method before.

@Before
public void before() {
    mockedRuntimeRepository = mock(IRuntimeRepository.class);
    mockedSolutionEngine = mock(ISolutionEngine.class);
    mockedPentahoSystem = new MockUp<PentahoSystem>() {

        @Mock
        public IApplicationContext getApplicationContext() {
            final String solutionPath = ".";
            final String applicationPath = "";
            return new StandaloneApplicationContext(solutionPath, applicationPath);
        }
    };
    runtimeCtx = spy(new RuntimeContext("id", mockedSolutionEngine, "solutionName", makeRuntimeData(session), session, null, "processId", urlFactory, makeParameterProviders(session), new ArrayList<String>(), null));
}
Also used : IRuntimeRepository(org.pentaho.platform.api.repository.IRuntimeRepository) ISolutionEngine(org.pentaho.platform.api.engine.ISolutionEngine) IApplicationContext(org.pentaho.platform.api.engine.IApplicationContext) StandaloneApplicationContext(org.pentaho.platform.engine.core.system.StandaloneApplicationContext) IRuntimeContext(org.pentaho.platform.api.engine.IRuntimeContext) RuntimeContext(org.pentaho.platform.engine.services.runtime.RuntimeContext) PentahoSystem(org.pentaho.platform.engine.core.system.PentahoSystem) Mock(mockit.Mock) Before(org.junit.Before)

Aggregations

Mock (mockit.Mock)1 Before (org.junit.Before)1 IApplicationContext (org.pentaho.platform.api.engine.IApplicationContext)1 IRuntimeContext (org.pentaho.platform.api.engine.IRuntimeContext)1 ISolutionEngine (org.pentaho.platform.api.engine.ISolutionEngine)1 IRuntimeRepository (org.pentaho.platform.api.repository.IRuntimeRepository)1 PentahoSystem (org.pentaho.platform.engine.core.system.PentahoSystem)1 StandaloneApplicationContext (org.pentaho.platform.engine.core.system.StandaloneApplicationContext)1 RuntimeContext (org.pentaho.platform.engine.services.runtime.RuntimeContext)1