org.pentaho.di.trans
Class HopTest

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

public class HopTest
extends junit.framework.TestCase

Test class for the use of hops, specifically we want to check the copy and distribute mode.

Author:
Sven Boden

Constructor Summary
HopTest()
           
 
Method Summary
 void checkRows(List<RowMetaAndData> rows1, List<RowMetaAndData> rows2)
          Check the 2 lists comparing the rows in order.
 List<RowMetaAndData> createData()
           
 RowMetaInterface createRowMetaInterface()
           
 void testCopyHops()
          Test case for hop using copy.
 void testDefaultConfiguration()
          Test case for hop use.
 void testDistributeHops()
          Test case for hop use.
 
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

HopTest

public HopTest()
Method Detail

createRowMetaInterface

public RowMetaInterface createRowMetaInterface()

createData

public List<RowMetaAndData> createData()

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.


testCopyHops

public void testCopyHops()
                  throws Exception
Test case for hop using copy. The transformation is as follows: an injector step links to a dummy step, which in turn links to 2 target dummy steps. Both dummy1 and dummy2 should get all rows.

Throws:
Exception

testDefaultConfiguration

public void testDefaultConfiguration()
                              throws Exception
Test case for hop use. The transformation is as follows: an injector step links to a dummy step, which in turn links to 2 target dummy steps. The default in the GUI of spoon is copy mode, but here it seems to be distribute.

Throws:
Exception

testDistributeHops

public void testDistributeHops()
                        throws Exception
Test case for hop use. The transformation is as follows: an injector step links to a dummy step, which in turn links to 2 target dummy steps. This testcase uses distribute mode, so each hop in turn should get a row.

Throws:
Exception