Annotation Type AdditionalClasspaths


@Retention(RUNTIME) @Target(TYPE) public @interface AdditionalClasspaths
@AdditionalClasspaths adds all the classes in a particular classpath entry to the CDI environment that are not discovered automatically.
 @RunWith(CdiRunner.class)
 @AdditionalClasspaths(Starfleet.class) //WarpDrive is in the jar that contains the Starfleet class.
 class TestStarship {

     @Inject
     Starship starship; //Starship has an engine in the starfleet jar.

     @Test
     void testStart() {
         starship.start(); // Going to warp!
     }
 }
 
Author:
Bryn Cooke
  • Required Element Summary

    Required Elements
    Modifier and Type
    Required Element
    Description
    Class<?>[]
     
  • Element Details

    • value

      Class<?>[] value
      Returns:
      Array of classes that belong to classpath entries to make discoverable during testing.