All Classes and Interfaces

Class
Description
 
 
 
 
A base class for EasyMock log policies.
 
Demonstrates that PowerMock can mock abstract methods.
 
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.
 
The exception thrown when an agent fails to initialize in the target Java virtual machine.
 
The exception thrown when an agent cannot be loaded into the target Java virtual machine.
 
 
 
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.
 
 
 
 
 
Thrown by VirtalMachine.attach when attempting to attach to a Java virtual machine for which a compatible AttachProvider does not exist.
Attach provider class for attaching to a Java virtual machine.
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 ClassLoaderExecutor can run any code in any classloader.
 
 
 
Instance of this interface can be used to mark a class that it was created and loaded by PowerMock
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.
 
An interface represents an abstraction of the class to be able to pass class to different byte-code instrumentation frameworks.
An implementation should wrap original instance.
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.
 
The general interface for all types configurations that could be obtained via GlobalConfiguration.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
A run-time exception that may be thrown to indicate that a constructor was not found.
Convert all constructors to public
 
The purpose of the deep cloner is to create a deep clone of an object.
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.
 
 
 
Class that encapsulate a mock and its corresponding invocation control.
 
 
 
 
 
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.
 
 
 
 
 
 
 
The class provides static access to Configuration.
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.
Basic not thread-safety implementation of the JavaAgentClassRegister
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.
 
The implementation of the ClassMarker 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.
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.
 
 
 
 
 
According to JVM specification method size must be lower than 65536 bytes.
Specifies the return value when stubbing a method.
 
This annotation can be placed on those fields in your test class that should be mocked.
The classloader loads and modified all classes except:
 
The instance of the class provides information about classes which have to be mocked, loaded without modification or defer to system class loader.
 
An implementer of interface is reasonable for creating of an mocked instance of specific type.
All mock invocations are routed through this gateway.
MockGateway.NoMockito.noMockito is wrapped into it's own static class to make sure it is initialized not earlier than MockGateway.calledFromMockito() is called for the first time.
 
 
 
 
The class provides a access to method and data of MockHandler from the given mock instance.
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.
Interface represent chain of MockTransformer.
 
An implementation of interface should create a MockTransformerChain with full set of required transformers to enable all mocking features.
 
 
 
 
 
 
 
Mocking object construction with withAnyArguments() does not treat all the object's constructors equally.
 
 
 
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.
Set class modifier to public to allow for mocking of 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 is the "agent class" that initializes the PowerMock "Java agent".
 
 
 
 
 
The class provides list of setting for PowerMock.
 
 
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.
 
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.
 
 
 
 
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.
 
 
 
 
An interface that should be implemented by classes that performs test suite chunking.
 
 
 
 
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.
 
 
 
 
 
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.
Remove final from all static final fields.
 
 
 
 
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.
If a transformer implements this interface then MockClassLoaderBuilder sets current test class during building a instance of MockClassLoader.
 
 
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 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.
 
The enum provide information for MockTransformer have PowerMock is started via Runner(FactoryObject), Rule or JavaAgent
Utilities for types.
 
 
 
Deprecated.
Class path adjuster is supported only for Javassist and will be removed in next release.
 
 
 
 
 
 
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
A Java virtual machine.
Describes a Java virtual machine.
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.