- Test runner supporting new "DelayedInjection" annotation: such fields are only initialized with instantiation right before the first time they're used in tests, allowing to set up mock behavior beforehand
17 lines
425 B
Java
17 lines
425 B
Java
package fr.xephi.authme;
|
|
|
|
import java.lang.annotation.ElementType;
|
|
import java.lang.annotation.Retention;
|
|
import java.lang.annotation.RetentionPolicy;
|
|
import java.lang.annotation.Target;
|
|
|
|
/**
|
|
* Marks fields to be instantiated right before a method is invoked on them for the first time.
|
|
*
|
|
* @see DelayedInjectionRunner
|
|
*/
|
|
@Target(ElementType.FIELD)
|
|
@Retention(RetentionPolicy.RUNTIME)
|
|
public @interface DelayedInject {
|
|
}
|