Package com.avanza.astrix.test
Interface TestApi.TestContext
-
- Enclosing interface:
- TestApi
public static interface TestApi.TestContext
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description <T> TgetBean(Class<T> beanType)Each TestContext has an AstrixContext (which is managed by the associated AstrixRule).<T> TgetBean(Class<T> beanType, String qualifier)seegetBean(Class)<T extends TestApi>
TgetTestApi(Class<T> testApi)Returns a TestApi instance from the given TestContext.<T> voidregisterService(Class<T> serviceBean, String qualifier, T serviceImpl)<T> voidregisterService(Class<T> serviceBean, T serviceImpl)Registers a given Service in the associated TestContext.
-
-
-
Method Detail
-
registerService
<T> void registerService(Class<T> serviceBean, T serviceImpl)
Registers a given Service in the associated TestContext. The service will be registered in the service registry associated with the given TestContext.- Parameters:
serviceBean-serviceImpl-
-
registerService
<T> void registerService(Class<T> serviceBean, String qualifier, T serviceImpl)
- Parameters:
serviceBean-qualifier-serviceImpl-
-
getBean
<T> T getBean(Class<T> beanType)
Each TestContext has an AstrixContext (which is managed by the associated AstrixRule). The AstrixContext is shared between all TestApi instances. Beans might be pulled from the AstrixContext using this method.
-
getBean
<T> T getBean(Class<T> beanType, String qualifier)
seegetBean(Class)
-
-