Class HK2TestUtilities


  • public class HK2TestUtilities
    extends java.lang.Object
    These are other useful test utilities that can be used
    • Constructor Detail

      • HK2TestUtilities

        public HK2TestUtilities()
    • Method Detail

      • 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 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