Package io.github.cdiunit
package io.github.cdiunit
CDI Unit provides annotation-driven unit and integration testing support for applications using CDI that is
agnostic of the actual testing framework in use. The same techniques and annotation-based configuration used in, for example,
a JUnit environment can also be applied to tests written with TestNG, etc.
-
ClassDescription
@ActivatedAlternatives
adds classes to the CDI environment that are not discovered automatically and marks them as an activated alternative as if they were specified in beans.xml.Activate listed scopes for the duration of the test.Container annotation for repeatableActivateScopes
.@AdditionalClasses
adds classes to the CDI environment that are not discovered automatically.@AdditionalClasspaths
adds all the classes in a particular classpath entry to the CDI environment that are not discovered automatically.@AdditionalPackages
adds all the classes in a particular package entry to the CDI environment that are not discovered automatically.Use to explicitly open and close Request, Session and Conversation scopes.@IgnoredClasses
prevent classes from being automatically added to the CDI environment.Starts a conversation around the annotated method.Starts a request around the annotated method.Starts a session around the annotated method.Defines the isolation level for a test case.@ProducesAlternative
causes a produced variable or method to act as an enabled alternative overriding any other suitable injections.