Search in sources :

Example 41 with MethodCall

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

the class RecursiveBundleTrackerTest method setup.

@Before
public void setup() {
    context = Skeleton.newMock(BundleContext.class);
    Skeleton.getSkeleton(context).setReturnValue(new MethodCall(BundleContext.class, "getServiceReference", "org.osgi.service.framework.CompositeBundleFactory"), Skeleton.newMock(ServiceReference.class));
}
Also used : MethodCall(org.apache.aries.unittest.mocks.MethodCall) BundleContext(org.osgi.framework.BundleContext) ServiceReference(org.osgi.framework.ServiceReference) Before(org.junit.Before)

Aggregations

MethodCall (org.apache.aries.unittest.mocks.MethodCall)41 Test (org.junit.Test)30 Properties (java.util.Properties)13 BundleContext (org.osgi.framework.BundleContext)13 Hashtable (java.util.Hashtable)12 InitialContext (javax.naming.InitialContext)11 AriesApplication (org.apache.aries.application.management.AriesApplication)10 Context (javax.naming.Context)9 BundleMock (org.apache.aries.mocks.BundleMock)8 Name (javax.naming.Name)7 ApplicationMetadata (org.apache.aries.application.ApplicationMetadata)7 ObjectFactory (javax.naming.spi.ObjectFactory)6 Content (org.apache.aries.application.Content)6 DeployedBundles (org.apache.aries.application.modelling.DeployedBundles)6 ModelledResource (org.apache.aries.application.modelling.ModelledResource)6 Skeleton (org.apache.aries.unittest.mocks.Skeleton)6 ArrayList (java.util.ArrayList)5 Manifest (java.util.jar.Manifest)5 Reference (javax.naming.Reference)5 ServiceRegistration (org.osgi.framework.ServiceRegistration)5