Package org.glassfish.tests.utils
Class ConfigApiTest
- java.lang.Object
-
- org.jvnet.hk2.testing.junit.HK2Runner
-
- org.glassfish.tests.utils.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
-
-
Constructor Summary
Constructors Constructor Description ConfigApiTest()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Subject
adminSubject()
void
decorate(org.glassfish.hk2.api.ServiceLocator habitat)
org.glassfish.hk2.api.ServiceLocator
getBaseServiceLocator()
DomDocument
getDocument(org.glassfish.hk2.api.ServiceLocator habitat)
Override it when needed, see config-api/ConfigApiTest.java for example.String
getFileName()
Returns the file name without the .xml extension to load the test configuration from.org.glassfish.hk2.api.ServiceLocator
getHabitat()
Returns a configured Habitat with the configuration.
-
-
-
Field Detail
-
logger
public static final Logger logger
-
-
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)
-
-