All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.tngtech.jgiven.annotation.ScenarioState Maven / Gradle / Ivy

There is a newer version: 1.3.1
Show newest version
package com.tngtech.jgiven.annotation;

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

/**
 * Marks fields to be read and/or written by a scenario stage.
 */
@Documented
@Retention( RetentionPolicy.RUNTIME )
@Target( ElementType.FIELD )
public @interface ScenarioState {
    Resolution resolution() default Resolution.AUTO;

    public enum Resolution {
        TYPE, NAME, AUTO;
    }

    /**
     * Marks this state as required for the stage. If in this case the state isn't provided, a
     * {@code JGivenMissingRequiredScenarioStateException} will be thrown.
     *
     * @since 0.14.0
     */
    boolean required() default false;
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy