Package io.github.achirdlabs.rift.spring
Annotation Interface EnableRift
@Target(TYPE)
@Retention(RUNTIME)
@Inherited
@Documented
@ExtendWith(RiftParameterResolver.class)
public @interface EnableRift
Enables the rift-java Spring test integration on a test class: starts one
Rift engine for the (cacheable) Spring test context and drives the
ConfigureImposter declarations.
The annotation attributes are the Spring context-cache key contributor (see
RiftContextCustomizer#equals); two test classes with identical @EnableRift/
@ConfigureImposter configuration share one application context and therefore one engine.
Meta-annotated with @ExtendWith(RiftParameterResolver) so InjectImposter/InjectRift resolve as @Test method parameters with no extra
@ExtendWith — parity with the field injection driven by RiftTestExecutionListener.
-
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionAdmin API URI forTransport.CONNECT(andTransport.AUTOwhen set).When configured imposters are reset during a test class run.How to obtain the engine.
-
Element Details
-
transport
Transport transportHow to obtain the engine.- Default:
AUTO
-
adminUri
String adminUriAdmin API URI forTransport.CONNECT(andTransport.AUTOwhen set). Supports${property}placeholders resolved against the test context environment.- Default:
""
-
reset
Reset resetWhen configured imposters are reset during a test class run.- Default:
PER_TEST
-