use of org.pentaho.platform.engine.core.system.StandaloneSession in project pentaho-platform by pentaho.
the class JFreeReportIT method testJFreeReportParameterPage1.
/*
* public void testJFreeReportMondrian() { startTest(); SimpleParameterProvider parameterProvider = new
* SimpleParameterProvider(); parameterProvider.setParameter("type", "html"); //$NON-NLS-1$ //$NON-NLS-2$ OutputStream
* outputStream = getOutputStream("ReportingTest.testJFreeReportMondrian", ".html"); //$NON-NLS-1$ //$NON-NLS-2$
* SimpleOutputHandler outputHandler = new SimpleOutputHandler(outputStream, true); StandaloneSession session = new
* StandaloneSession(Messages.getInstance().getString("BaseTest.DEBUG_JUNIT_SESSION")); //$NON-NLS-1$ IRuntimeContext
* context = run( "/test/reporting/MDX_report.xaction", null, false, parameterProvider, outputHandler, session);
* //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ assertEquals(
* Messages.getInstance().getString("BaseTest.USER_RUNNING_ACTION_SEQUENCE"), IRuntimeContext.RUNTIME_STATUS_SUCCESS,
* context.getStatus()); //$NON-NLS-1$ // TODO need some validation of success finishTest(); }
*/
public void testJFreeReportParameterPage1() {
startTest();
SimpleParameterProvider parameterProvider = new SimpleParameterProvider();
// $NON-NLS-1$ //$NON-NLS-2$
parameterProvider.setParameter("type", "html");
// $NON-NLS-1$ //$NON-NLS-2$
OutputStream outputStream = getOutputStream("ReportingTest.testJFreeReportParameterPage", ".html");
SimpleOutputHandler outputHandler = new SimpleOutputHandler(outputStream, true);
StandaloneSession session = // $NON-NLS-1$
new StandaloneSession(Messages.getInstance().getString("BaseTest.DEBUG_JUNIT_SESSION"));
IRuntimeContext context = run("/test/reporting/jfreereport-reports-test-param.xaction", null, false, parameterProvider, outputHandler, // $NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
session);
assertEquals(Messages.getInstance().getString("BaseTest.USER_RUNNING_ACTION_SEQUENCE"), IRuntimeContext.RUNTIME_STATUS_SUCCESS, // $NON-NLS-1$
context.getStatus());
// TODO need some validation of success
finishTest();
}
use of org.pentaho.platform.engine.core.system.StandaloneSession in project pentaho-platform by pentaho.
the class KettleIT method setUp.
@Override
public void setUp() {
super.setUp();
startTest();
parameterProvider = new SimpleParameterProvider();
parameterProvider.setParameter("type", "html");
OutputStream outputStream = getOutputStream("KettleTest.testKettle", ".html");
assertNotNull(outputStream);
outputHandler = new SimpleOutputHandler(outputStream, true);
assertNotNull(outputHandler);
session = new StandaloneSession("test");
assertNotNull(session);
}
use of org.pentaho.platform.engine.core.system.StandaloneSession in project pentaho-platform by pentaho.
the class MetadataIT method __testLookup.
public void __testLookup() {
startTest();
// $NON-NLS-1$
IPentahoUrlFactory urlFactory = new SimpleUrlFactory("");
PMDUIComponent component = new PMDUIComponent(urlFactory, new ArrayList());
StandaloneSession session = // $NON-NLS-1$
new StandaloneSession(Messages.getInstance().getString("BaseTest.DEBUG_JUNIT_SESSION"));
component.validate(session, null);
component.setAction(PMDUIComponent.ACTION_LOOKUP);
// $NON-NLS-1$
component.setDomainName("test");
// $NON-NLS-1$
component.setModelId("Orders");
// $NON-NLS-1$
component.setColumnId("BC_CUSTOMERS_CUSTOMERNAME");
Document doc = component.getXmlContent();
System.out.println(doc.asXML());
try {
// $NON-NLS-1$//$NON-NLS-2$
OutputStream outputStream = getOutputStream("MetadataTest.testLoadView", ".xml");
outputStream.write(doc.asXML().getBytes());
} catch (IOException e) {
// ignore
}
finishTest();
}
use of org.pentaho.platform.engine.core.system.StandaloneSession in project pentaho-platform by pentaho.
the class MetadataIT method testViewList.
public void testViewList() {
startTest();
// $NON-NLS-1$
IPentahoUrlFactory urlFactory = new SimpleUrlFactory("");
PMDUIComponent component = new PMDUIComponent(urlFactory, new ArrayList());
StandaloneSession session = // $NON-NLS-1$
new StandaloneSession(Messages.getInstance().getString("BaseTest.DEBUG_JUNIT_SESSION"));
component.validate(session, null);
component.setAction(PMDUIComponent.ACTION_LIST_MODELS);
Document doc = component.getXmlContent();
System.out.println(doc.asXML());
try {
// $NON-NLS-1$//$NON-NLS-2$
OutputStream outputStream = getOutputStream("MetadataTest.testViewList", ".xml");
outputStream.write(doc.asXML().getBytes());
} catch (IOException e) {
// ignore
}
finishTest();
}
use of org.pentaho.platform.engine.core.system.StandaloneSession in project pentaho-platform by pentaho.
the class DefaultPluginManagerIT method init0.
@Before
public void init0() {
PentahoSystem.clearObjectFactory();
microPlatform = new MicroPlatform(getSolutionPath());
microPlatform.define(ISolutionEngine.class, SolutionEngine.class);
microPlatform.define(IPluginProvider.class, SystemPathXmlPluginProvider.class);
microPlatform.define(IServiceManager.class, DefaultServiceManager.class, Scope.GLOBAL);
microPlatform.define(IUnifiedRepository.class, FileSystemBackedUnifiedRepository.class, Scope.GLOBAL);
FileSystemBackedUnifiedRepository repo = (FileSystemBackedUnifiedRepository) PentahoSystem.get(IUnifiedRepository.class);
repo.setRootDir(new File(getSolutionPath()));
session = new StandaloneSession();
pluginManager = new DefaultPluginManager();
}
Aggregations