|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.atlassian.webdriver.testing.rule.ClassInjectionRule<P>
public final class ClassInjectionRule<P extends TestedProduct<?>>
Class injection rule. Access via
InjectionRules.
Also implement InjectionContext for convenience in tests.
| Method Summary | ||
|---|---|---|
org.junit.runners.model.Statement |
apply(org.junit.runners.model.Statement base,
org.junit.runner.Description description)
|
|
|
getInstance(Class<T> type)
Get an instance of given type from context. |
|
void |
injectMembers(Object targetInstance)
Execute injection of fields on given targetInstance |
|
void |
injectStatic(Class<?> targetClass)
Execute injection of static fields on given targetClass. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public org.junit.runners.model.Statement apply(org.junit.runners.model.Statement base,
org.junit.runner.Description description)
apply in interface org.junit.rules.TestRule
@Nonnull
public <T> T getInstance(@Nonnull
Class<T> type)
InjectionContext
getInstance in interface InjectionContextT - type paramtype - type of the requested instance
public void injectStatic(@Nonnull
Class<?> targetClass)
InjectionContext
injectStatic in interface InjectionContexttargetClass - class to inject into
public void injectMembers(@Nonnull
Object targetInstance)
InjectionContext
injectMembers in interface InjectionContexttargetInstance - instance to inject into
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||