Index
All Classes and Interfaces|All Packages|Constant Field Values
A
- afterEach(ExtensionContext) - Method in class org.springframework.modulith.test.PublishedEventsParameterResolver
- afterEach(ExtensionContext) - Method in class org.springframework.modulith.test.ScenarioParameterResolver
- AggregateTestUtils - Class in org.springframework.modulith.test
-
Test utilities to work with aggregates.
- AggregateTestUtils() - Constructor for class org.springframework.modulith.test.AggregateTestUtils
- ALL_DEPENDENCIES - Enum constant in enum class org.springframework.modulith.test.ApplicationModuleTest.BootstrapMode
-
Bootstraps the current module as well as all upstream dependencies (including transitive ones).
- and() - Method in class org.springframework.modulith.test.PublishedEventsAssert.PublishedEventAssert
-
Syntactic sugar to start a new assertion on a different type of event.
- andCleanup(Runnable) - Method in class org.springframework.modulith.test.Scenario.When
- andCleanup(Consumer<T>) - Method in class org.springframework.modulith.test.Scenario.When
- andExpect(Class<E>) - Method in class org.springframework.modulith.test.Scenario.When.StateChangeResult
-
Expects an event of the given type to arrive eventually.
- andVerify(BiConsumer<S, T>) - Method in class org.springframework.modulith.test.Scenario.When.StateChangeResult
-
Verifies the state change result and stimulus result using the given
BiConsumer. - andVerify(Consumer<S>) - Method in class org.springframework.modulith.test.Scenario.When.StateChangeResult
-
Verifies the state change result using the given
Consumer. - andVerifyEvents(Consumer<AssertablePublishedEvents>) - Method in class org.springframework.modulith.test.Scenario.When.StateChangeResult
-
Verifies the underlying
AssertablePublishedEvents. - andWaitAtMost(Duration) - Method in class org.springframework.modulith.test.Scenario.When
-
Configures the
Scenarioto wait for at most the given duration for an event of the subsequent specification to arrive. - andWaitForEventOfType(Class<E>) - Method in class org.springframework.modulith.test.Scenario.When
-
Expects an event of the given type to arrive.
- andWaitForStateChange(Supplier<S>) - Method in class org.springframework.modulith.test.Scenario.When
-
Expects a particular state change on the module to produce a result.
- andWaitForStateChange(Supplier<S>, Predicate<? super S>) - Method in class org.springframework.modulith.test.Scenario.When
-
Expects a particular state change on the module to produce a result and uses the given
Predicateto determine whether the value is conclusive. - ApplicationModuleTest - Annotation Interface in org.springframework.modulith.test
-
Bootstraps the module containing the package of the test class annotated with
ApplicationModuleTest. - ApplicationModuleTest.BootstrapMode - Enum Class in org.springframework.modulith.test
- AssertablePublishedEvents - Interface in org.springframework.modulith.test
-
An AssertJ-based extension of
PublishedEventsto obtain fluent assertions. - assertThat() - Method in interface org.springframework.modulith.test.AssertablePublishedEvents
- AUTOCONFIG_PACKAGES - Static variable in class org.springframework.modulith.test.ModuleTestAutoConfiguration
- AutoConfigurationAndEntityScanPackageCustomizer() - Constructor for class org.springframework.modulith.test.ModuleTestAutoConfiguration.AutoConfigurationAndEntityScanPackageCustomizer
C
- classes() - Element in annotation interface org.springframework.modulith.test.ApplicationModuleTest
-
Alias for
SpringBootTest.classes(). - contains(Class<T>) - Method in class org.springframework.modulith.test.PublishedEventsAssert
-
Asserts that the
PublishedEventscontain at least one event of the given type. - createContextCustomizer(Class<?>, List<ContextConfigurationAttributes>) - Method in class org.springframework.modulith.test.ModuleContextCustomizerFactory
- customize(Function<ConditionFactory, ConditionFactory>) - Method in class org.springframework.modulith.test.Scenario.When
-
Customize the execution of the scenario.
- customizeContext(ConfigurableApplicationContext, MergedContextConfiguration) - Method in class org.springframework.modulith.test.ModuleContextCustomizerFactory.ModuleContextCustomizer
D
- DefaultAssertablePublishedEvents - Class in org.springframework.modulith.test
-
Default implementation of
AssertablePublishedEvents. - DefaultAssertablePublishedEvents() - Constructor for class org.springframework.modulith.test.DefaultAssertablePublishedEvents
-
Creates a new
DefaultAssertablePublishedEvents. - DefaultAssertablePublishedEvents(DefaultPublishedEvents) - Constructor for class org.springframework.modulith.test.DefaultAssertablePublishedEvents
-
Creates a new
DefaultAssertablePublishedEventswith the givenDefaultPublishedEventsdelegate. - DefaultPublishedEvents - Class in org.springframework.modulith.test
-
Default implementation of
PublishedEvents. - DefaultPublishedEvents() - Constructor for class org.springframework.modulith.test.DefaultPublishedEvents
-
Creates a new, empty
DefaultPublishedEventsinstance. - DefaultPublishedEvents(Collection<? extends Object>) - Constructor for class org.springframework.modulith.test.DefaultPublishedEvents
-
Creates a new
DefaultPublishedEventsinstance with the given events. - DIRECT_DEPENDENCIES - Enum constant in enum class org.springframework.modulith.test.ApplicationModuleTest.BootstrapMode
-
Bootstraps the current module as well as its direct dependencies.
E
- EnableScenarios - Annotation Interface in org.springframework.modulith.test
-
Allows using
Scenarioas method parameter in integration tests. - ENTITY_SCAN_PACKAGE - Static variable in class org.springframework.modulith.test.ModuleTestAutoConfiguration
- equals(Object) - Method in class org.springframework.modulith.test.ModuleContextCustomizerFactory.ModuleContextCustomizer
- equals(Object) - Method in class org.springframework.modulith.test.ModuleTestExecution
- equals(Object) - Method in class org.springframework.modulith.test.ModuleTypeExcludeFilter
- eventOfTypeWasPublished(Class<?>) - Method in interface org.springframework.modulith.test.TypedEvents
-
Returns whether an event of the given type was published.
- EventResult(Class<E>, Function<PublishedEvents.TypedPublishedEvents<E>, PublishedEvents.TypedPublishedEvents<E>>, Scenario.When.ExecutionResult<?, T>) - Constructor for class org.springframework.modulith.test.Scenario.When.EventResult
-
Creates a new
Scenario.When.EventResultfor the given type and filter. - eventsOf(Object) - Static method in class org.springframework.modulith.test.AggregateTestUtils
-
Extracts all domain events from the given aggregate that uses Spring Data's
DomainEventsannotation to expose them. - extraIncludes() - Element in annotation interface org.springframework.modulith.test.ApplicationModuleTest
-
Module names of modules to be included in the test run independent of what the
ApplicationModuleTest.mode()defines.
F
- Factory() - Constructor for class org.springframework.modulith.test.TestApplicationModules.Factory
- forEventOfType(Class<E>) - Method in class org.springframework.modulith.test.Scenario.When
-
Alternative to
Scenario.When.andWaitForEventOfType(Class)for better readability if execution customizations have been applied before. - forStateChange(Supplier<S>) - Method in class org.springframework.modulith.test.Scenario.When
-
Alternative to
Scenario.When.andWaitForStateChange(Supplier)for better readability if execution customizations have been applied before. - forStateChange(Supplier<S>, Predicate<? super S>) - Method in class org.springframework.modulith.test.Scenario.When
-
Alternative to
Scenario.When.andWaitForStateChange(Supplier, Predicate)for better readability if execution customizations have been applied before. - forwardExecutorService(ApplicationContext) - Static method in interface org.springframework.modulith.test.ScenarioCustomizer
-
Creates a default scenario customizer that will try to find an
ExecutorServicein the givenApplicationContextin the following order: A uniqueExecutorServicebean defined AThreadPoolTaskExecutorbean defined (the default Spring Boot creates in case noExecutoris explicitly defined in theApplicationContext
G
- getBasePackages() - Method in class org.springframework.modulith.test.ModuleTestExecution
-
Returns all base packages the current execution needs to use for component scanning, auto-configuration etc.
- getBootstrapMode() - Method in class org.springframework.modulith.test.ModuleTestExecution
-
Returns the
ApplicationModuleTest.BootstrapModeto be used for the executions. - getDefaultCustomizer(Method, ApplicationContext) - Method in interface org.springframework.modulith.test.ScenarioCustomizer
-
Return a customizer to be applied to the
Scenarioinstance handed into the given method. - getDependencies() - Method in class org.springframework.modulith.test.ModuleTestExecution
-
Returns all module dependencies, based on the current
ApplicationModuleTest.BootstrapMode. - getDepth() - Method in enum class org.springframework.modulith.test.ApplicationModuleTest.BootstrapMode
-
Returns the
DependencyDepthassociated with theApplicationModuleTest.BootstrapMode. - getExecution() - Method in class org.springframework.modulith.test.ModuleContextCustomizerFactory.ModuleContextCustomizer
-
Returns the underlying initialized
ModuleTestExecution. - getExtraIncludes() - Method in class org.springframework.modulith.test.ModuleTestExecution
-
Returns all
ApplicationModules registered as extra includes for the execution. - getModule() - Method in class org.springframework.modulith.test.ModuleTestExecution
-
Returns the primary
ApplicationModuleto bootstrap. - getModules() - Method in class org.springframework.modulith.test.ModuleTestExecution
-
Returns all
ApplicationModulesof the application.
H
- hashCode() - Method in class org.springframework.modulith.test.ModuleContextCustomizerFactory.ModuleContextCustomizer
- hashCode() - Method in class org.springframework.modulith.test.ModuleTestExecution
- hashCode() - Method in class org.springframework.modulith.test.ModuleTypeExcludeFilter
I
- includes(String) - Method in class org.springframework.modulith.test.ModuleTestExecution
- interceptTestFactoryMethod(InvocationInterceptor.Invocation<T>, ReflectiveInvocationContext<Method>, ExtensionContext) - Method in interface org.springframework.modulith.test.ScenarioCustomizer
- interceptTestMethod(InvocationInterceptor.Invocation<Void>, ReflectiveInvocationContext<Method>, ExtensionContext) - Method in interface org.springframework.modulith.test.ScenarioCustomizer
- interceptTestTemplateMethod(InvocationInterceptor.Invocation<Void>, ReflectiveInvocationContext<Method>, ExtensionContext) - Method in interface org.springframework.modulith.test.ScenarioCustomizer
- iterator() - Method in class org.springframework.modulith.test.ModuleTestExecution
M
- match(MetadataReader, MetadataReaderFactory) - Method in class org.springframework.modulith.test.ModuleTypeExcludeFilter
- matching(Function<T, S>, Predicate<? super S>) - Method in interface org.springframework.modulith.test.PublishedEvents.TypedPublishedEvents
-
Returns all
PublishedEvents.TypedPublishedEventsthat match the given predicate after applying the given mapping step. - matching(Function<T, S>, Predicate<? super S>) - Method in class org.springframework.modulith.test.PublishedEventsAssert.PublishedEventAssert
- matching(Function<T, S>, S) - Method in interface org.springframework.modulith.test.PublishedEvents.TypedPublishedEvents
-
Returns all
PublishedEvents.TypedPublishedEventsthat match the given value after applying the given mapping step. - matching(Function<T, S>, S) - Method in class org.springframework.modulith.test.PublishedEventsAssert.PublishedEventAssert
-
Asserts that at least one event exists for which the value extracted by the given
Functionmatches the given one. - matching(Predicate<? super E>) - Method in class org.springframework.modulith.test.Scenario.When.EventResult
-
Matches events that satisfy the given
Predicate. - matching(Predicate<? super T>) - Method in interface org.springframework.modulith.test.PublishedEvents.TypedPublishedEvents
-
Returns all
PublishedEvents.TypedPublishedEventsthat match the given predicate. - matching(Predicate<? super T>) - Method in class org.springframework.modulith.test.PublishedEventsAssert.PublishedEventAssert
-
Asserts that at least one event matches the given predicate.
- matchingMapped(Function<E, S>, Predicate<? super S>) - Method in class org.springframework.modulith.test.Scenario.When.EventResult
- matchingMapped(Function<T, S>, Predicate<? super S>) - Method in interface org.springframework.modulith.test.PublishedEvents.TypedPublishedEvents
-
Deprecated, for removal: This API element is subject to removal in a future version.
- matchingMappedValue(Function<E, S>, S) - Method in class org.springframework.modulith.test.Scenario.When.EventResult
-
Matches events that extracting the given value using the given
Function. - mode() - Element in annotation interface org.springframework.modulith.test.ApplicationModuleTest
- module() - Element in annotation interface org.springframework.modulith.test.ApplicationModuleTest
-
Logical name of the module to be bootstrapped in case
ApplicationModuleTestwill be used outside a module package - ModuleContextCustomizer(Class<?>) - Constructor for class org.springframework.modulith.test.ModuleContextCustomizerFactory.ModuleContextCustomizer
- ModuleContextCustomizerFactory - Class in org.springframework.modulith.test
- ModuleContextCustomizerFactory() - Constructor for class org.springframework.modulith.test.ModuleContextCustomizerFactory
- ModuleContextCustomizerFactory.ModuleContextCustomizer - Class in org.springframework.modulith.test
- ModuleTestAutoConfiguration - Class in org.springframework.modulith.test
-
An unconditional auto-configuration registering an
ImportBeanDefinitionRegistrarto customize both the entity scan and auto-configuration packages to the packages defined by theModuleTestExecutionin the application context. - ModuleTestAutoConfiguration() - Constructor for class org.springframework.modulith.test.ModuleTestAutoConfiguration
- ModuleTestAutoConfiguration.AutoConfigurationAndEntityScanPackageCustomizer - Class in org.springframework.modulith.test
- ModuleTestExecution - Class in org.springframework.modulith.test
- ModuleTypeExcludeFilter - Class in org.springframework.modulith.test
- ModuleTypeExcludeFilter(Class<?>) - Constructor for class org.springframework.modulith.test.ModuleTypeExcludeFilter
O
- of(Class<?>) - Static method in class org.springframework.modulith.test.ModuleTestExecution
- of(Class<?>) - Method in class org.springframework.modulith.test.TestApplicationModules.Factory
- of(Class<?>) - Static method in class org.springframework.modulith.test.TestApplicationModules
-
Creates an
ApplicationModulesinstance from the given application class but only inspecting the test code. - of(Object...) - Static method in interface org.springframework.modulith.test.PublishedEvents
-
Creates a new
PublishedEventsinstance for the given events. - of(String) - Static method in class org.springframework.modulith.test.TestApplicationModules
-
Creates an
ApplicationModulesinstance from the given package but only inspecting the test code. - of(Collection<? extends Object>) - Static method in interface org.springframework.modulith.test.PublishedEvents
-
Creates a new
PublishedEventsinstance for the given events. - ofSubType(Class<S>) - Method in interface org.springframework.modulith.test.PublishedEvents.TypedPublishedEvents
-
Further constrain the event type for downstream assertions.
- ofType(Class<S>) - Method in interface org.springframework.modulith.test.PublishedEvents.TypedPublishedEvents
- ofType(Class<T>) - Method in class org.springframework.modulith.test.DefaultAssertablePublishedEvents
- ofType(Class<T>) - Method in class org.springframework.modulith.test.DefaultPublishedEvents
- ofType(Class<T>) - Method in interface org.springframework.modulith.test.PublishedEvents
- ofType(Class<T>) - Method in interface org.springframework.modulith.test.TypedEvents
-
Returns all events of the given type.
- onApplicationEvent(ApplicationEvent) - Method in class org.springframework.modulith.test.DefaultAssertablePublishedEvents
- onApplicationEvent(ApplicationEvent) - Method in class org.springframework.modulith.test.DefaultPublishedEvents
- org.springframework.modulith.test - module org.springframework.modulith.test
- org.springframework.modulith.test - package org.springframework.modulith.test
-
Integration test support for Spring Modulith
ApplicationModules.
P
- publish(Object) - Method in class org.springframework.modulith.test.Scenario
-
Publishes the given event.
- publish(Supplier<Object>) - Method in class org.springframework.modulith.test.Scenario
-
Publishes the event provided by the given
Supplier. - PublishedEvents - Interface in org.springframework.modulith.test
-
All Spring application events fired during the test execution.
- PublishedEvents.TypedPublishedEvents<T> - Interface in org.springframework.modulith.test
-
All application events of a given type that were fired during a test execution.
- PublishedEventsAssert - Class in org.springframework.modulith.test
-
AssertJ
AssertforPublishedEvents. - PublishedEventsAssert(TypedEvents) - Constructor for class org.springframework.modulith.test.PublishedEventsAssert
-
Creates a new
PublishedEventsAssert - PublishedEventsAssert.PublishedEventAssert<T> - Class in org.springframework.modulith.test
-
Assertions further qualifying the expected events.
- PublishedEventsExtension - Class in org.springframework.modulith.test
-
JUnit 5
Extensionfor standalone usage withoutApplicationModuleTest. - PublishedEventsExtension() - Constructor for class org.springframework.modulith.test.PublishedEventsExtension
- PublishedEventsParameterResolver - Class in org.springframework.modulith.test
-
Provides instances of
PublishedEventsas test method parameters. - PublishedEventsParameterResolver() - Constructor for class org.springframework.modulith.test.PublishedEventsParameterResolver
- PublishedEventsParameterResolver(Function<ExtensionContext, ApplicationContext>) - Constructor for class org.springframework.modulith.test.PublishedEventsParameterResolver
R
- registerBeanDefinitions(AnnotationMetadata, BeanDefinitionRegistry) - Method in class org.springframework.modulith.test.ModuleTestAutoConfiguration.AutoConfigurationAndEntityScanPackageCustomizer
- resolveParameter(ParameterContext, ExtensionContext) - Method in class org.springframework.modulith.test.PublishedEventsParameterResolver
- resolveParameter(ParameterContext, ExtensionContext) - Method in class org.springframework.modulith.test.ScenarioParameterResolver
S
- Scenario - Class in org.springframework.modulith.test
-
A DSL to define integration testing scenarios for application modules.
- Scenario(TransactionTemplate, ApplicationEventPublisher, AssertablePublishedEvents) - Constructor for class org.springframework.modulith.test.Scenario
-
Creates a new
Scenariofor the givenTransactionTemplate,ApplicationEventPublisherandAssertablePublishedEvents. - Scenario.When<T> - Class in org.springframework.modulith.test
- Scenario.When.EventResult<E> - Class in org.springframework.modulith.test
-
The result of an expected event publication.
- Scenario.When.StateChangeResult<S> - Class in org.springframework.modulith.test
-
The result of an expected state change.
- ScenarioCustomizer - Interface in org.springframework.modulith.test
-
A JUnit
InvocationInterceptorto register a default customizer to be applied to allScenarioinstances associated with that test case. - ScenarioParameterResolver - Class in org.springframework.modulith.test
-
JUnit
ParameterResolverforScenario. - ScenarioParameterResolver() - Constructor for class org.springframework.modulith.test.ScenarioParameterResolver
-
Creates a new
ScenarioParameterResolver. - setBasePackagesOn(BeanDefinitionRegistry, String, List<String>) - Method in class org.springframework.modulith.test.ModuleTestAutoConfiguration.AutoConfigurationAndEntityScanPackageCustomizer
- setDefaultCustomizer(Function<ConditionFactory, ConditionFactory>) - Method in class org.springframework.modulith.test.Scenario
-
Extension hook to allow registration of a global customizer.
- STANDALONE - Enum constant in enum class org.springframework.modulith.test.ApplicationModuleTest.BootstrapMode
-
Bootstraps the current module only.
- StateChangeResult(Scenario.When.ExecutionResult<S, T>) - Constructor for class org.springframework.modulith.test.Scenario.When.StateChangeResult
- stimulate(Runnable) - Method in class org.springframework.modulith.test.Scenario
-
Stimulates the system by executing the given
Runnable. - stimulate(BiConsumer<TransactionOperations, ApplicationEventPublisher>) - Method in class org.springframework.modulith.test.Scenario
-
Stimulate the system using the given
TransactionOperationsandApplicationEventPublisher. - stimulate(BiFunction<TransactionOperations, ApplicationEventPublisher, S>) - Method in class org.springframework.modulith.test.Scenario
-
Stimulate the system using the given
TransactionOperationsandApplicationEventPublisherand produce a result. - stimulate(Function<TransactionOperations, S>) - Method in class org.springframework.modulith.test.Scenario
-
Stimulates the system using the given function providing access to the
TransactionOperationsand keeping the supplied value around for later verification. - stimulate(Supplier<S>) - Method in class org.springframework.modulith.test.Scenario
-
Stimulates the system using the given
Supplierand keeping the supplied value around for later verification. - supportsParameter(ParameterContext, ExtensionContext) - Method in class org.springframework.modulith.test.PublishedEventsParameterResolver
- supportsParameter(ParameterContext, ExtensionContext) - Method in class org.springframework.modulith.test.ScenarioParameterResolver
T
- TestApplicationModules - Class in org.springframework.modulith.test
-
Utility methods to work with test
ApplicationModules. - TestApplicationModules() - Constructor for class org.springframework.modulith.test.TestApplicationModules
- TestApplicationModules.Factory - Class in org.springframework.modulith.test
-
Custom
ApplicationModulesFactoryto bootstrap anApplicationModulesinstance only considering test code. - toArrive() - Method in class org.springframework.modulith.test.Scenario.When.EventResult
-
Awaits an event of the given specification to arrive.
- toArriveAndAssert(BiConsumer<PublishedEventsAssert.PublishedEventAssert<? super E>, T>) - Method in class org.springframework.modulith.test.Scenario.When.EventResult
-
Expects the events previously specified to arrive and additionally assert the
PublishedEventsAssertfor the captured event and original stimulus result. - toArriveAndAssert(Consumer<PublishedEventsAssert.PublishedEventAssert<? super E>>) - Method in class org.springframework.modulith.test.Scenario.When.EventResult
-
Expects the events previously specified to arrive and additionally assert the
PublishedEventsAssertfor the captured event. - toArriveAndVerify(BiConsumer<E, T>) - Method in class org.springframework.modulith.test.Scenario.When.EventResult
-
Awaits an event of the given specification to arrive and invokes the given consumer with it as well as the result created by the stimulus.
- toArriveAndVerify(Consumer<E>) - Method in class org.springframework.modulith.test.Scenario.When.EventResult
-
Awaits an event of the given specification to arrive and invokes the given consumer with it.
- toString() - Method in class org.springframework.modulith.test.DefaultAssertablePublishedEvents
- toString() - Method in class org.springframework.modulith.test.DefaultPublishedEvents
- TypedEvents - Interface in org.springframework.modulith.test
V
- value() - Element in annotation interface org.springframework.modulith.test.ApplicationModuleTest
- valueOf(String) - Static method in enum class org.springframework.modulith.test.ApplicationModuleTest.BootstrapMode
-
Returns the enum constant of this class with the specified name.
- values() - Static method in enum class org.springframework.modulith.test.ApplicationModuleTest.BootstrapMode
-
Returns an array containing the constants of this enum class, in the order they are declared.
- verify() - Method in class org.springframework.modulith.test.ModuleTestExecution
-
Explicitly trigger the module structure verification.
- verifyAutomatically() - Element in annotation interface org.springframework.modulith.test.ApplicationModuleTest
-
Whether to automatically verify the module structure for validity.
- verifyModule() - Method in class org.springframework.modulith.test.ModuleTestExecution
-
Verifies the setup of the module bootstrapped by this execution.
W
- webEnvironment() - Element in annotation interface org.springframework.modulith.test.ApplicationModuleTest
-
The type of web environment to create when applicable.
- When(BiFunction<TransactionOperations, ApplicationEventPublisher, T>, Consumer<T>, Function<ConditionFactory, ConditionFactory>) - Constructor for class org.springframework.modulith.test.Scenario.When
All Classes and Interfaces|All Packages|Constant Field Values
PublishedEvents.TypedPublishedEvents.matching(Function, Predicate)instead.