package net.ranides.assira.junit;

import java.lang.annotation.Retention;
import java.lang.annotation.Target;

import static java.lang.annotation.ElementType.FIELD;
import static java.lang.annotation.RetentionPolicy.RUNTIME;

/**
 * This annotation is used by Tester to inject objects.
 * TestContractRunner scans every tester for annotated fields and assigns to them value with specified name.
 *
 * You can configure named resources inside TestContractRunner by using {@code param} method.
 *
 * Please note, that you can inject currently executed TestContractRunner into tester,
 * by simply annotating field of type TestContractRunner, without providing any name for TestResource annotation.
 */
@Retention(RUNTIME)
@Target({FIELD})
public @interface TestResource {

    /**
     * Name of resource to inject
     * @return string
     */
    String name() default "";

}