public class ProfileModule extends Object implements Module
SpringApplicationContext.| Constructor and Description |
|---|
ProfileModule() |
| Modifier and Type | Method and Description |
|---|---|
void |
afterInit() |
protected boolean |
checkIfEverythingIsInPlace(Class<?> testClass)
This method checks if the testclass contains a
SpringApplicationContext and a ConfigureProfile. |
protected void |
closeContext()
The context will be closed.
|
protected org.springframework.context.support.GenericApplicationContext |
getCtx() |
protected void |
getProfile(Class<?> testClass)
First it will look if the
ConfigureProfile is present. |
TestListener |
getTestListener() |
void |
init(Properties configuration) |
boolean |
injectBeans(Object testObject)
The injection of beans doesn't happen automatically anymore when you use
SpringBeanByName or SpringBeanByType |
protected void |
setConfigurationAsTypeConfiguration(org.springframework.context.annotation.AnnotationConfigApplicationContext ctx,
ConfigureProfile profile)
How to do the configuration when you use
Configuration |
protected void |
setConfigurationAsTypeSpringApplicationContext(org.springframework.context.support.GenericXmlApplicationContext ctx,
ConfigureProfile profile,
String[] placeContext) |
protected void |
setCtx(org.springframework.context.support.GenericApplicationContext ctx) |
public void init(Properties configuration)
init in interface ModuleModule.init(java.util.Properties)public void afterInit()
afterInit in interface ModuleModule.afterInit()protected void getProfile(Class<?> testClass)
ConfigureProfile is present. This
annotation contains the profilename.
The Profile is set active and all the beans will be loaded.testClass - protected void setConfigurationAsTypeConfiguration(org.springframework.context.annotation.AnnotationConfigApplicationContext ctx,
ConfigureProfile profile)
Configurationctx - profile - protected void setConfigurationAsTypeSpringApplicationContext(org.springframework.context.support.GenericXmlApplicationContext ctx,
ConfigureProfile profile,
String[] placeContext)
public boolean injectBeans(Object testObject)
SpringBeanByName or SpringBeanByTypetestObject - protected boolean checkIfEverythingIsInPlace(Class<?> testClass)
SpringApplicationContext and a ConfigureProfile.testClass - protected void setCtx(org.springframework.context.support.GenericApplicationContext ctx)
ctx - the ctx to setprotected org.springframework.context.support.GenericApplicationContext getCtx()
protected void closeContext()
public TestListener getTestListener()
getTestListener in interface ModuleModule.getTestListener()Copyright © 2016. All Rights Reserved.