Created
November 12, 2018 09:36
-
-
Save dmcg/f59eb3439b3552f7e37550957ab776c2 to your computer and use it in GitHub Desktop.
Kotlin JMock JUnit TestRule
This file contains hidden or 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
| /** | |
| * A [TestRule] as opposed to [MethodRule], without the auto-population gubbins. | |
| */ | |
| class JUnitTestRuleMockery : JUnit4Mockery(), TestRule { | |
| override fun apply(base: Statement, description: Description) = object : Statement() { | |
| override fun evaluate() { | |
| base.evaluate() | |
| assertIsSatisfied() | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment