org.pentaho.di.trans.steps.valuemapper
Class ValueMapperTest

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

public class ValueMapperTest
extends junit.framework.TestCase

Test class for the ValueMapper step.

Author:
Sven Boden

Constructor Summary
ValueMapperTest()
           
 
Method Summary
 void checkRows(List<RowMetaAndData> rows1, List<RowMetaAndData> rows2)
          Check the 2 lists comparing the rows in order.
 List<RowMetaAndData> createData()
           
 List<RowMetaAndData> createResultData1()
          Create result data for test case 1.
 List<RowMetaAndData> createResultData2()
          Create result data for test case 2.
 List<RowMetaAndData> createResultData3()
          Create result data for test case 3.
 List<RowMetaAndData> createResultData4()
          Create result data for test case 4.
 List<RowMetaAndData> createResultData5()
          Create result data for test case 5.
 List<RowMetaAndData> createResultData6()
          Create result data for test case 6.
 RowMetaInterface createRowMetaInterface()
           
 RowMetaInterface createRowMetaInterface1()
          Create the meta data for the results of test case 1.
 void testValueMapper1()
          Test case for valuemapper step.
 void testValueMapper2()
          Test case for valuemapper step.
 void testValueMapper3()
          Test case for valuemapper step.
 void testValueMapper4()
          Test case for valuemapper step.
 void testValueMapper5()
          Test case for valuemapper step.
 void testValueMapper6()
          Test case for valuemapper step.
 
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

ValueMapperTest

public ValueMapperTest()
Method Detail

createRowMetaInterface

public RowMetaInterface createRowMetaInterface()

createData

public List<RowMetaAndData> createData()

createRowMetaInterface1

public RowMetaInterface createRowMetaInterface1()
Create the meta data for the results of test case 1.


createResultData1

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


createResultData2

public List<RowMetaAndData> createResultData2()
Create result data for test case 2.


createResultData3

public List<RowMetaAndData> createResultData3()
Create result data for test case 3.


createResultData4

public List<RowMetaAndData> createResultData4()
Create result data for test case 4.


createResultData5

public List<RowMetaAndData> createResultData5()
Create result data for test case 5.


createResultData6

public List<RowMetaAndData> createResultData6()
Create result data for test case 6.


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.


testValueMapper1

public void testValueMapper1()
                      throws Exception
Test case for valuemapper step. Injector step to a valuemapper step to a dummy step. Rows go in and should be mapped accordingly. This test will write the mappings in a new field.

Throws:
Exception

testValueMapper2

public void testValueMapper2()
                      throws Exception
Test case for valuemapper step. Injector step to a valuemapper step to a dummy step. Rows go in and should be mapped accordingly. This test will write the mappings in the same field.

Throws:
Exception

testValueMapper3

public void testValueMapper3()
                      throws Exception
Test case for valuemapper step. Injector step to a valuemapper step to a dummy step. Rows go in and should be mapped accordingly. This test will explicitly test the empty field processing.

Throws:
Exception

testValueMapper4

public void testValueMapper4()
                      throws Exception
Test case for valuemapper step. Injector step to a valuemapper step to a dummy step. Rows go in and should be mapped accordingly. This test will write the mappings in a new field, using a non matching default.

Throws:
Exception

testValueMapper5

public void testValueMapper5()
                      throws Exception
Test case for valuemapper step. Injector step to a valuemapper step to a dummy step. Rows go in and should be mapped accordingly. This test will write the mappings in the same field. Using a non matching default.

Throws:
Exception

testValueMapper6

public void testValueMapper6()
                      throws Exception
Test case for valuemapper step. Injector step to a valuemapper step to a dummy step. Rows go in and should be mapped accordingly. This test will explicitly test the empty field processing. using a non matching default.

Throws:
Exception