Search in sources :

Example 11 with MicroPlatform

use of org.pentaho.test.platform.engine.core.MicroPlatform in project pentaho-platform by pentaho.

the class DefaultPluginPerspectiveManagerIT method init0.

@Before
public void init0() {
    MicroPlatform microPlatform = new MicroPlatform(TestResourceLocation.TEST_RESOURCES + "/PluginManagerTest");
    microPlatform.define(IPluginPerspectiveManager.class, DefaultPluginPerspectiveManager.class);
}
Also used : MicroPlatform(org.pentaho.test.platform.engine.core.MicroPlatform) Before(org.junit.Before)

Example 12 with MicroPlatform

use of org.pentaho.test.platform.engine.core.MicroPlatform in project pentaho-platform by pentaho.

the class PluginAdapterIT method init0.

@SuppressWarnings("deprecation")
@Before
public void init0() {
    microPlatform = new MicroPlatform(TestResourceLocation.TEST_RESOURCES + "/PluginManagerTest/");
    microPlatform.define(ISolutionEngine.class, SolutionEngine.class);
    microPlatform.define(IPluginManager.class, DefaultPluginManager.class);
    microPlatform.define(IPluginProvider.class, SystemPathXmlPluginProvider.class);
    microPlatform.define(IServiceManager.class, DefaultServiceManager.class);
    session = new StandaloneSession();
    pluginAdapter = new PluginAdapter();
    microPlatform.addAdminAction(pluginAdapter);
    microPlatform.init();
}
Also used : PluginAdapter(org.pentaho.platform.plugin.services.pluginmgr.PluginAdapter) StandaloneSession(org.pentaho.platform.engine.core.system.StandaloneSession) MicroPlatform(org.pentaho.test.platform.engine.core.MicroPlatform) Before(org.junit.Before)

Example 13 with MicroPlatform

use of org.pentaho.test.platform.engine.core.MicroPlatform in project pentaho-platform by pentaho.

the class LocalizationServletIT method init.

@BeforeClass
public static void init() throws PlatformInitializationException {
    StandaloneSession session = new StandaloneSession();
    microPlatform = new MicroPlatform(TestResourceLocation.TEST_RESOURCES + "/web-servlet-solution");
    microPlatform.define(ISolutionEngine.class, SolutionEngine.class);
    microPlatform.define(IServiceManager.class, DefaultServiceManager.class, IPentahoDefinableObjectFactory.Scope.GLOBAL);
    microPlatform.define(IPluginResourceLoader.class, PluginResourceLoader.class);
    microPlatform.define(IPluginProvider.class, SystemPathXmlPluginProvider.class);
    microPlatform.define(IPluginManager.class, DefaultPluginManager.class, IPentahoDefinableObjectFactory.Scope.GLOBAL);
    PentahoSystem.setSystemSettingsService(new PathBasedSystemSettings());
    PentahoSessionHolder.setSession(session);
    IPluginManager pluginManager = PentahoSystem.get(IPluginManager.class);
    microPlatform.define(IPluginProvider.class, TestPluginProvider.class);
    microPlatform.start();
    pluginManager.reload(session);
}
Also used : StandaloneSession(org.pentaho.platform.engine.core.system.StandaloneSession) MicroPlatform(org.pentaho.test.platform.engine.core.MicroPlatform) IPluginManager(org.pentaho.platform.api.engine.IPluginManager) PathBasedSystemSettings(org.pentaho.platform.engine.core.system.PathBasedSystemSettings) BeforeClass(org.junit.BeforeClass)

Example 14 with MicroPlatform

use of org.pentaho.test.platform.engine.core.MicroPlatform in project pentaho-platform by pentaho.

the class ServiceLayerTest method beforeClass.

@BeforeClass
public static void beforeClass() throws PlatformInitializationException {
    mp = new MicroPlatform(SOLUTION_PATH);
    mp.setSpringConfig(SOLUTION_PATH + SYSTEM_FOLDER + "/" + DEFAULT_SPRING_CONFIG_FILE_NAME);
    mp.start();
}
Also used : MicroPlatform(org.pentaho.test.platform.engine.core.MicroPlatform) BeforeClass(org.junit.BeforeClass)

Example 15 with MicroPlatform

use of org.pentaho.test.platform.engine.core.MicroPlatform in project pentaho-platform by pentaho.

the class ActionDelegateTest method setUp.

@Before
public void setUp() throws PlatformInitializationException {
    booter = new MicroPlatform(SOLUTION_PATH);
    booter.define(ISolutionEngine.class, SolutionEngine.class, Scope.GLOBAL);
    booter.define(IPluginManager.class, TestPluginManager.class, Scope.GLOBAL);
    booter.define("contentrepo", TestOutputHandler.class, Scope.GLOBAL);
    booter.start();
}
Also used : MicroPlatform(org.pentaho.test.platform.engine.core.MicroPlatform) Before(org.junit.Before)

Aggregations

MicroPlatform (org.pentaho.test.platform.engine.core.MicroPlatform)64 Before (org.junit.Before)40 File (java.io.File)15 Test (org.junit.Test)12 IAuthorizationPolicy (org.pentaho.platform.api.engine.IAuthorizationPolicy)10 IUnifiedRepository (org.pentaho.platform.api.repository2.unified.IUnifiedRepository)10 RepositoryFile (org.pentaho.platform.api.repository2.unified.RepositoryFile)10 RepositoryFileProxyFactory (org.pentaho.platform.repository2.unified.jcr.RepositoryFileProxyFactory)9 StandaloneSession (org.pentaho.platform.engine.core.system.StandaloneSession)8 FileSystemBackedUnifiedRepository (org.pentaho.platform.repository2.unified.fs.FileSystemBackedUnifiedRepository)8 BeforeClass (org.junit.BeforeClass)7 IPluginResourceLoader (org.pentaho.platform.api.engine.IPluginResourceLoader)6 ArrayList (java.util.ArrayList)5 IUserRoleListService (org.pentaho.platform.api.engine.IUserRoleListService)5 SystemSettings (org.pentaho.platform.engine.core.system.SystemSettings)5 PluginResourceLoader (org.pentaho.platform.plugin.services.pluginmgr.PluginResourceLoader)5 Serializable (java.io.Serializable)4 HashMap (java.util.HashMap)4 Matchers.anyString (org.mockito.Matchers.anyString)4 ITenant (org.pentaho.platform.api.mt.ITenant)4