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

com.thoughtworks.gauge.BeforeSpec Maven / Gradle / Ivy

There is a newer version: 0.11.1
Show newest version
/*----------------------------------------------------------------
 *  Copyright (c) ThoughtWorks, Inc.
 *  Licensed under the Apache License, Version 2.0
 *  See LICENSE.txt in the project root for license information.
 *----------------------------------------------------------------*/
package com.thoughtworks.gauge;

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

/**
 * Methods annotated with this hook, execute before every Specification execution completes.
 * The specification can be filtered by passing additional attributes.
 * 

If there is more than one method annotated with @BeforeSpec, the order of execution is as follows: *

    *
  • Hooks which are not filtered by tags. *
  • Hooks filtered by tags. *
* If there is more than one hook of these categories, they are executed in alphabetical order based on method names. *

*/ @Target(ElementType.METHOD) @Retention(RetentionPolicy.RUNTIME) public @interface BeforeSpec { /** * @return Array of tags to filter which specifications the hook runs before. */ String[] tags() default {}; /** * @return OR: if hook should run for a specification containing any of the tags provided * AND: if hook should run for a specification containing all of the tags provided * Default is AND */ Operator tagAggregation() default Operator.AND; }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy