org.pentaho.di.trans.steps.unique
Class UniqueRowsTest

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

public class UniqueRowsTest
extends junit.framework.TestCase

Test class for the Unique step. TODO: These tests only cover the case (in)sensitive comparison of a single key field.

Author:
Daniel Einspanjer

Field Summary
static int MAX_COUNT
           
 
Constructor Summary
UniqueRowsTest()
           
 
Method Summary
 void checkRows(List<RowMetaAndData> rows1, List<RowMetaAndData> rows2)
          Check the 2 lists comparing the rows in order.
 List<RowMetaAndData> createData()
           
 List<RowMetaAndData> createResultDataCaseInsensitiveNoPreviousSort()
           
 List<RowMetaAndData> createResultDataCaseSensitiveNoPreviousSort()
           
 List<RowMetaAndData> createResultDataSortCaseInsensitiveUniqueCaseInsensitive()
           
 List<RowMetaAndData> createResultDataSortCaseInsensitiveUniqueCaseSensitive()
           
 List<RowMetaAndData> createResultDataSortCaseSensitiveUniqueCaseInsensitive()
           
 List<RowMetaAndData> createResultDataSortCaseSensitiveUniqueCaseSensitive()
           
 RowMetaInterface createRowMetaInterface()
           
 void testCaseInsensitiveNoPreviousSort()
           
 void testCaseSensitiveNoPreviousSort()
           
 void testSortCaseInsensitiveUniqueCaseInsensitive()
           
 void testSortCaseInsensitiveUniqueCaseSensitive()
           
 void testSortCaseSensitiveUniqueCaseInsensitive()
           
 void testSortCaseSensitiveUniqueCaseSensitive()
           
 
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
 

Field Detail

MAX_COUNT

public static int MAX_COUNT
Constructor Detail

UniqueRowsTest

public UniqueRowsTest()
Method Detail

createRowMetaInterface

public RowMetaInterface createRowMetaInterface()

createData

public List<RowMetaAndData> createData()

createResultDataCaseSensitiveNoPreviousSort

public List<RowMetaAndData> createResultDataCaseSensitiveNoPreviousSort()

createResultDataCaseInsensitiveNoPreviousSort

public List<RowMetaAndData> createResultDataCaseInsensitiveNoPreviousSort()

createResultDataSortCaseSensitiveUniqueCaseSensitive

public List<RowMetaAndData> createResultDataSortCaseSensitiveUniqueCaseSensitive()

createResultDataSortCaseSensitiveUniqueCaseInsensitive

public List<RowMetaAndData> createResultDataSortCaseSensitiveUniqueCaseInsensitive()

createResultDataSortCaseInsensitiveUniqueCaseSensitive

public List<RowMetaAndData> createResultDataSortCaseInsensitiveUniqueCaseSensitive()

createResultDataSortCaseInsensitiveUniqueCaseInsensitive

public List<RowMetaAndData> createResultDataSortCaseInsensitiveUniqueCaseInsensitive()

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.


testCaseSensitiveNoPreviousSort

public void testCaseSensitiveNoPreviousSort()
                                     throws Exception
Throws:
Exception

testCaseInsensitiveNoPreviousSort

public void testCaseInsensitiveNoPreviousSort()
                                       throws Exception
Throws:
Exception

testSortCaseSensitiveUniqueCaseSensitive

public void testSortCaseSensitiveUniqueCaseSensitive()
                                              throws Exception
Throws:
Exception

testSortCaseSensitiveUniqueCaseInsensitive

public void testSortCaseSensitiveUniqueCaseInsensitive()
                                                throws Exception
Throws:
Exception

testSortCaseInsensitiveUniqueCaseSensitive

public void testSortCaseInsensitiveUniqueCaseSensitive()
                                                throws Exception
Throws:
Exception

testSortCaseInsensitiveUniqueCaseInsensitive

public void testSortCaseInsensitiveUniqueCaseInsensitive()
                                                  throws Exception
Throws:
Exception