Class DroneTestEnricher

java.lang.Object
org.jboss.arquillian.drone.impl.DroneTestEnricher
All Implemented Interfaces:
org.jboss.arquillian.test.spi.TestEnricher

public class DroneTestEnricher extends Object implements org.jboss.arquillian.test.spi.TestEnricher
Enriches test with drone instance and context path. Injects existing instance into every field annotated with Drone. Handles enrichment for method arguments as well.

This enricher is indirectly responsible for firing chain of events that transform a callable into real instance by firing BeforeDroneInstantiated event.

Author:
Karel Piwko
  • Field Details

  • Constructor Details

    • DroneTestEnricher

      public DroneTestEnricher()
  • Method Details

    • enrich

      public void enrich(Object testCase)
      Specified by:
      enrich in interface org.jboss.arquillian.test.spi.TestEnricher
    • resolve

      public Object[] resolve(Method method)
      Specified by:
      resolve in interface org.jboss.arquillian.test.spi.TestEnricher
    • enrichTestClass

      public void enrichTestClass(Class<?> testClass, Object testCase, boolean onlyStatic)
      Enriches the given test class with a drone instance and a context path. Injects existing instance into every field annotated with Drone.
      Parameters:
      testClass - Test class to be enriched
      testCase - Instance of the test case (usually the class is same as the testClass)
      onlyStatic - If the drone instance should be injected only into static fields