Пример #1
0
 @Override
 public synchronized void start(StartContext context) throws StartException {
   serviceTarget = context.getChildTarget();
   arqService.registerArquillianConfig(this);
   for (String testClass : testClasses) {
     ServiceTargetAssociation.setServiceTarget(testClass, serviceTarget);
   }
 }
Пример #2
0
 @Override
 public synchronized void stop(StopContext context) {
   context.getController().setMode(Mode.REMOVE);
   arqService.unregisterArquillianConfig(this);
   for (String testClass : testClasses) {
     ServiceTargetAssociation.clearServiceTarget(testClass);
   }
 }
Пример #3
0
  Class<?> loadClass(String className) throws ClassNotFoundException {

    if (testClasses.contains(className) == false)
      throw new ClassNotFoundException("Class '" + className + "' not found in: " + testClasses);

    Module module = depUnit.getAttachment(Attachments.MODULE);
    BundleAssociation.setBundle(getAssociatedBundle(module));

    Class<?> testClass = module.getClassLoader().loadClass(className);

    ServiceTargetAssociation.setServiceTarget(serviceTarget);
    return testClass;
  }