@Target(value=TYPE) @Retention(value=RUNTIME) @Documented @Inherited public @interface MockPolicy
A mock policy can for example be implemented to avoid writing repetitive setup code for your tests. Say that you're using a framework X that in order for you to test it requires that certain methods should always return a mock implementation. Perhaps some static initializers must be suppressed as well. Instead of copying this code between tests it would be a good idea to write a reusable mock policy.
Modifier and Type | Required Element and Description |
---|---|
Class<? extends PowerMockPolicy>[] |
value |
public abstract Class<? extends PowerMockPolicy>[] value
Copyright © 2019. All rights reserved.