All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.jglue.cdiunit.AdditionalClasspaths Maven / Gradle / Ivy

Go to download

A module that can be used together with cdiunit to build en ejb-test-environment.

The newest version!
package org.jglue.cdiunit;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;


/**
 * @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 */ @Retention(RetentionPolicy.RUNTIME) @Target(ElementType.TYPE) public @interface AdditionalClasspaths { /** * @return Array of classes that belong to classpath entries to make discoverable during testing. */ public Class[] value(); }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy