|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.powermock.api.easymock.mockpolicies.JclMockPolicy
public class JclMockPolicy
A Jakarta Commons-Logging (JCL) mock policy. This mock policy deals with solving JCL related mocking issues. It takes care of loading all concerned JCL classes through the correct class-loader and automatically prepares and injects logger instances. This policy does the following:
Constructor Summary | |
---|---|
JclMockPolicy()
|
Method Summary | |
---|---|
void |
applyClassLoadingPolicy(MockPolicyClassLoadingSettings settings)
Apply all class-loading related policies that must be present before the interception policies can take place. |
void |
applyInterceptionPolicy(MockPolicyInterceptionSettings settings)
Apply the interception policies, for example which methods that should be suppressed or which methods that should be intercepted and return some else than their original value. |
protected String[] |
getFullyQualifiedNamesOfClassesToLoadByMockClassloader()
Loads all log4j classes with the mock classloader. |
protected String |
getLogFrameworkName()
|
protected String |
getLoggerClassToMock()
|
protected String |
getLoggerFactoryClassName()
|
protected String |
getLoggerMethodName()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public JclMockPolicy()
Method Detail |
---|
protected String[] getFullyQualifiedNamesOfClassesToLoadByMockClassloader()
protected String getLogFrameworkName()
getLoggerFactoryClassName()
cannot be
found in the classpath.protected String getLoggerClassToMock()
protected String getLoggerFactoryClassName()
protected String getLoggerMethodName()
public void applyClassLoadingPolicy(MockPolicyClassLoadingSettings settings)
applyClassLoadingPolicy
in interface PowerMockPolicy
settings
- The settings objects where the class-loading policies can be
applied.public void applyInterceptionPolicy(MockPolicyInterceptionSettings settings)
applyInterceptionPolicy
in interface PowerMockPolicy
settings
- The settings objects where the interception policies can be
applied.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |