-
Notifications
You must be signed in to change notification settings - Fork 98
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Introduce @DoNotIntercept annotation (fixes #103)
- Loading branch information
Jan Schäfer
committed
Sep 11, 2015
1 parent
80f3624
commit 49f723f
Showing
7 changed files
with
86 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
jgiven-core/src/main/java/com/tngtech/jgiven/annotation/DoNotIntercept.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package com.tngtech.jgiven.annotation; | ||
|
||
import java.lang.annotation.*; | ||
|
||
/** | ||
* Methods of stages classes annotated with this annotation will not be intercepted by JGiven. | ||
* <p> | ||
* This is useful for technical helper methods that have to be called even if a previous | ||
* step method has failed. Normally, JGiven will skip all step methods following a failed step, | ||
* including methods with the {@link com.tngtech.jgiven.annotation.Hidden} annotation. | ||
* <p> | ||
* Note that methods annotated with this annotation will not appear in the report. | ||
* <p> | ||
* You should write technical helper methods in camelCase so that the name already indicates that | ||
* the method does not appear in the report. | ||
* <p> | ||
* @see com.tngtech.jgiven.annotation.Hidden | ||
* @since 0.8.2 | ||
*/ | ||
@Documented | ||
@Retention( RetentionPolicy.RUNTIME ) | ||
@Target( ElementType.METHOD ) | ||
public @interface DoNotIntercept { | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters