Examples of IRuntimeContext


Examples of org.pentaho.platform.api.engine.IRuntimeContext

    finishTest();
  }

  public void testResultSetWithoutColumnHeader() {
    startTest();
    IRuntimeContext context = run( "/test/rules/ResultSetTest_without_columnheader.xaction" ); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
    assertEquals(
        Messages.getInstance().getString( "BaseTest.USER_RUNNING_ACTION_SEQUENCE" ), IRuntimeContext.RUNTIME_STATUS_FAILURE, context.getStatus() ); //$NON-NLS-1$
    finishTest();
  }
View Full Code Here

Examples of org.pentaho.platform.api.engine.IRuntimeContext

    finishTest();
  }

  public void testResultSetWithoutRowValue() {
    startTest();
    IRuntimeContext context = run( "/test/rules/ResultSetTest_without_rowvalue.xaction" ); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
    assertEquals(
        Messages.getInstance().getString( "BaseTest.USER_RUNNING_ACTION_SEQUENCE" ), IRuntimeContext.RUNTIME_STATUS_FAILURE, context.getStatus() ); //$NON-NLS-1$
    finishTest();
  }
View Full Code Here

Examples of org.pentaho.platform.api.engine.IRuntimeContext

    finishTest();
  }

  public void testResultSet_NullColumnHeader() {
    startTest();
    IRuntimeContext context = run( "/test/rules/ResultSetTest_NullColumnHeader.xaction" ); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
    assertEquals(
        Messages.getInstance().getString( "BaseTest.USER_RUNNING_ACTION_SEQUENCE" ), IRuntimeContext.RUNTIME_STATUS_FAILURE, context.getStatus() ); //$NON-NLS-1$
    finishTest();
  }
View Full Code Here

Examples of org.pentaho.platform.api.engine.IRuntimeContext

    finishTest();
  }

  public void testResultSetTestWithDifferentDataTypes() {
    startTest();
    IRuntimeContext context = run( "/test/rules/ResultSetTestWithDifferentDataTypes.xaction" ); //$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$
    finishTest();
  }
View Full Code Here

Examples of org.pentaho.platform.api.engine.IRuntimeContext

    super.tearDown();
  }

  public void testKettleSuccessResult() {
    assertNotNull( session );
    IRuntimeContext context =
      run( "/test/etl/SampleTransformation.xaction", null, false, parameterProvider, outputHandler, session );
    assertEquals( IRuntimeContext.RUNTIME_STATUS_SUCCESS, context.getStatus() );

    assertSuccessResult( context, new Object[][] {
      { "Central", "Sales", "District Manager", "Hello, District Manager" },
      { "Central", "Sales", "Senior Sales Rep", "Hello, Senior Sales Rep" } } );
  }
View Full Code Here

Examples of org.pentaho.platform.api.engine.IRuntimeContext

      { "Central", "Sales", "District Manager", "Hello, District Manager" },
      { "Central", "Sales", "Senior Sales Rep", "Hello, Senior Sales Rep" } } );
  }

  public void testKettleValidatationFailure() {
    IRuntimeContext context =
      run( "/test/etl/SampleTransformationInvalid.xaction", null, false, parameterProvider, outputHandler, session );
    assertEquals( IRuntimeContext.RUNTIME_CONTEXT_VALIDATE_FAIL, context.getStatus() );

    assertFailResult( context );
  }
View Full Code Here

Examples of org.pentaho.platform.api.engine.IRuntimeContext

    assertFailResult( context );
  }

  public void testKettleMissingTransform() {
    IRuntimeContext context =
      run( "/test/etl/SampleTransformationMissingKTR.xaction", null, false, parameterProvider, outputHandler, session );
    assertEquals( IRuntimeContext.RUNTIME_STATUS_FAILURE, context.getStatus() );

    assertFailResult( context );
  }
View Full Code Here

Examples of org.pentaho.platform.api.engine.IRuntimeContext

    return SOLUTION_PATH;
  }

  public void testRSExportComponent() {
    startTest();
    IRuntimeContext context = run( "/test/rules/ResultSetExportTest.xaction" ); //$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$

    IActionParameter rtn = context.getOutputParameter( "EXPORTRESULT" ); //$NON-NLS-1$
    assertNotNull( "Result is null", rtn ); //$NON-NLS-1$

    // Check that the data, Eastern, is in the result set
    String content = rtn.getStringValue();
    assertNotNull( "Exported content is null", content ); //$NON-NLS-1$
View Full Code Here

Examples of org.pentaho.platform.api.engine.IRuntimeContext

  /*
   * The test removes the result-set element from the action inputs.
   */
  public void testRSExportComponent_error1() {
    startTest();
    IRuntimeContext context = run( "/test/rules/ResultSetExportTest_error1.xaction" ); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
    assertEquals(
        Messages.getInstance().getString( "BaseTest.USER_RUNNING_ACTION_SEQUENCE" ), IRuntimeContext.RUNTIME_CONTEXT_VALIDATE_FAIL, context.getStatus() ); //$NON-NLS-1$
    finishTest();
  }
View Full Code Here

Examples of org.pentaho.platform.api.engine.IRuntimeContext

   * The test removes outputs and action-outputs. This causes ResultSetExportComponent's validateAction() to return
   * false.
   */
  public void testRSExportComponent_error2() {
    startTest();
    IRuntimeContext context = run( "/test/rules/ResultSetExportTest_error2.xaction" ); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
    assertEquals(
        Messages.getInstance().getString( "BaseTest.USER_RUNNING_ACTION_SEQUENCE" ), IRuntimeContext.RUNTIME_CONTEXT_VALIDATE_FAIL, context.getStatus() ); //$NON-NLS-1$
    finishTest();
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.