Package io.github.achirdlabs.rift.spring
Annotation Interface ConfigureImposter
@Target(TYPE)
@Retention(RUNTIME)
@Repeatable(ConfigureImposters.class)
@Inherited
@Documented
public @interface ConfigureImposter
Declares a named imposter to create when the test context starts. Repeatable.
The imposter's URI (and optionally port) are published as Spring environment properties so the application under test is wired to the imposter without any test-specific configuration.
-
Required Element Summary
Required ElementsModifier and TypeRequired ElementDescriptionLogical name; used forInjectImposterlookup and as the engine imposter name. -
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionProperty set toimposter.uri().toString()(highest test precedence).Property set toimposter.port().Class<? extends Supplier<ImposterSpec>> Supplier of the imposter specification (pre-stubbing, recording, etc.).
-
Element Details
-
name
String nameLogical name; used forInjectImposterlookup and as the engine imposter name. -
baseUrlProperty
String baseUrlPropertyProperty set toimposter.uri().toString()(highest test precedence). Empty = skip.- Default:
""
-
portProperty
String portPropertyProperty set toimposter.port(). Empty = skip.- Default:
""
-
spec
Class<? extends Supplier<ImposterSpec>> specSupplier of the imposter specification (pre-stubbing, recording, etc.). The defaultNoSpecis a sentinel meaning "a bare recording imposter" — the integration createsimposter(name).record().- Default:
io.github.achirdlabs.rift.spring.NoSpec.class
-