예제 #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;
  }