All Classes and Interfaces

Class
Description
 
 
 
A base class for EasyMock log policies.
 
Demonstrates that PowerMock can mock abstract methods.
 
Abstract implementation of the MockingFrameworkReporterFactory, contains common code for EasyMock and Mockito.
Base class that should be used by all mock strategies.
An empty implementation of the PowerMockTestListener interface.
 
Base class for all test class extractors.
Abstract base class for test suite chunking, i.e.
This is responsible for serializing a mock, it is enabled if the mock is implementing Serializable.
Simple interface that hold a correct writeReplace signature that can be seen by an ObjectOutputStream.
This is the serialization proxy that will encapsulate the real mock data as a byte array.
Special Mockito aware ObjectInputStream that will resolve the Mockito proxy class.
Special Mockito aware ObjectOutputStream.
 
 
Deprecated.
Test Runners uses an annotation enabling listener per default since version 1.3.
Before each test method all fields annotated with Mock, Mock, Mock MockNice or MockStrict will have mock objects created for them and injected to the fields.
Deprecated.
Test Runners uses an annotation enabling listener per default since version 1.3.
 
 
 
 
 
 
 
 
 
An array merger concatenates several arrays to one.
The default implementation of the ArrayMerger interface.
 
 
 
 
The purpose of the Primitive Wrapper is to provide methods that deals with translating wrapper types to its related primitive type.
This class search the best candidate in the given class to invoke constructor with given parameters.
 
A MockMaker that uses cglib to generate mocks on a JVM.
Created by gauee on 12/11/15.
 
 
Inspired on jMock (thanks jMock guys!!!)
 
 
 
 
Class which use specific class loader to register ProxyFramework.
 
 
 
The exception is thrown when a user tries to mock class which is't prepared, but should be.
This interface can be used to adjust the classpath used by powermock to locate class files.
Specifies the replace strategy for a class.
This class takes care of creating a replica of a class.
Class that is used to test that local and member class works with PowerMock.
 
 
 
Demonstrates the ability to mock an inner class (if the inner class is not private).
Class that simulates a PowerMock generated constructor.
Used for demonstration of the ability to mock methods from a private inner class.
 
This comparator factory is used to create Comparators for Whitebox which are used to find best candidates for constructor and method invocation.
 
 
 
This class takes care of creating a concrete sub-class implementing all abstract methods in the parent.
 
 
 
 
A run-time exception that may be thrown to indicate that a constructor was not found.
The purpose of the deep cloner is to create a deep clone of an object.
Most of this code has been copied from the Sun14ReflectionProvider in the XStream project.
A deep-cloner must implement this interface.
Interface that provides the replay, verify and reset behavior for mock objects and classes.
 
 
Fills the fields with default not-null values.
 
 
 
 
Defers classloading of system classes to a delegate.
 
 
Implementation of OngoingStubbing that delegates invocations to all supplied ctors
Simple class used to demonstrate setter injection..
Simple class used to demonstrate setter injection..
 
Fields annotated with this annotation are not allowed to be cloned by a Deep Cloner implementation.
This class works like as EasyMockSupport and is used to create and inject mocks to annotated fields of an instance of test class.
 
 
Configuration information about EasyMock framework and which feature is supported by version of EasyMock in runtime.
The default implementation of the MethodInvocationControl interface.
 
Class that implements an equals method that contains a call to getClass();
Simple example of a class with a static initializer.
 
 
 
 
 
 
 
A test listener that automatically set all instance fields to their default values after each test method.
 
Class that should be implemented by field matching strategies.
Defines strategies for field matching.
 
A run-time exception that may be thrown to indicate that a field was not found.
 
 
Core static utility to help modules, such as PowerMockRunner, that needs to communicate with some 3rd-party framework in order to properly fire events to PowerMockTestListener instances.
 
 
 
 
 
 
 
Simple class used to demonstrate setter injection..
Simple class used to demonstrate setter injection..
 
 
 
 
There was a bug in PowerMock 1.2 and its predecessors that made PowerMock WhiteboxImpl.getMethod(Class, Class...) fail when invoking proxified interface methods declared in extended interfaces.
 
The purpose of the simple class is to demonstrate PowerMocks (possibly future) ability to change static final fields in an interface.
 
A class that can be used as a substitution instead of mocking a particular class.
 
 
 
This register contains information about which class has been modified by PowerMock Java Agent.
Instance of class should set/clear an instance of the JavaAgentClassRegister in Mockito Frameworks classes
Factory to create an instance of JavaAgentFrameworkRegister, depends on which mocking framework is loaded in runtime.
Implementation of JavaAgentFrameworkRegister for EasyMock framework.
Instance of this interface can be used to mark CtClass that it was created and loaded by PowerMock
 
The implementation of the JavaAssistClassMarker which use an interface to mark type.
A Jakarta Commons-Logging (JCL) mock policy.
 
 
 
 
Holds various keys that may be put into the MockRepository to store state.
 
 
A log4j mock policy.
A support class for mock policies dealing with logging frameworks.
Finds members in classes.
Contains various utilities for modifying members of classes such as constructors, fields and methods.
Example of class with method which after instrumentation is larger than JVM limit.
Should be one instance per mock instance, see CglibMockMaker.
The purpose of a method invocation control is to invoke a proxy to simulate a method call.
 
 
 
A run-time exception that may be thrown to indicate that a method invocation failed.
A run-time exception that may be thrown to indicate that a method was not found.
 
Specifies the replace strategy for a method.
 
Specifies the return value when stubbing a method.
 
This annotation can be placed on those fields in your test class that should be mocked.
Deprecated.
Use Mock annotation in respective extension API instead.
Mock all classes except system classes.
MockClassLoader builder.
Factory class for MockClassLoaderBuilder
 
 
All mock invocations are routed through this gateway.
The instance of the interface is used to replace default mocking frameworks exception message via message specific for PowerMock use-cases.
 
 
 
A Mockito implementation of the MethodInvocationControl interface.
 
 
 
 
 
 
This annotation can be placed on those fields in your test class that should be mocked in a nice manner (i.e.
A Mock Policy can be used to make it easier to unit test some code with PowerMock in isolation from a certain framework.
Contains class-loading related settings.
The default implementation of the MockPolicyClassLoadingSettings interface.
A Mock Policy initializer takes care of initializing the behavior defined by the mock policies.
The default implementation of the MockPolicyInitializer interface for mock policies.
Contains interception related settings.
 
Hold mock objects that should be used instead of the concrete implementation.
 
 
 
A class that uses a private Service field and no setter.
 
 
This annotation can be placed on those fields in your test class that should be mocked in a strict manner (i.e.
Interface that all mock transformers must implement.
 
 
 
 
 
 
 
 
 
 
The purpose of this class is to invoke a native method in a collaborator.
 
The purpose of this class is to demonstrate that it's possible to mock native methods using plain EasyMock class extensions.
 
Used to demonstrate PowerMock's ability to mock new instance calls.
A new invocation control pairs up a InvocationSubstitute with the mock object created when invoking InvocationSubstitute.performSubstitutionLogic(Object...) object.
 
 
 
 
Stateful class that, from information from JUnit and test-classes, can build and send notifications to PowerMockTestNotifier.
 
 
Demonstrates that PowerMock correctly invoke overloaded methods from the MockGateway.
This class demonstrates the ability for PowerMock to mock package private classes.
 
 
Simple partial mocking example that should need no byte-code manipulation.
 
PowerMock extends EasyMock functionality with several new features such as mocking static and private methods, mocking new instances and more.
Clears the state in LastControl that deals with MocksControl.
 
 
 
This annotation tells PowerMock to defer the loading of classes with the names supplied to PowerMockIgnore.value() to the system classloader.
 
 
PowerMockito extends Mockito functionality with several new features such as mocking static and private methods and more.
 
The same as InjectingAnnotationEngine with the exception that it doesn't create/injects mocks annotated with the standard annotations such as Mock.
More or less a copy of the SpyAnnotationEngine but it uses PowerMockito.spy(Object) instead.
Setup stubbing for private or void methods in final class, final void methods, or static (final) methods.
Extension of the standard Mocktio stubber implementation that also support PowerMockito created mocks.
A JUnit4 test runner that only runs a specified set of test methods in a test class.
Extends the functionality of PowerMockJUnit44RunnerDelegateImpl to enable the usage of rules.
Extends the functionality of PowerMockJUnit47RunnerDelegateImpl to enable the usage of TestRule.
A custom MethodValidator that makes sure that test methods not annotated by the Test annotation works in JUnit 4.4 with the custom JUnit-runner when the test class is extending TestCase.
 
 
The PowerMock listener annotation can be used to tell PowerMock which listeners should be instantiated and invoked during a test.
A PowerMock implementation of the MockMaker.
It needs to extend InternalMockHandler because Mockito requires the type to be of InternalMockHandler and not MockHandler
This class is essentially a copy of MatchersBinder with the exception that the InvocationMatcher is replaced and its toString method is overwritten to avoid exceptions.
 
Interface marker.
The PowerMock object factory.
This interface can be implemented to create policies for certain frameworks to make it easier for users to test their code in isolation from these frameworks.
The interface is used to provide a user well-defined exception description.
 
 
 
 
 
 
Stuff that needs to be handled in a separate class, because it deals with API that did not exist before JUnit-4.5.
Wraps JUnit's RunNotifier to make sure that the PowerMock-specific instances of PowerMockTestListener will also be informed.
 
A PowerMock base class that may be used as a base class for all TestNG test cases that uses PowerMock.
This interface should be implemented by all PowerMock test listeners.
 
Implementors of this interface that must provide the ability to notify PowerMock test listeners with the events as specified by the methods declared in this interface.
Utility class that may be used by PowerMock test runners to notify listeners.
 
This annotation tells PowerMock to prepare all classes (except certain system and test related classes) for test.
This annotation tells PowerMock to prepare certain classes for testing.
Implementation of the TestClassesExtractor interface that extract classes from the PrepareForTest or PrepareOnlyThisForTest annotations.
This annotation tells PowerMock to prepare certain classes for testing.
Used to demonstrate PowerMocks ability to deal with overloaded constructors of primitive/wrapper types.
Used to demonstrate PowerMocks ability to deal with overloaded constructors of primitive/wrapper types.
Simple utility that maps constant fields of CtClass to their corresponding java class-objects for primitive types.
The purpose of the Primitive Wrapper is to provide methods that deals with translating wrapper types to its related primitive type.
Demonstrates the ability to invoke a test on a private constructor as well as lazy initialization of private collaborators.
Class used to demonstrate the private constructor instantiation.
A class used to test the functionality to mock private methods that are also final.
A class used to test the functionality of capturing arguments when methods are overloaded and private and final.
 
A class used to test the functionality to mock private methods.
 
Simple partial mocking example that should need no byte-code manipulation.
The purpose of a the proxy framework implementation is to return the unproxied types of classes.
 
CGLib proxy framework setup.
Demonstrates the ability to invoke a test on a private constructor as well as lazy initialization of private collaborators.
This class is used to demonstrate that error messages are correct when a constructor is not found.
 
 
All API's must register a proxy framework using this class.
 
 
An interface that should be implemented by classes that performs test suite chunking.
 
 
 
Offer a Serializable implementation of the NoOp CGLIB callback.
A very simple service interface used as a dependency for various classes to demonstrate different kinds of mocking.
 
 
 
This class is used to demonstrate features such as static, final and partial mocking as well as access internal state.
 
 
 
A class that uses a private Service field and no setter.
 
 
 
 
A basic swing application example.
 
 
 
A ClassLoaderExecutor can run any code in any classloader.
An slf4j mock policy.
Sfl4j mock policy that injects a Mockito-created mock to be returned on calls to getLogger factory methods.
 
 
 
 
 
 
 
Demonstrates how to mock both instance and static methods in the same test
 
Demonstrates that PowerMock correctly methods that seam to be overloaded but differ because one is static and one is instance.
The purpose of this class is to be used to verify that the http://code.google.com/p/powermock/issues/detail?id=4 is fixed.
Implementation of the TestClassesExtractor interface for classes that should have their static initializers suppressed.
Can be used to assert that partial mocking of static methods works.
 
 
 
A custom extension of MockAwareVerificationMode for static method verification.
Test class to demonstrate static, static+final, static+native and static+final+native methods mocking.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
Use this annotation to suppress static initializers (constructors) for one or more classes.
Class used to demonstrate PowerMock's ability to mock system classes.
A test case entry consists of a test class and a list of test chunks that should be executed for this entry.
A test chunk consists of a list of methods that should be executed by a particular classloader.
A test chunk consists of a list of methods that should be executed by a particular classloader.
 
 
MockTransformer implementation that will make PowerMock test-class enhancements for four purposes...
 
 
 
 
Javassist method filter that ignores the toString, equals, finalize and hashCode method otherwise the test output in Maven looks strange and replayAll/verifyAll doesn't work as expected.
The class injects mocks created with Mock, Mock and Mock to fields of objects which is annotated with TestSubject
 
 
 
 
 
A run-time exception that may be thrown to indicate that too many constructors were found.
A run-time exception that may be thrown to indicate that too many fields were found.
A run-time exception that may be thrown to indicate that too many methods were found.
We need to override the toString() in some classes because normally the toString "method" is assembled by calling the "qualifiedName" method but this is not possible in our case.
 
Utilities for types.
Use this annotation to enable adjusting of the class path used by powermock to locate class files.
 
 
 
Verifies no more interactions, delegates to Mockito if PowerMockito doesn't find a supplied mock.
This code is copied from http://stackoverflow.com/questions/198431/how-do-you-compare-two-version-strings-in-java
This code is copied from http://stackoverflow.com/questions/198431/how-do-you-compare-two-version-strings-in-java
Various utilities for accessing internals of a class.
Various utilities for accessing internals of a class.
Wildcard matcher.
 
 
 
 
 
 
 
 
Dummy class that is used to setup expectations for the InterfaceMethodHierarchyUsage.