Examples of InstanceManager


Examples of org.apache.felix.ipojo.InstanceManager

        // Check the POJO interface
        Assert.assertTrue(Arrays.asList(cl.getInterfaces()).contains(Pojo.class));

        cst.setAccessible(true);
        Object pojo = cst.newInstance(new Object[] {new InstanceManager()});
        Assert.assertNotNull(pojo);
        Assert.assertTrue(pojo instanceof Pojo);

        Method method = cl.getMethod("getS1", new Class[0]);
        Assert.assertTrue(((Boolean) method.invoke(pojo, new Object[0])).booleanValue());
View Full Code Here

Examples of org.apache.felix.ipojo.InstanceManager

        Assert.assertTrue(found);

        // Check the POJO interface
        Assert.assertTrue(Arrays.asList(cl.getInterfaces()).contains(Pojo.class));

        InstanceManager im = (InstanceManager) Mockito.mock(InstanceManager.class);
        cst.setAccessible(true);
        Object pojo = cst.newInstance(new Object[] {im});
        Assert.assertNotNull(pojo);
        Assert.assertTrue(pojo instanceof Pojo);
View Full Code Here

Examples of org.apache.felix.ipojo.InstanceManager

        // Check the POJO interface
        Assert.assertTrue(Arrays.asList(cl.getInterfaces()).contains(Pojo.class));


        // Creation using cst
        InstanceManager im = (InstanceManager) Mockito.mock(InstanceManager.class);
        cst.setAccessible(true);
        Object pojo = cst.newInstance(new Object[] {im});
        Assert.assertNotNull(pojo);
        Assert.assertTrue(pojo instanceof Pojo);
View Full Code Here

Examples of org.apache.felix.ipojo.InstanceManager

        // Check the POJO interface
        Assert.assertTrue(Arrays.asList(cl.getInterfaces()).contains(Pojo.class));

        cst.setAccessible(true);
        Object pojo = cst.newInstance(new Object[] {new InstanceManager()});
        Assert.assertNotNull(pojo);
        Assert.assertTrue(pojo instanceof Pojo);

    }
View Full Code Here

Examples of org.apache.felix.ipojo.InstanceManager

        // Check the POJO interface
        Assert.assertTrue(Arrays.asList(cl.getInterfaces()).contains(Pojo.class));

        cst.setAccessible(true);
        Object pojo = cst.newInstance(new Object[] {new InstanceManager()});
        Assert.assertNotNull(pojo);
        Assert.assertTrue(pojo instanceof Pojo);

        Method method = cl.getMethod("start", new Class[0]);
        Assert.assertTrue(((Boolean) method.invoke(pojo, new Object[0])).booleanValue());
View Full Code Here

Examples of org.apache.felix.ipojo.InstanceManager

        Mockito.when(context.getBundle()).thenReturn(bundle);

        ComponentFactory factory = (ComponentFactory) Mockito.mock(ComponentFactory.class);
        Mockito.when(factory.getBundleClassLoader()).thenReturn(Dependency.class.getClassLoader());

        InstanceManager im = (InstanceManager) Mockito.mock(InstanceManager.class);
        Mockito.when(im.getContext()).thenReturn(context);
        Mockito.when(im.getFactory()).thenReturn(factory);

        DependencyHandler handler = (DependencyHandler) Mockito.mock(DependencyHandler.class);
        Mockito.when(handler.getInstanceManager()).thenReturn(im);
        Logger logger = new Logger(context, "test", Logger.INFO);
View Full Code Here

Examples of org.apache.felix.ipojo.InstanceManager

        Mockito.when(context.getBundle()).thenReturn(bundle);

        ComponentFactory factory = (ComponentFactory) Mockito.mock(ComponentFactory.class);
        Mockito.when(factory.getBundleClassLoader()).thenReturn(Dependency.class.getClassLoader());

        InstanceManager im = (InstanceManager) Mockito.mock(InstanceManager.class);
        Mockito.when(im.getContext()).thenReturn(context);
        Mockito.when(im.getFactory()).thenReturn(factory);

        DependencyHandler handler = (DependencyHandler) Mockito.mock(DependencyHandler.class);
        Mockito.when(handler.getInstanceManager()).thenReturn(im);
        Logger logger = new Logger(context, "test", Logger.INFO);
View Full Code Here

Examples of org.apache.felix.ipojo.InstanceManager

        Mockito.when(context.getBundle()).thenReturn(bundle);

        ComponentFactory factory = (ComponentFactory) Mockito.mock(ComponentFactory.class);
        Mockito.when(factory.getBundleClassLoader()).thenReturn(Dependency.class.getClassLoader());

        InstanceManager im = (InstanceManager) Mockito.mock(InstanceManager.class);
        Mockito.when(im.getContext()).thenReturn(context);
        Mockito.when(im.getFactory()).thenReturn(factory);

        DependencyHandler handler = (DependencyHandler) Mockito.mock(DependencyHandler.class);
        Mockito.when(handler.getInstanceManager()).thenReturn(im);
        Logger logger = new Logger(context, "test", Logger.INFO);
View Full Code Here

Examples of org.apache.felix.ipojo.InstanceManager

        Mockito.when(context.getBundle()).thenReturn(bundle);

        ComponentFactory factory = (ComponentFactory) Mockito.mock(ComponentFactory.class);
        Mockito.when(factory.getBundleClassLoader()).thenReturn(Dependency.class.getClassLoader());

        InstanceManager im = (InstanceManager) Mockito.mock(InstanceManager.class);
        Mockito.when(im.getContext()).thenReturn(context);
        Mockito.when(im.getFactory()).thenReturn(factory);

        DependencyHandler handler = (DependencyHandler) Mockito.mock(DependencyHandler.class);
        Mockito.when(handler.getInstanceManager()).thenReturn(im);
        Logger logger = new Logger(context, "test", Logger.INFO);
View Full Code Here

Examples of org.apache.flink.runtime.instance.InstanceManager

  }
 
  public TaskManager[] getTaskManagers() {
    JobManager jm = this.jobManager;
    if (jm != null) {
      InstanceManager im = jm.getInstanceManager();
      if (im instanceof LocalInstanceManager) {
        return ((LocalInstanceManager) im).getTaskManagers();
      }
    }
   
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.