Package com.tngtech.jgiven.junit
Class JGivenMethodRule
- java.lang.Object
-
- com.tngtech.jgiven.junit.JGivenMethodRule
-
- All Implemented Interfaces:
org.junit.rules.MethodRule
- Direct Known Subclasses:
StandaloneScenarioRule
public class JGivenMethodRule extends java.lang.Object implements org.junit.rules.MethodRule
JUnit Rule to enable JGiven in a JUnit test- Since:
- 0.13.0
-
-
Field Summary
Fields Modifier and Type Field Description protected com.tngtech.jgiven.impl.ScenarioBase
scenario
-
Constructor Summary
Constructors Constructor Description JGivenMethodRule()
JGivenMethodRule(com.tngtech.jgiven.impl.ScenarioBase scenario)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.junit.runners.model.Statement
apply(org.junit.runners.model.Statement base, org.junit.runners.model.FrameworkMethod method, java.lang.Object target)
protected void
failed(java.lang.Throwable e)
com.tngtech.jgiven.impl.ScenarioBase
getScenario()
Returns the ScenarioBase instance of this ruleprotected void
starting(org.junit.runners.model.Statement base, org.junit.runners.model.FrameworkMethod testMethod, java.lang.Object target)
protected void
succeeded()
-
-
-
Method Detail
-
getScenario
public com.tngtech.jgiven.impl.ScenarioBase getScenario()
Returns the ScenarioBase instance of this rule
-
apply
public org.junit.runners.model.Statement apply(org.junit.runners.model.Statement base, org.junit.runners.model.FrameworkMethod method, java.lang.Object target)
- Specified by:
apply
in interfaceorg.junit.rules.MethodRule
-
succeeded
protected void succeeded() throws java.lang.Throwable
- Throws:
java.lang.Throwable
-
failed
protected void failed(java.lang.Throwable e) throws java.lang.Throwable
- Throws:
java.lang.Throwable
-
starting
protected void starting(org.junit.runners.model.Statement base, org.junit.runners.model.FrameworkMethod testMethod, java.lang.Object target)
-
-