@Documented @Inherited @Retention(value=RUNTIME) @Target(value=TYPE) public @interface Beans
CamelCdiRunner
.CamelCdiRunner
Modifier and Type | Optional Element and Description |
---|---|
Class<?>[] |
alternatives
Returns the list of alternatives
to be selected in the application.
|
Class<?>[] |
classes
Returns the list of classes to be added as beans in the application.
|
Class<?>[] |
packages
Returns the list of classes whose packages are to be added for beans
discovery.
|
public abstract Class<?>[] alternatives
@Named("foo")
public class FooBean {
}
It can be replaced in your test by declaring the following alternative
bean:
@Alternative
@Named("foo")
public class AlternativeBean {
}
And adding the @Beans
annotation to you test class to activate it:
@RunWith(CamelCdiRunner.class)
@Beans(alternatives = AlternativeBean.class)
public class TestWithAlternative {
}
Alternative
public abstract Class<?>[] classes
public abstract Class<?>[] packages
Apache Camel