Search in sources :

Example 6 with Skeleton

use of org.apache.aries.unittest.mocks.Skeleton in project aries by apache.

the class RecursiveBundleTrackerTest method composite.

private CompositeBundle composite(String symbolicName, String version) {
    CompositeBundle cb = Skeleton.newMock(CompositeBundle.class);
    Skeleton cbSkel = Skeleton.getSkeleton(cb);
    cbSkel.setReturnValue(new MethodCall(CompositeBundle.class, "getSymbolicName"), symbolicName);
    cbSkel.setReturnValue(new MethodCall(CompositeBundle.class, "getVersion"), new Version(version));
    return cb;
}
Also used : Version(org.osgi.framework.Version) Skeleton(org.apache.aries.unittest.mocks.Skeleton) CompositeBundle(org.osgi.service.framework.CompositeBundle) MethodCall(org.apache.aries.unittest.mocks.MethodCall)

Aggregations

MethodCall (org.apache.aries.unittest.mocks.MethodCall)6 Skeleton (org.apache.aries.unittest.mocks.Skeleton)6 Hashtable (java.util.Hashtable)2 EJBRegistry (org.apache.aries.ejb.modelling.EJBRegistry)2 Bundle (org.osgi.framework.Bundle)2 InvocationHandler (java.lang.reflect.InvocationHandler)1 Method (java.lang.reflect.Method)1 SQLException (java.sql.SQLException)1 Collection (java.util.Collection)1 Iterator (java.util.Iterator)1 Properties (java.util.Properties)1 Callable (java.util.concurrent.Callable)1 InitialContext (javax.naming.InitialContext)1 NameNotFoundException (javax.naming.NameNotFoundException)1 NamingException (javax.naming.NamingException)1 BundleMock (org.apache.aries.mocks.BundleMock)1 ProxyManager (org.apache.aries.proxy.ProxyManager)1 MethodCallHandler (org.apache.aries.unittest.mocks.MethodCallHandler)1 Test (org.junit.Test)1 BundleContext (org.osgi.framework.BundleContext)1