public class MockPolicyInitializerImpl extends java.lang.Object implements MockPolicyInitializer
MockPolicyInitializer
interface for
mock policies.Constructor and Description |
---|
MockPolicyInitializerImpl(java.lang.Class<?> testClass) |
MockPolicyInitializerImpl(java.lang.Class<? extends PowerMockPolicy>[] mockPolicies) |
Modifier and Type | Method and Description |
---|---|
void |
initialize(java.lang.ClassLoader classLoader)
Initializes the mock policies for a given class loader.
|
boolean |
isPrepared(java.lang.String fullyQualifiedClassName) |
boolean |
needsInitialization() |
void |
refreshPolicies(java.lang.ClassLoader classLoader)
Re executes the
MockPolicy of all the policies for a given class
loader. |
public MockPolicyInitializerImpl(java.lang.Class<? extends PowerMockPolicy>[] mockPolicies)
public MockPolicyInitializerImpl(java.lang.Class<?> testClass)
public boolean isPrepared(java.lang.String fullyQualifiedClassName)
isPrepared
in interface MockPolicyInitializer
true
if the class with the fully-qualified name of
fullyQualifiedClassName
was prepared for testing by
this mock policy initializer.public boolean needsInitialization()
needsInitialization
in interface MockPolicyInitializer
public void initialize(java.lang.ClassLoader classLoader)
MockPolicyInitializer
classLoader
) that you pass in to this method.
Note that if the class-loader is not an instance of
MockClassLoader
this method will return silently.
initialize
in interface MockPolicyInitializer
public void refreshPolicies(java.lang.ClassLoader classLoader)
MockPolicyInitializer
MockPolicy
of all the policies for a given class
loader. This method must be called after a call to
MockPolicyInitializer.initialize(ClassLoader)
on the same class
loader.
Note that if the class-loader is not an instance of
MockClassLoader
this method will return silently.
refreshPolicies
in interface MockPolicyInitializer