Package org.jvnet.hk2.testing.junit
Class HK2TestUtilities
- java.lang.Object
-
- org.jvnet.hk2.testing.junit.HK2TestUtilities
-
public class HK2TestUtilities extends java.lang.Object
These are other useful test utilities that can be used
-
-
Field Summary
Fields Modifier and Type Field Description private static ServiceLocatorFactory
factory
-
Constructor Summary
Constructors Constructor Description HK2TestUtilities()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static ServiceLocator
create(java.lang.String name, ServiceLocator parent, HK2TestModule... modules)
Will create a ServiceLocator after doing test-specific bindings from the TestModulestatic ServiceLocator
create(java.lang.String name, HK2TestModule... modules)
-
-
-
Field Detail
-
factory
private static final ServiceLocatorFactory factory
-
-
Method Detail
-
create
public static ServiceLocator create(java.lang.String name, HK2TestModule... modules)
-
create
public static ServiceLocator create(java.lang.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 nullmodules
- The test modules, that will do test specific bindings. May be null- Returns:
- A service locator with all the test specific bindings bound
-
-