Class ConfigApiTest


  • public abstract class ConfigApiTest
    extends org.jvnet.hk2.testing.junit.HK2Runner
    Super class for all config-api related tests, give access to a configured habitat
    • Field Detail

      • logger

        public static final Logger logger
    • Constructor Detail

      • ConfigApiTest

        public ConfigApiTest()
    • Method Detail

      • adminSubject

        protected Subject adminSubject()
      • getFileName

        public String getFileName()
        Returns the file name without the .xml extension to load the test configuration from. By default, it's the name of the TestClass.
        Returns:
        the configuration file name
      • getHabitat

        public org.glassfish.hk2.api.ServiceLocator getHabitat()
        Returns a configured Habitat with the configuration.
        Returns:
        a configured Habitat
      • getBaseServiceLocator

        public org.glassfish.hk2.api.ServiceLocator getBaseServiceLocator()
      • getDocument

        public DomDocument getDocument​(org.glassfish.hk2.api.ServiceLocator habitat)
        Override it when needed, see config-api/ConfigApiTest.java for example.
      • decorate

        public void decorate​(org.glassfish.hk2.api.ServiceLocator habitat)