Top Description Constructors Methods
org.easymock

public Class EasyMockExtension

extends Object
implements TestInstancePostProcessor
Class Inheritance
All Implemented Interfaces
org.junit.jupiter.api.extension.TestInstancePostProcessor, org.junit.jupiter.api.extension.Extension
Imports
org.junit.jupiter.api.extension.ExtensionContext, .TestInstancePostProcessor

JUnit 5 replaced the previous org.junit.runner.RunWith annotation (which made use of EasyMockRunner) with the new org.junit.jupiter.api.extension.ExtendWith annotation. @ExtendWith allows for multiple extensions to be mixed and used together. This is only relevant for JUnit 5. This is retrieved from https://stackoverflow.com/a/47243856/2152081 StackOverflow answer provided by https://stackoverflow.com/users/4126968/eee

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
postProcessTestInstance(Object
the instance to post-process; never null
testInstance
,
ExtensionContext
the current extension context; never null
context
)

Implements org.junit.jupiter.api.extension.TestInstancePostProcessor.postProcessTestInstance.

Callback for post-processing the supplied test instance.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

EasyMockExtensionback to summary
public EasyMockExtension()

Method Detail

postProcessTestInstanceback to summary
public void postProcessTestInstance(Object testInstance, ExtensionContext context) throws Exception

Implements org.junit.jupiter.api.extension.TestInstancePostProcessor.postProcessTestInstance.

Doc from org.junit.jupiter.api.extension.TestInstancePostProcessor.postProcessTestInstance.

Callback for post-processing the supplied test instance.

Note

the ExtensionContext supplied to a TestInstancePostProcessor will always return an empty java.util.Optional value from getTestInstance(). A TestInstancePostProcessor should therefore only attempt to process the supplied testInstance.

Parameters
testInstance:Object

the instance to post-process; never null

context:ExtensionContext

the current extension context; never null

Annotations
@Override