org.pentaho.di.trans.steps.scriptvalues_mod
Class JavaScriptSpecialTest

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by org.pentaho.di.trans.steps.scriptvalues_mod.JavaScriptSpecialTest
All Implemented Interfaces:
junit.framework.Test

public class JavaScriptSpecialTest
extends junit.framework.TestCase

Test class for the Modified Javascript step for the special functions. Things tested: LuhnCheck().

Author:
Sven Boden

Constructor Summary
JavaScriptSpecialTest()
           
 
Method Summary
 void checkRows(List<RowMetaAndData> rows1, List<RowMetaAndData> rows2)
          Check the 2 lists comparing the rows in order.
 List<RowMetaAndData> createData1()
           
 List<RowMetaAndData> createData3()
           
 List<RowMetaAndData> createResultData1()
          Create result data for test case 1.
 List<RowMetaAndData> createResultData2()
           
 List<RowMetaAndData> createResultData3()
           
 RowMetaInterface createRowMetaInterface1()
           
 RowMetaInterface createRowMetaInterface3()
           
 RowMetaInterface createRowMetaInterface4()
           
 RowMetaInterface createRowMetaInterfaceResult1()
          Create the meta data for the results (ltrim/rtrim/trim).
 void testJavaInterface()
          Test case for JavaScript/Java/JavaScript interfacing.
 void testLuhnCheck()
          Test case for javascript functionality: ltrim(), rtrim(), trim().
 void testTransStatus()
          Test case for javascript functionality: trans_Status and SKIP_TRANSFORMATION.
 
Methods inherited from class junit.framework.TestCase
countTestCases, getName, run, run, runBare, setName, toString
 
Methods inherited from class junit.framework.Assert
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail, failNotEquals, failNotSame, failSame, format
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

JavaScriptSpecialTest

public JavaScriptSpecialTest()
Method Detail

createRowMetaInterface1

public RowMetaInterface createRowMetaInterface1()

createData1

public List<RowMetaAndData> createData1()

createRowMetaInterfaceResult1

public RowMetaInterface createRowMetaInterfaceResult1()
Create the meta data for the results (ltrim/rtrim/trim).


createResultData1

public List<RowMetaAndData> createResultData1()
Create result data for test case 1.


createResultData2

public List<RowMetaAndData> createResultData2()

createRowMetaInterface3

public RowMetaInterface createRowMetaInterface3()

createData3

public List<RowMetaAndData> createData3()

createRowMetaInterface4

public RowMetaInterface createRowMetaInterface4()

createResultData3

public List<RowMetaAndData> createResultData3()

checkRows

public void checkRows(List<RowMetaAndData> rows1,
                      List<RowMetaAndData> rows2)
Check the 2 lists comparing the rows in order. If they are not the same fail the test.


testLuhnCheck

public void testLuhnCheck()
                   throws Exception
Test case for javascript functionality: ltrim(), rtrim(), trim().

Throws:
Exception

testTransStatus

public void testTransStatus()
                     throws Exception
Test case for javascript functionality: trans_Status and SKIP_TRANSFORMATION. Regression test case for JIRA defect PDI-364.

Throws:
Exception

testJavaInterface

public void testJavaInterface()
                       throws Exception
Test case for JavaScript/Java/JavaScript interfacing.

Throws:
Exception