org.pentaho.di.repository
Class RepositoryUnitTest

java.lang.Object
  extended by junit.framework.TestSuite
      extended by org.pentaho.di.repository.RepositoryUnitTest
All Implemented Interfaces:
junit.framework.Test

public class RepositoryUnitTest
extends junit.framework.TestSuite

This class serves as a collection of tests for transformation steps and other Kettle capabilities that need to interact with a database repository. It offers performance benefits over putting repo-related tests into the individual unit test classes, as it is a test suite that establishes a connection to the test database repository once before all internal test cases are executed, and disconnects after all tests have been run.

Author:
Matt Burgess

Constructor Summary
RepositoryUnitTest()
           
 
Method Summary
 void setUp()
          This method is called once before each test case is executed.
static void setUpBeforeClass()
          setUpBeforeClass is a method called once before all tests are run.
 void tearDown()
          This method is called once after each test case is executed.
static void tearDownAfterClass()
          This method is called once after all test cases have been run, and is used to perform suite-level cleanup such as disconnecting from the test repository.
 void testGetXMLDataMetaSaveAndReadRep()
          This test is to ensure that the metadata for the GetXMLData step is preserved when saving to a repository.
 
Methods inherited from class junit.framework.TestSuite
addTest, addTestSuite, countTestCases, createTest, getName, getTestConstructor, run, runTest, setName, testAt, testCount, tests, toString, warning
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RepositoryUnitTest

public RepositoryUnitTest()
Method Detail

setUpBeforeClass

public static void setUpBeforeClass()
                             throws Exception
setUpBeforeClass is a method called once before all tests are run. For this test suite, it is used to set up and connect to the test database repository, to increase performance and reduce unnecessary initialization, connects/disconnects from each test case. If repository initialization and/or connection/disconnection

Throws:
Exception

tearDownAfterClass

public static void tearDownAfterClass()
                               throws Exception
This method is called once after all test cases have been run, and is used to perform suite-level cleanup such as disconnecting from the test repository.

Throws:
Exception

setUp

public void setUp()
           throws Exception
This method is called once before each test case is executed.

Throws:
Exception

tearDown

public void tearDown()
              throws Exception
This method is called once after each test case is executed.

Throws:
Exception

testGetXMLDataMetaSaveAndReadRep

public void testGetXMLDataMetaSaveAndReadRep()
This test is to ensure that the metadata for the GetXMLData step is preserved when saving to a repository. The test creates a GetXMLData step and saves it to the repository. Then the local data is changed and the step is read back in from the repository. It is then asserted that the field value(s) are equal to what was saved. Test method for GetXMLDataMeta.readRep(org.pentaho.di.repository.Repository, org.pentaho.di.repository.ObjectId, java.util.List, java.util.Map). Test method for org.pentaho.di.trans.steps.getxmldata.GetXMLDataMeta#saveRep(org.pentaho.di.repository.Repository, org.pentaho.di.repository.ObjectId, jorg.pentaho.di.repository.ObjectId).