Created
September 13, 2018 16:18
-
-
Save dmcg/c2dfd1b723477dbba0715c5c716a9b80 to your computer and use it in GitHub Desktop.
JUnit 5 JMock extension
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
| import org.jmock.integration.junit4.JUnit4Mockery | |
| import org.junit.jupiter.api.extension.AfterEachCallback | |
| import org.junit.jupiter.api.extension.ExtensionContext | |
| class MockeryExtension : JUnit4Mockery(), AfterEachCallback { | |
| override fun afterEach(context: ExtensionContext) { | |
| assertIsSatisfied() | |
| } | |
| } | |
| // Use as | |
| @RegisterExtension @JvmField val mockery = MockeryExtension() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment