package cz.moneta.test.harness.annotations;

import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Repeatable;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

import static cz.moneta.test.harness.annotations.Environment.DEV;
import static cz.moneta.test.harness.annotations.Environment.EDU;
import static cz.moneta.test.harness.annotations.Environment.FVE;
import static cz.moneta.test.harness.annotations.Environment.PPE;
import static cz.moneta.test.harness.annotations.Environment.TST1;

/**
 * Disables test in specified environments with a reference to the related issue
 */
@Target(ElementType.METHOD)
@Retention(RetentionPolicy.RUNTIME)
@Documented
@Repeatable(Defects.class)
public @interface Defect {
    /**
     * Reason for test being disabled (ideally) including a reference to a JIRA or TEAMTRACK issue
     */
    String value();

    /**
     * Applicable environments where the test should be effectively disabled (default is all environments)
     */
    Environment[] environments() default {DEV, TST1, PPE, EDU, FVE};
}
