-
Notifications
You must be signed in to change notification settings - Fork 99
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
reading of annotation not takes the executed test class into account …
…and not the class where the test method is declared (fixes #171)
- Loading branch information
Jan Schäfer
committed
Dec 21, 2015
1 parent
efd0652
commit 94ca713
Showing
14 changed files
with
63 additions
and
22 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
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 |
---|---|---|
@@ -1 +1 @@ | ||
version=0.10.0-SNAPSHOT | ||
version=0.10.0 |
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
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
22 changes: 22 additions & 0 deletions
22
...src/test/java/com/tngtech/jgiven/junit/tags/AbstractScenarioForTestingTagInheritance.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,22 @@ | ||
package com.tngtech.jgiven.junit.tags; | ||
|
||
import static org.assertj.core.api.Assertions.assertThat; | ||
|
||
import java.util.Arrays; | ||
import java.util.List; | ||
|
||
import org.junit.Test; | ||
|
||
import com.tngtech.jgiven.junit.ScenarioTest; | ||
|
||
public abstract class AbstractScenarioForTestingTagInheritance<G, W, T> extends ScenarioTest<G, W, T> { | ||
|
||
@Test | ||
public void ensure_all_tags_are_found() throws Throwable { | ||
getScenario().finished(); | ||
|
||
List<String> tagIds = getScenario().getModel().getLastScenarioModel().getTagIds(); | ||
assertThat( tagIds ).containsAll( Arrays.asList( "TestTag" ) ); | ||
|
||
} | ||
} |
9 changes: 9 additions & 0 deletions
9
...-junit/src/test/java/com/tngtech/jgiven/junit/tags/ClassImplementingAbstractScenario.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,9 @@ | ||
package com.tngtech.jgiven.junit.tags; | ||
|
||
@TestTag | ||
public class ClassImplementingAbstractScenario | ||
extends | ||
AbstractScenarioForTestingTagInheritance<ClassImplementingAbstractScenario.GivenStep<?>, ClassImplementingAbstractScenario.GivenStep<?>, ClassImplementingAbstractScenario.GivenStep<?>> { | ||
|
||
public static class GivenStep<T> {} | ||
} |
14 changes: 14 additions & 0 deletions
14
jgiven-junit/src/test/java/com/tngtech/jgiven/junit/tags/TestTag.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,14 @@ | ||
package com.tngtech.jgiven.junit.tags; | ||
|
||
import java.lang.annotation.Inherited; | ||
import java.lang.annotation.Retention; | ||
import java.lang.annotation.RetentionPolicy; | ||
|
||
import com.tngtech.jgiven.annotation.IsTag; | ||
|
||
@IsTag(name = "Security") | ||
@Retention(RetentionPolicy.RUNTIME) | ||
@Inherited | ||
public @interface TestTag { | ||
|
||
} |
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