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)
PowerMockPolicyapplyClassLoadingPolicy in interface PowerMockPolicymockPolicyClassLoadingSettings - The settings objects where the class-loading policies can be
applied.public void applyInterceptionPolicy(MockPolicyInterceptionSettings mockPolicyInterceptionSettings)
PowerMockPolicyapplyInterceptionPolicy in interface PowerMockPolicymockPolicyInterceptionSettings - The settings objects where the interception policies can be
applied.Copyright © 2025. All rights reserved.