Class IpsTestSuiteJUnitAdapter

java.lang.Object
junit.framework.TestSuite
org.faktorips.runtime.test.IpsTestSuiteJUnitAdapter
All Implemented Interfaces:
junit.framework.Test

public class IpsTestSuiteJUnitAdapter extends junit.framework.TestSuite
Adapter between JUnit 3/4 test suites and Faktor-IPS test suites.

Code example to show how the adapter can be integrated:

 
 import org.faktorips.runtime.test.IpsTestSuiteJUnitAdapter;
 import junit.framework.Test;
 
 public class HomeInsuranceJUnitTest extends IpsTestSuiteJUnitAdapter {
      public static Test suite() {
          IRuntimeRepository repository = [...];
          return createJUnitTest(repository.getIpsTest(""));
      }
 }
 
 
  • Constructor Details

    • IpsTestSuiteJUnitAdapter

      public IpsTestSuiteJUnitAdapter()
    • IpsTestSuiteJUnitAdapter

      public IpsTestSuiteJUnitAdapter(String name)
    • IpsTestSuiteJUnitAdapter

      public IpsTestSuiteJUnitAdapter(IpsTestSuite suite)
  • Method Details

    • testDummy

      public void testDummy()
      Dummy test method to avoid a warning when running all JUnit tests in this project. Without this method, Eclpise's JUnit support would create a warning that his suite hasn't got any tests.
    • createJUnitTest

      public static junit.framework.Test createJUnitTest(IpsTest2 ipsTest)
      Creates an adapter test for the given ips test.