Examples of loadTypes()


Examples of org.mokai.plugin.PluginMechanism.loadTypes()

    PluginMechanism pluginMechanism = mock(PluginMechanism.class);

    Set<Class<? extends Acceptor>> acceptorClasses = new HashSet<Class<? extends Acceptor>>();
    acceptorClasses.add(MockAcceptor.class);

    when(pluginMechanism.loadTypes(Acceptor.class))
      .thenReturn(acceptorClasses);

    Set<Class<? extends Action>> actionClasses = new HashSet<Class<? extends Action>>();
    actionClasses.add(MockAction.class);
View Full Code Here

Examples of org.mokai.plugin.PluginMechanism.loadTypes()

      .thenReturn(acceptorClasses);

    Set<Class<? extends Action>> actionClasses = new HashSet<Class<? extends Action>>();
    actionClasses.add(MockAction.class);

    when(pluginMechanism.loadTypes(Action.class))
      .thenReturn(actionClasses);

    Set<Class<? extends Connector>> receiverClasses = new HashSet<Class<? extends Connector>>();
    receiverClasses.add(MockConnector.class);
View Full Code Here

Examples of org.mokai.plugin.PluginMechanism.loadTypes()

      .thenReturn(actionClasses);

    Set<Class<? extends Connector>> receiverClasses = new HashSet<Class<? extends Connector>>();
    receiverClasses.add(MockConnector.class);

    when(pluginMechanism.loadTypes(Connector.class))
      .thenReturn(receiverClasses);

    Set<Class<? extends Processor>> processorClasses = new HashSet<Class<? extends Processor>>();
    processorClasses.add(MockConnector.class);
View Full Code Here

Examples of org.mokai.plugin.PluginMechanism.loadTypes()

      .thenReturn(receiverClasses);

    Set<Class<? extends Processor>> processorClasses = new HashSet<Class<? extends Processor>>();
    processorClasses.add(MockConnector.class);

    when(pluginMechanism.loadTypes(Processor.class))
      .thenReturn(processorClasses);

    return pluginMechanism;
  }
}
View Full Code Here

Examples of org.mokai.plugin.jpf.JpfPluginMechanism.loadTypes()

    // check that we can load the class
    Class<?> acceptorClass = pluginMechanism.loadClass("org.mokai.acceptor.TestAcceptor");
    Assert.assertNotNull(acceptorClass);

    // check that we find the acceptor class in the test plugin
    Set<Class<? extends Acceptor>> acceptorTypes = pluginMechanism.loadTypes(Acceptor.class);
    Assert.assertEquals(1, acceptorTypes.size());
    Assert.assertEquals(acceptorClass, acceptorTypes.iterator().next());

    pluginMechanism.destroy();
  }
View Full Code Here

Examples of org.mokai.plugin.jpf.JpfPluginMechanism.loadTypes()

    // check that we can load the class
    Class<?> actionClass = (Class<?>) pluginMechanism.loadClass("org.mokai.action.TestAction");
    Assert.assertNotNull(actionClass);

    // check that we find the action class in the test plugin
    Set<Class<? extends Action>> actionTypes = pluginMechanism.loadTypes(Action.class);
    Assert.assertEquals(1, actionTypes.size());
    Assert.assertEquals(actionClass, actionTypes.iterator().next());

    pluginMechanism.destroy();
  }
View Full Code Here

Examples of org.mokai.plugin.jpf.JpfPluginMechanism.loadTypes()

    // check that we can load the class
    Class<?> receiverClass = (Class<?>) pluginMechanism.loadClass("org.mokai.connector.TestConnector");
    Assert.assertNotNull(receiverClass);

    // check that we find the receiver class in the test plugin
    Set<Class<? extends Connector>> receiverTypes = pluginMechanism.loadTypes(Connector.class);
    Assert.assertEquals(1, receiverTypes.size());
    Assert.assertEquals(receiverClass, receiverTypes.iterator().next());

    pluginMechanism.destroy();
  }
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.