Class HK2TestUtilities

java.lang.Object
org.jvnet.hk2.testing.junit.HK2TestUtilities

public class HK2TestUtilities extends Object
These are other useful test utilities that can be used
  • Field Details

  • Constructor Details

    • HK2TestUtilities

      public HK2TestUtilities()
  • Method Details

    • create

      public static ServiceLocator create(String name, HK2TestModule... modules)
    • create

      public static ServiceLocator create(String name, ServiceLocator parent, HK2TestModule... modules)
      Will create a ServiceLocator after doing test-specific bindings from the TestModule
      Parameters:
      name - The name of the service locator to create. Should be unique per test, otherwise this method will fail.
      parent - The parent locator this one should have. May be null
      modules - The test modules, that will do test specific bindings. May be null
      Returns:
      A service locator with all the test specific bindings bound