A B C D E F G H I J L M N O P R S T V W Z

A

addBundle(Bundle) - Method in class org.apache.aries.mocks.BundleContextMock
 
addBundleToClassPath(Bundle...) - Method in class org.apache.aries.mocks.BundleMock
 
addServiceListener(ServiceListener, String) - Method in class org.apache.aries.mocks.BundleContextMock
Add a service listener.
addServiceListener(ServiceListener) - Method in class org.apache.aries.mocks.BundleContextMock
Add a service listener.
addToClassPath(URL...) - Method in class org.apache.aries.mocks.BundleMock
 
ArchiveFixture - Class in org.apache.aries.unittest.fixture
Utility class for creating archive-based fixtures such as EBA archives, jar files etc.
ArchiveFixture() - Constructor for class org.apache.aries.unittest.fixture.ArchiveFixture
 
ArchiveFixture.AbstractFixture - Class in org.apache.aries.unittest.fixture
Abstract base class for fixtures.
ArchiveFixture.AbstractFixture(ArchiveFixture.ZipFixture) - Constructor for class org.apache.aries.unittest.fixture.ArchiveFixture.AbstractFixture
 
ArchiveFixture.FileFixture - Class in org.apache.aries.unittest.fixture
Simple fixture for text files.
ArchiveFixture.FileFixture(ArchiveFixture.ZipFixture) - Constructor for class org.apache.aries.unittest.fixture.ArchiveFixture.FileFixture
 
ArchiveFixture.Fixture - Interface in org.apache.aries.unittest.fixture
Base interface for every fixture.
ArchiveFixture.IStreamFixture - Class in org.apache.aries.unittest.fixture
 
ArchiveFixture.IStreamFixture(ArchiveFixture.ZipFixture, InputStream) - Constructor for class org.apache.aries.unittest.fixture.ArchiveFixture.IStreamFixture
 
ArchiveFixture.JarFixture - Class in org.apache.aries.unittest.fixture
Fixture for a jar archive.
ArchiveFixture.JarFixture(ArchiveFixture.ZipFixture) - Constructor for class org.apache.aries.unittest.fixture.ArchiveFixture.JarFixture
 
ArchiveFixture.ManifestFixture - Class in org.apache.aries.unittest.fixture
Fixture for (bundle) manifests.
ArchiveFixture.ManifestFixture(ArchiveFixture.ZipFixture) - Constructor for class org.apache.aries.unittest.fixture.ArchiveFixture.ManifestFixture
 
ArchiveFixture.ZipFixture - Class in org.apache.aries.unittest.fixture
Base fixture for any kind of zip archive.
ArchiveFixture.ZipFixture(ArchiveFixture.ZipFixture) - Constructor for class org.apache.aries.unittest.fixture.ArchiveFixture.ZipFixture
 
ArchiveFixture.ZipFixture.ChildFixture - Class in org.apache.aries.unittest.fixture
 
ArchiveFixture.ZipFixture.ChildFixture(String, ArchiveFixture.Fixture) - Constructor for class org.apache.aries.unittest.fixture.ArchiveFixture.ZipFixture.ChildFixture
 
Assert - Class in org.apache.aries.unittest.junit
A library of useful assertion routines.
Assert() - Constructor for class org.apache.aries.unittest.junit.Assert
 
assertCalled(List<MethodCall>, boolean) - Method in class org.apache.aries.unittest.mocks.Skeleton
This method checks that the MethodCalls objects in the given list were made and throws an AssertionFailedError if they were not.
assertCalled(MethodCall) - Method in class org.apache.aries.unittest.mocks.Skeleton
This does the same as checkCall, but throws an junit.framework.AssertionFailedError if the call did not occur.
assertCalledExactNumberOfTimes(MethodCall, int) - Method in class org.apache.aries.unittest.mocks.Skeleton
This method asserts that the method specified in the call parameter has been called the number of times specified by numberOfCalls.
assertEqualsContract(T, T, T) - Static method in class org.apache.aries.unittest.junit.Assert
This method asserts that the equals contract is upheld by type T.
assertHashCodeEquals(T, T, boolean) - Static method in class org.apache.aries.unittest.junit.Assert
This method checks that the two objects have the same hashCode.
assertHashCodeNotEquals(T, T) - Static method in class org.apache.aries.unittest.junit.Assert
This method makes sure that the hashCodes are not equal.
assertNoServiceExists(String) - Static method in class org.apache.aries.mocks.BundleContextMock
This checks that we have at no services with this interface name.
assertNotCalled(MethodCall) - Method in class org.apache.aries.unittest.mocks.Skeleton
This method throws an junit.framework.AssertionFailedError if the specified call was invoked on the skeleton.
assertServiceExists(String) - Static method in class org.apache.aries.mocks.BundleContextMock
This checks that we have at least one service with this interface name.
assertSkeletonNotCalled() - Method in class org.apache.aries.unittest.mocks.Skeleton
This method throws an junit.framework.AssertionFailedError if the skeleton has had any methods invoked on it.
attribute(String, String) - Method in class org.apache.aries.unittest.fixture.ArchiveFixture.ManifestFixture
Add a custom attribute to the manifest.

B

binary(String, InputStream) - Method in class org.apache.aries.unittest.fixture.ArchiveFixture.ZipFixture
Create a binary file with the content from the input stream
binary(String, String) - Method in class org.apache.aries.unittest.fixture.ArchiveFixture.ZipFixture
Create a binary file that is populated from content on the classloader
BOOLEAN_HANDLER - Static variable in class org.apache.aries.unittest.mocks.DefaultReturnTypeHandlers
A handler for Booleans
BundleContextMock - Class in org.apache.aries.mocks
This class is a partial implementation of BundleContext.
BundleContextMock() - Constructor for class org.apache.aries.mocks.BundleContextMock
Default constructor, widely used in the tests.
BundleContextMock(Bundle) - Constructor for class org.apache.aries.mocks.BundleContextMock
Constructor used by BundleMock, it ensures the bundle and its context are wired together correctly.
BundleMock - Class in org.apache.aries.mocks
 
BundleMock(String, Dictionary<?, ?>) - Constructor for class org.apache.aries.mocks.BundleMock
 
BundleMock(String, Dictionary<?, ?>, boolean) - Constructor for class org.apache.aries.mocks.BundleMock
 
BundleMock(String, Dictionary<?, ?>, String) - Constructor for class org.apache.aries.mocks.BundleMock
 
BundleMock(String, Dictionary<?, ?>, File) - Constructor for class org.apache.aries.mocks.BundleMock
 
BYTE_HANDLER - Static variable in class org.apache.aries.unittest.mocks.DefaultReturnTypeHandlers
A handler for Bytes
bytes - Variable in class org.apache.aries.unittest.fixture.ArchiveFixture.ZipFixture
 

C

CHAR_HANDLER - Static variable in class org.apache.aries.unittest.mocks.DefaultReturnTypeHandlers
A handler for Characters
checkCall(MethodCall) - Method in class org.apache.aries.unittest.mocks.Skeleton
Checks that the specified method has been called on this skeleton
checkCalls(List<MethodCall>, boolean) - Method in class org.apache.aries.unittest.mocks.Skeleton
This method checks that the calls in the list occurred.
children - Variable in class org.apache.aries.unittest.fixture.ArchiveFixture.ZipFixture
 
clear() - Static method in class org.apache.aries.mocks.BundleContextMock
This method clears the service registry.
clearMethodCalls() - Method in class org.apache.aries.unittest.mocks.Skeleton
This method clears the method calls list for the skeleton
createInitialContextFactory(Hashtable<?, ?>) - Method in class org.apache.aries.mocks.MockInitialContextFactoryBuilder
 
createMock(Class<?>...) - Method in class org.apache.aries.unittest.mocks.Skeleton
Creates a new Mock using this skeleton backing it.
createMock(Class<T>) - Method in class org.apache.aries.unittest.mocks.Skeleton
Creates a new Mock using this skeleton backing it.
createProxy(Class<?>...) - Method in class org.apache.aries.unittest.mocks.DefaultInvocationHandler
Creates and returns a proxy backed by the associated skeleton, that implements the specified interfaces.

D

DefaultInvocationHandler - Class in org.apache.aries.unittest.mocks
This invocation handler is used by the Skeleton when nothing else is matched.
DefaultInvocationHandler(Skeleton) - Constructor for class org.apache.aries.unittest.mocks.DefaultInvocationHandler
Creates an instance called by the specified skeleton.
DefaultMethodCallHandlers - Class in org.apache.aries.unittest.mocks
This class contains method call handlers for some default method handling.
DefaultMethodCallHandlers() - Constructor for class org.apache.aries.unittest.mocks.DefaultMethodCallHandlers
 
DefaultReturnTypeHandlers - Class in org.apache.aries.unittest.mocks
This class contains some return type handlers that provides some default behavior.
DefaultReturnTypeHandlers() - Constructor for class org.apache.aries.unittest.mocks.DefaultReturnTypeHandlers
 
deRegisterMethodCallHandler(MethodCall) - Method in class org.apache.aries.unittest.mocks.Skeleton
This method removes a registered MethodCallHandler for the specified MethodCall.
deRegisterReturnTypeHandler(Class<?>) - Method in class org.apache.aries.unittest.mocks.Skeleton
This method removes a registration for a ReturnTypeHandler for the specified class.
DOUBLE_HANDLER - Static variable in class org.apache.aries.unittest.mocks.DefaultReturnTypeHandlers
A handler for Doubles

E

end() - Method in class org.apache.aries.unittest.fixture.ArchiveFixture.AbstractFixture
Ends the current flow target and returns the parent flow target.
equals(Object) - Method in class org.apache.aries.unittest.mocks.MethodCall
Returns true if and only if the two object represent the same call.
EQUALS_HANDLER - Static variable in class org.apache.aries.unittest.mocks.DefaultMethodCallHandlers
The Default MethodCallHandler for the equals method, performs an == check.
ExceptionListener - Interface in org.apache.aries.unittest.mocks
This class receives notification that an exception has been thrown from a mock object.
exceptionNotification(Throwable) - Method in interface org.apache.aries.unittest.mocks.ExceptionListener
This method is called when an exception has been thrown from a mock.

F

file(String, String) - Method in class org.apache.aries.unittest.fixture.ArchiveFixture.ZipFixture
Create a complete child file fixture at the given path and with the content.
file(String) - Method in class org.apache.aries.unittest.fixture.ArchiveFixture.ZipFixture
Create an empty file fixture at the given path.
findEntries(String, String, boolean) - Method in class org.apache.aries.mocks.BundleMock
 
fixture - Variable in class org.apache.aries.unittest.fixture.ArchiveFixture.ZipFixture.ChildFixture
 
FLOAT_HANDLER - Static variable in class org.apache.aries.unittest.mocks.DefaultReturnTypeHandlers
A handler for Floats

G

getAllServiceReferences(String, String) - Method in class org.apache.aries.mocks.BundleContextMock
This method finds all the service references in the registry with the matching class name and filter.
getArguments() - Method in class org.apache.aries.unittest.mocks.MethodCall
This method returns the arguments.
getBundle() - Method in class org.apache.aries.mocks.BundleContextMock
 
getBundleContext() - Method in class org.apache.aries.mocks.BundleMock
 
getBundles() - Method in class org.apache.aries.mocks.BundleContextMock
 
getClassLoader() - Method in class org.apache.aries.mocks.BundleMock
 
getClassName() - Method in class org.apache.aries.unittest.mocks.MethodCall
Returns the name of the class the method was invoked or was defined on.
getHeaders() - Method in class org.apache.aries.mocks.BundleMock
 
getInterfaces() - Method in class org.apache.aries.unittest.mocks.MethodCall
This method returns the list of interfaces implemented by the class that was called.
getInvokedObject() - Method in class org.apache.aries.unittest.mocks.MethodCall
This method returns the invoked object.
getLocation() - Method in class org.apache.aries.mocks.BundleMock
 
getManifest() - Method in class org.apache.aries.unittest.fixture.ArchiveFixture.ManifestFixture
 
getMethodName() - Method in class org.apache.aries.unittest.mocks.MethodCall
Returns the name of the method that was (or will be) invoked.
getParameter(String) - Method in class org.apache.aries.unittest.mocks.Skeleton
This method allows a parameter to be retrieved.
getProperty(String) - Method in class org.apache.aries.mocks.BundleContextMock
 
getRegisteredServices() - Method in class org.apache.aries.mocks.BundleMock
 
getResource(String) - Method in class org.apache.aries.mocks.BundleMock
 
getResources(String) - Method in class org.apache.aries.mocks.BundleMock
 
getService(String, Bundle) - Static method in class org.apache.aries.mocks.BundleContextMock
This helper method is used to get the service from the registry with the given interface name.
getService(ServiceReference) - Method in class org.apache.aries.mocks.BundleContextMock
Retrieve a service from the registry.
getServiceListeners() - Static method in class org.apache.aries.mocks.BundleContextMock
 
getServiceReference(String) - Method in class org.apache.aries.mocks.BundleContextMock
Gets the first matching service reference.
getServiceReferences(String, String) - Method in class org.apache.aries.mocks.BundleContextMock
A mock implementation of the getServiceReferences method.
getSkeleton() - Static method in class org.apache.aries.mocks.MockInitialContextFactoryBuilder
 
getSkeleton(Object) - Static method in class org.apache.aries.unittest.mocks.Skeleton
This method returns the Skeleton backing the supplied mock object.
getState() - Method in class org.apache.aries.mocks.BundleMock
 
getSymbolicName() - Method in class org.apache.aries.mocks.BundleMock
 
getTemplateObject() - Method in class org.apache.aries.unittest.mocks.Skeleton
 
getVersion() - Method in class org.apache.aries.mocks.BundleMock
 

H

handle(MethodCall, Skeleton) - Method in interface org.apache.aries.unittest.mocks.MethodCallHandler
 
handle(Class<?>, Skeleton) - Method in interface org.apache.aries.unittest.mocks.ReturnTypeHandler
This method is called when a method call handler has not been registered and an object of a specific type needs to be returned.
hashCode() - Method in class org.apache.aries.unittest.mocks.MethodCall
Returns the hashCode (obtained by returning the hashCode of the methodName).
HASHCODE_HANDLER - Static variable in class org.apache.aries.unittest.mocks.DefaultMethodCallHandlers
The Default MethodCallHandler for the hashCode method, returns the identity hashCode.

I

InjectSkeleton - Annotation Type in org.apache.aries.unittest.mocks.annotations
If a field on a template is marked with this annotation then it will be injected with the Skeleton instance for the most recently created mock.
installBundle(String, InputStream) - Method in class org.apache.aries.mocks.BundleContextMock
This method implements the installBundle method from BundleContext.
installBundle(String) - Method in class org.apache.aries.mocks.BundleContextMock
Asks to install an OSGi bundle from the given location.
INT_HANDLER - Static variable in class org.apache.aries.unittest.mocks.DefaultReturnTypeHandlers
A handler for Integers
invoke(Object, Method, Object[]) - Method in class org.apache.aries.unittest.mocks.DefaultInvocationHandler
Invoked when no ReturnType or MethodCall Handlers are defined.
invoke(Object, Method, Object[]) - Method in class org.apache.aries.unittest.mocks.Skeleton
This method is invoked by the mock objects.
invokeReturnTypeHandlers(Class<?>) - Method in class org.apache.aries.unittest.mocks.Skeleton
This method invokes the return type proxy for the specified class.
isDefaultMethodCall(MethodCall) - Static method in class org.apache.aries.unittest.mocks.DefaultMethodCallHandlers
This method returns true if and only if the specified call represents a default method call.
isSkeleton(Object) - Static method in class org.apache.aries.unittest.mocks.Skeleton
This method returns true if and only the provided object is backed by a Skeleton.

J

jar(String) - Method in class org.apache.aries.unittest.fixture.ArchiveFixture.ZipFixture
Create a child jar fixture at the given path.

L

line(String) - Method in class org.apache.aries.unittest.fixture.ArchiveFixture.FileFixture
Add a line to the file fixture.
LIST_HANDLER - Static variable in class org.apache.aries.unittest.mocks.DefaultReturnTypeHandlers
A handler for Lists
loadClass(String) - Method in class org.apache.aries.mocks.BundleMock
 
LONG_HANDLER - Static variable in class org.apache.aries.unittest.mocks.DefaultReturnTypeHandlers
A handler for Longs

M

manifest() - Method in class org.apache.aries.unittest.fixture.ArchiveFixture.JarFixture
 
manifest() - Method in class org.apache.aries.unittest.fixture.ArchiveFixture.ZipFixture
Create a manifest fixture at the given path.
MAP_HANDLER - Static variable in class org.apache.aries.unittest.mocks.DefaultReturnTypeHandlers
A handler for Maps
MethodCall - Class in org.apache.aries.unittest.mocks
This class represents a method call that has been or is expected to be made.
MethodCall(Class<?>, String, Object...) - Constructor for class org.apache.aries.unittest.mocks.MethodCall
This constructor allows a MethodCall to be created when the class can be located statically, rather than dynamically.
MethodCallHandler - Interface in org.apache.aries.unittest.mocks
Implementations of this interface perform function when a method is called.
MockInitialContextFactoryBuilder - Class in org.apache.aries.mocks
 
MockInitialContextFactoryBuilder() - Constructor for class org.apache.aries.mocks.MockInitialContextFactoryBuilder
 

N

newJar() - Static method in class org.apache.aries.unittest.fixture.ArchiveFixture
Create a new jar file fixture
newMock(Class<?>...) - Static method in class org.apache.aries.unittest.mocks.Skeleton
This method returns a completely new mock object backed by a new skeleton object.
newMock(Class<T>) - Static method in class org.apache.aries.unittest.mocks.Skeleton
This method returns a completely new mock object backed by a new skeleton object.
newMock(Object, Class<T>) - Static method in class org.apache.aries.unittest.mocks.Skeleton
It is often the case that only a subset of methods on an interface are needed, but those methods that are needed are quite complex.
newZip() - Static method in class org.apache.aries.unittest.fixture.ArchiveFixture
Create a new zip file fixture

O

org.apache.aries.mocks - package org.apache.aries.mocks
 
org.apache.aries.unittest.fixture - package org.apache.aries.unittest.fixture
 
org.apache.aries.unittest.junit - package org.apache.aries.unittest.junit
 
org.apache.aries.unittest.mocks - package org.apache.aries.unittest.mocks
 
org.apache.aries.unittest.mocks.annotations - package org.apache.aries.unittest.mocks.annotations
 

P

path - Variable in class org.apache.aries.unittest.fixture.ArchiveFixture.ZipFixture.ChildFixture
 

R

registerDefaultHandlers(Skeleton) - Static method in class org.apache.aries.unittest.mocks.DefaultMethodCallHandlers
This method registers the DefaultMethodCall Handlers with the specified skeleton.
registerDefaultHandlers(Skeleton) - Static method in class org.apache.aries.unittest.mocks.DefaultReturnTypeHandlers
Register all the default handlers against the specified skeleton.
registerEqualsHelper(Class<T>, Comparator<T>) - Static method in class org.apache.aries.unittest.mocks.MethodCall
The native equals for an object may not provide the behaviour required by the tests.
registerExceptionListener(Class<?>, ExceptionListener) - Method in class org.apache.aries.unittest.mocks.Skeleton
This method registers an ExceptionListener when the specified Exception is thrown.
registerMethodCallHandler(MethodCall, MethodCallHandler) - Method in class org.apache.aries.unittest.mocks.Skeleton
This method registers a MethodCallHandler for the specified MethodCall.
registerReturnTypeHandler(Class<?>, ReturnTypeHandler) - Method in class org.apache.aries.unittest.mocks.Skeleton
This method registers a ReturnTypeHandler for the specified class.
registerService(String, Object, Dictionary<String, Object>) - Method in class org.apache.aries.mocks.BundleContextMock
This implements the registerService method from BundleContext.
registerService(String[], Object, Dictionary<String, Object>) - Method in class org.apache.aries.mocks.BundleContextMock
This implements the registerService method from BundleContext.
removeEqualsHelper(Class<?>) - Static method in class org.apache.aries.unittest.mocks.MethodCall
This method removes any registered comparator specified for the given type.
removeServiceListener(ServiceListener) - Method in class org.apache.aries.mocks.BundleContextMock
Remove a service listener
reset() - Method in class org.apache.aries.unittest.mocks.Skeleton
This method resets the skeleton to the state it was in prior just after it was constructed.
ReturnTypeHandler - Interface in org.apache.aries.unittest.mocks
Return type handlers return objects that implement the specified class.

S

SET_HANDLER - Static variable in class org.apache.aries.unittest.mocks.DefaultReturnTypeHandlers
A handler for Setss
setDefaultHandler(DefaultInvocationHandler) - Method in class org.apache.aries.unittest.mocks.Skeleton
 
setParameter(String, Object) - Method in class org.apache.aries.unittest.mocks.Skeleton
This method allows a parameter to be set.
setReturnValue(MethodCall, Object) - Method in class org.apache.aries.unittest.mocks.Skeleton
This is a convenience method for registering a method call handler where a specific value should be returned when a method is called, rather than some logic needs to be applied.
setThrows(MethodCall, Exception) - Method in class org.apache.aries.unittest.mocks.Skeleton
This is a convenience method for registering a method call handler where a specific exception should be thrown when the method is called, rather than some logic needs to be applied.
setThrows(MethodCall, Error) - Method in class org.apache.aries.unittest.mocks.Skeleton
This is a convenience method for registering a method call handler where a specific exception should be thrown when the method is called, rather than some logic needs to be applied.
SHORT_HANDLER - Static variable in class org.apache.aries.unittest.mocks.DefaultReturnTypeHandlers
A handler for Shorts
Singleton - Annotation Type in org.apache.aries.unittest.mocks.annotations
This annotation can be applied to template objects.
Skeleton - Class in org.apache.aries.unittest.mocks
The Skeleton class is an implementation of the java.lang.reflect.InvocationHandler that can be used for dynamic mock objects.
start(Context) - Static method in class org.apache.aries.mocks.MockInitialContextFactoryBuilder
 
STRING_HANDLER - Static variable in class org.apache.aries.unittest.mocks.DefaultReturnTypeHandlers
A handler for Strings
symbolicName(String) - Method in class org.apache.aries.unittest.fixture.ArchiveFixture.ManifestFixture
Set the symbolic name of the bundle

T

toString() - Method in class org.apache.aries.unittest.mocks.MethodCall
Returns a string representation of the method call.
TOSTRING_HANDLER - Static variable in class org.apache.aries.unittest.mocks.DefaultMethodCallHandlers
The Default MethodCallHandler for the toString method, reproduces @

V

version(String) - Method in class org.apache.aries.unittest.fixture.ArchiveFixture.ManifestFixture
Set the version of the bundle

W

writeAllEntries(ZipOutputStream) - Method in class org.apache.aries.unittest.fixture.ArchiveFixture.ZipFixture
Add all entries to the ZipOutputStream
writeOut(OutputStream) - Method in class org.apache.aries.unittest.fixture.ArchiveFixture.FileFixture
 
writeOut(OutputStream) - Method in interface org.apache.aries.unittest.fixture.ArchiveFixture.Fixture
Write the physical representation of the fixture to the given OutputStream
writeOut(OutputStream) - Method in class org.apache.aries.unittest.fixture.ArchiveFixture.IStreamFixture
 
writeOut(OutputStream) - Method in class org.apache.aries.unittest.fixture.ArchiveFixture.JarFixture
 
writeOut(OutputStream) - Method in class org.apache.aries.unittest.fixture.ArchiveFixture.ManifestFixture
 
writeOut(OutputStream) - Method in class org.apache.aries.unittest.fixture.ArchiveFixture.ZipFixture
 

Z

zip(String) - Method in class org.apache.aries.unittest.fixture.ArchiveFixture.ZipFixture
Create a child zip fixture at the given target.

A B C D E F G H I J L M N O P R S T V W Z

Copyright © 2009-2011 The Apache Software Foundation. All Rights Reserved.