public class Slf4jMockPolicy extends Object implements PowerMockPolicy
org.slf4j.LoggerFactory.getLogger(Class)
. However, it is critical that the mocked logger is
reset after each test in order to avoid crosstalk between test cases.
Constructor and Description |
---|
Slf4jMockPolicy() |
Modifier and Type | Method and Description |
---|---|
void |
applyClassLoadingPolicy(MockPolicyClassLoadingSettings mockPolicyClassLoadingSettings)
Apply all class-loading related policies that must be present before the
interception policies can take place.
|
void |
applyInterceptionPolicy(MockPolicyInterceptionSettings mockPolicyInterceptionSettings)
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.
|
public void applyClassLoadingPolicy(MockPolicyClassLoadingSettings mockPolicyClassLoadingSettings)
PowerMockPolicy
applyClassLoadingPolicy
in interface PowerMockPolicy
mockPolicyClassLoadingSettings
- The settings objects where the class-loading policies can be
applied.public void applyInterceptionPolicy(MockPolicyInterceptionSettings mockPolicyInterceptionSettings)
PowerMockPolicy
applyInterceptionPolicy
in interface PowerMockPolicy
mockPolicyInterceptionSettings
- The settings objects where the interception policies can be
applied.Copyright © 2019. All rights reserved.