mockspresso-core / com.episode6.hackit.mockspresso.junit / MethodRuleChain

MethodRuleChain

open class MethodRuleChain : MethodRule

Similar to java's org.junit.rules.RuleChain except that it is implemented via a MethodRule instead of a TestRule, and it supports both MethodRules and TestRules (but not ClassRules) Currently this isn't directly tied to Mockspresso, so I may pull this out and move to its own library.

Functions

apply

open fun apply(base: Statement!, method: FrameworkMethod!, target: Any!): Statement!

chainAround

open fun chainAround(enclosedRule: MethodRule!): MethodRuleChain!
open fun chainAround(enclosedRule: TestRule!): MethodRuleChain!

emptyRuleChain

open static fun emptyRuleChain(): MethodRuleChain!

outerRule

open static fun outerRule(outerRule: MethodRule!): MethodRuleChain!
open static fun outerRule(outerRule: TestRule!): MethodRuleChain!