|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object junit.framework.Assert junit.framework.TestCase org.pentaho.di.trans.steps.scriptvalues_mod.JavaScriptStringTest
public class JavaScriptStringTest
Test class for the Modified Javascript step. Things tested: ltrim(), rtrim(), trim(), lpad(), rpad(), upper(), lower(), isNum(), str2num(), num2str(). Still to do: - Use multiple arguments in str2num/num2str (tests only with 1 argument) - Defined error handling
Constructor Summary | |
---|---|
JavaScriptStringTest()
|
Method Summary | |
---|---|
void |
checkRows(List<RowMetaAndData> rows1,
List<RowMetaAndData> rows2)
Check the 2 lists comparing the rows in order. |
List<RowMetaAndData> |
createData1()
|
List<RowMetaAndData> |
createData2()
|
List<RowMetaAndData> |
createData3()
|
List<RowMetaAndData> |
createData4()
|
List<RowMetaAndData> |
createResultData1()
Create result data for test case 1. |
List<RowMetaAndData> |
createResultData2()
Create result data for test case 2: lpad/rpad/upper/lower. |
List<RowMetaAndData> |
createResultData3()
Create result data for test case 3: isNum, num2str, str2num. |
List<RowMetaAndData> |
createResultData4()
Create result data for test case 4: indexOf. |
RowMetaInterface |
createRowMetaInterface1()
|
RowMetaInterface |
createRowMetaInterface2()
|
RowMetaInterface |
createRowMetaInterfaceResult1()
Create the meta data for the results (ltrim/rtrim/trim). |
RowMetaInterface |
createRowMetaInterfaceResult2()
Create the meta data for the results (lpad/rpad/upper/lower). |
RowMetaInterface |
createRowMetaInterfaceResult3()
Create the meta data for the results (isnum/num2str/str2num). |
RowMetaInterface |
createRowMetaInterfaceResult4()
Create the meta data for the results (indexOf). |
void |
testIndexOf()
Test case for javascript functionality: indexOf(). |
void |
testStringsNum()
|
void |
testStringsPadCase()
Test case for javascript functionality: lpad(), rpad(), upper(), lower(). |
void |
testStringsTrim()
Test case for javascript functionality: ltrim(), rtrim(), trim(). |
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 |
---|
public JavaScriptStringTest()
Method Detail |
---|
public RowMetaInterface createRowMetaInterface1()
public List<RowMetaAndData> createData1()
public List<RowMetaAndData> createData2()
public List<RowMetaAndData> createData3()
public RowMetaInterface createRowMetaInterfaceResult1()
public List<RowMetaAndData> createResultData1()
public RowMetaInterface createRowMetaInterfaceResult2()
public RowMetaInterface createRowMetaInterfaceResult3()
public List<RowMetaAndData> createResultData2()
public List<RowMetaAndData> createResultData3()
public RowMetaInterface createRowMetaInterface2()
public List<RowMetaAndData> createData4()
public RowMetaInterface createRowMetaInterfaceResult4()
public List<RowMetaAndData> createResultData4()
public void checkRows(List<RowMetaAndData> rows1, List<RowMetaAndData> rows2)
public void testStringsTrim() throws Exception
Exception
public void testStringsPadCase() throws Exception
Exception
public void testStringsNum() throws Exception
Exception
public void testIndexOf() throws Exception
Exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |