mil.dod.th.ose.test/src/mil/dod/th/ose/test/BundleContextMocker.java
public static BundleContext createBasicMock()
    {
        BundleContext context = mock(BundleContext.class);
        
        Bundle bundle = mock(Bundle.class);
        when(context.getBundle()).thenReturn(bundle);
        when(bundle.getBundleContext()).thenReturn(context);
        
        return context;
    }
/**
     * Just mock out the basic properties.
     */
Just mock out the basic properties.
Just mock out the basic properties .
public static BundleContext createBasicMock()
    {
        BundleContext context = mock(BundleContext.class);
        Bundle bundle = mock(Bundle.class);
        when(context.getBundle()).thenReturn(bundle);
        when(bundle.getBundleContext()).thenReturn(context);
        return context;
    }
public static BundleContext createBasicMock ( ) { BundleContext context = mock ( BundleContext . class ) ; Bundle bundle = mock ( Bundle . class ) ; when ( context . getBundle ( ) ) . thenReturn ( bundle ) ; when ( bundle . getBundleContext ( ) ) . thenReturn ( context ) ; return context ; }
Just mock out the basic properties.
Just mock out the basic properties .