use of org.pentaho.platform.api.engine.IRuntimeContext in project pentaho-platform by pentaho.
the class JavaScriptResultSetIT method testRSCompareNotOK2.
public void testRSCompareNotOK2() {
startTest();
IRuntimeContext context = run("/samples/rules/ResultSetCompareTest_error2.xaction");
assertEquals(context.getStatus(), IRuntimeContext.RUNTIME_STATUS_FAILURE);
finishTest();
}
use of org.pentaho.platform.api.engine.IRuntimeContext in project pentaho-platform by pentaho.
the class JavaScriptResultSetIT method testRSCompareNotOK1.
public void testRSCompareNotOK1() {
startTest();
IRuntimeContext context = run("/samples/rules/ResultSetCompareTest_error1.xaction");
assertEquals(IRuntimeContext.RUNTIME_STATUS_SUCCESS, context.getStatus());
finishTest();
}
use of org.pentaho.platform.api.engine.IRuntimeContext in project pentaho-platform by pentaho.
the class JavaScriptResultSetIT method testRSCompareNotOK4.
public void testRSCompareNotOK4() {
startTest();
IRuntimeContext context = run("/samples/rules/ResultSetCompareTest_error4.xaction");
assertEquals(context.getStatus(), IRuntimeContext.RUNTIME_CONTEXT_VALIDATE_FAIL);
finishTest();
}
use of org.pentaho.platform.api.engine.IRuntimeContext in project pentaho-platform by pentaho.
the class ResultSetExportComponentIT method testRSExportComponent.
public void testRSExportComponent() {
startTest();
// $NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
IRuntimeContext context = run("/test/rules/ResultSetExportTest.xaction");
assertEquals(Messages.getInstance().getString("BaseTest.USER_RUNNING_ACTION_SEQUENCE"), IRuntimeContext.RUNTIME_STATUS_SUCCESS, // $NON-NLS-1$
context.getStatus());
// $NON-NLS-1$
IActionParameter rtn = context.getOutputParameter("EXPORTRESULT");
// $NON-NLS-1$
assertNotNull("Result is null", rtn);
// Check that the data, Eastern, is in the result set
String content = rtn.getStringValue();
// $NON-NLS-1$
assertNotNull("Exported content is null", content);
// $NON-NLS-1$
int containsEastern = content.indexOf("Eastern");
// $NON-NLS-1$
assertEquals("ResultSet export does not contain 'Eastern'", Math.max(containsEastern, -1), containsEastern);
finishTest();
}
use of org.pentaho.platform.api.engine.IRuntimeContext in project pentaho-platform by pentaho.
the class ResultSetExportComponentIT method testRSExportComponent_error1.
/*
* The test removes the result-set element from the action inputs.
*/
public void testRSExportComponent_error1() {
startTest();
// $NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
IRuntimeContext context = run("/test/rules/ResultSetExportTest_error1.xaction");
assertEquals(Messages.getInstance().getString("BaseTest.USER_RUNNING_ACTION_SEQUENCE"), IRuntimeContext.RUNTIME_CONTEXT_VALIDATE_FAIL, // $NON-NLS-1$
context.getStatus());
finishTest();
}
Aggregations