Commit Graph

73 Commits

Author SHA1 Message Date
Oliver Drotbohm
f93bb39648 GH-327 - Move off of Google's Suppliers.memoize(…). 2023-10-16 08:38:43 +02:00
Oliver Drotbohm
f949b508a4 GH-304 - Prepare next development iteration. 2023-09-21 23:11:07 +02:00
Oliver Drotbohm
f3e9ce5fa2 GH-304 - Release version 1.0.1. 2023-09-21 23:11:06 +02:00
Oliver Drotbohm
0cc7c352f8 GH-274 - Prepare next development iteration. 2023-08-24 14:37:38 -07:00
Oliver Drotbohm
6197d35937 GH-274 - Release version 1.0.0. 2023-08-21 06:59:57 -07:00
Oliver Drotbohm
941394f2d5 GH-273 - Remove experimental declaration from Scenario. 2023-08-17 17:35:09 +02:00
Oliver Drotbohm
39ce5346c6 GH-270 - Prepare next development iteration. 2023-08-16 08:05:46 +02:00
Oliver Drotbohm
2c5cedd1d1 GH-270 - Release version 1.0.0-RC2. 2023-08-16 08:05:46 +02:00
Oliver Drotbohm
1a84ae256f GH-260 - Prepare next development iteration. 2023-08-09 22:29:57 +02:00
Oliver Drotbohm
bf68d74756 GH-260 - Release version 1.0.0-RC1. 2023-08-09 22:29:56 +02:00
Oliver Drotbohm
3055212e4b GH-253 - Let @ApplicationModuleTest be meta-annotated with @SpringBootTest.
@ApplicationModuleTest is now meta-annotated with @SpringBootTest. This allows us to remove a couple of declarations that we actually had copied from it (such as the TestContextBootstrapper, the SpringExtension etc.)

The presence of the original annotation allow test-related auto-configuration to inspect @SprignBootTest for particular configuration. For example, we now alias the WebEnvironment to make it configurable for the test execution.
2023-08-03 09:46:42 +02:00
Oliver Drotbohm
5e2da724da GH-199 - Prepare next development iteration. 2023-06-23 12:55:10 +02:00
Oliver Drotbohm
a74c4e582d GH-199 - Release version 1.0.0-M1. 2023-06-23 12:55:09 +02:00
Oliver Drotbohm
5dfffa2244 GH-216 - Forward an ApplicationContext's ExecutorService to Scenario instances by default.
We now register a default customizer on the Scenario instances created to pick up an ExecutorService defined in the ApplicationContext so that customizations made to that are considered in the test execution.
2023-06-23 12:49:06 +02:00
Oliver Drotbohm
516c48dc07 GH-208 - Switch to CopyOnWriteArrayList for DefaultPublishedEvents. 2023-06-23 12:49:06 +02:00
Oliver Drotbohm
596e8828a2 GH-197 - Promote project out of experimental status.
Set version number to 1.0.0-SNAPSHOT. New group id is org.springframework.modulith. Also adapt links to new project home.
2023-05-02 14:32:32 +02:00
Oliver Drotbohm
60ce7da56e GH-189 - Prepare next development iteration. 2023-05-02 12:28:30 +02:00
Oliver Drotbohm
9d1180017e GH-189 - Release version 0.6.0. 2023-05-02 12:28:29 +02:00
Oliver Drotbohm
6dabfb425b GH-191 - Prevent premature access of ApplicationContext from ParameterResolver implementations.
We now avoid accessing the ApplicationContext from a BeforeAllCallback as this might cause the context initialization before other extensions had time to kick in.
2023-04-30 22:35:14 +02:00
Oliver Drotbohm
0b6dccf334 GH-190 - Introduce @EnableScenarios.
The dedicated annotation allows using Scenario as test parameter in @SpringBootTest-based integration tests, too.

ScenarioParameterResolver now throws a better error message if a TransactionTemplate bean is missing from the ApplicationContext.
2023-04-30 22:35:14 +02:00
Oliver Drotbohm
bb800ba046 GH-185 - Additional simplification of delayed event verification on Scenarios. 2023-04-25 14:34:23 +02:00
Oliver Drotbohm
3a923519f2 GH-185 - Allow verification of events after method invocation stimulus. 2023-04-24 17:31:21 +02:00
Oliver Drotbohm
cd76c96250 GH-165 - Introduce ScenarioCustomizer extension.
We now provide a ScenarioCustomizer that can be used to prepare Scenario instances for test methods with a common customizer. This avoids the need to call ….customize(…) for all Scenarios declared in a test class with the same logic.
2023-04-20 14:15:10 +02:00
Oliver Drotbohm
6d2fdd6fdc GH-173 - Polishing.
@ApplicationModuleTest is now explicitly declared to only be usable on types, documented and inherited.
2023-03-27 17:56:12 +02:00
Oliver Drotbohm
822febd00e GH-173 - Support for @ApplicationModuleTest in JUnit 5 nested test classes.
We now use Spring Test Context's TestContextAnnotationUtils to lookup the @ApplicationModuleTest annotation to eventually bootstrap an ApplicationModules instance. That ensures that we find the annotation on JUnit 5's @Nested classes.
2023-03-27 17:56:04 +02:00
Oliver Drotbohm
281da55eac GH-172 - Prepare next development iteration. 2023-03-24 10:24:47 +01:00
Oliver Drotbohm
d5bdff3f77 GH-172 - Release version 0.5.1. 2023-03-24 10:24:47 +01:00
Oliver Drotbohm
f0aaca2917 GH-164 - Prepare next development iteration. 2023-03-08 11:35:15 +01:00
Oliver Drotbohm
50dd8969fb GH-164 - Release version 0.5.0. 2023-03-08 11:35:14 +01:00
Oliver Drotbohm
ce264aaf96 GH-150 - Scenario now execute stimulus within new transaction.
To make sure that we trigger transactional event listeners from Scenario based integration tests, we trigger stimulus executions using transactions configured to require a new transaction. This makes sure that Scenarios work in integration tests using @Transactional, of course circumventing the default rollback behavior of those transactions. There's no other way to implement this as we *need* to commit a transaction to trigger the delivery of transaction-bound events.

Fixed a bug in the handling of Scenario.stimulus(Supplier<T>) as for this, the Supplier handed into the method had not been executed transactionally at all.
2023-02-26 20:26:53 +01:00
Oliver Drotbohm
c51ac5c6fb GH-147 - Prepare next development iteration. 2023-02-24 16:47:15 +01:00
Oliver Drotbohm
13c9f96448 GH-147 - Release version 0.4.1. 2023-02-24 16:47:14 +01:00
Oliver Drotbohm
64a5929367 GH-143 - Prepare next development iteration. 2023-02-23 23:26:25 +01:00
Oliver Drotbohm
3e705a162e GH-143 - Release version 0.4.0. 2023-02-23 23:26:25 +01:00
Oliver Drotbohm
1f6c888e28 GH-136 - Polish Javadoc. 2023-02-23 23:11:46 +01:00
Oliver Drotbohm
bb466f99e9 GH-136 - API polishing for Scenario.
Move the registration of cleanup callbacks to the intermediate When type to avoid overloads of Scenario.stimulate(…). Also, to prevent multiple lambda-style parameters for ….stimulate(…) as they don't distinguish nice on the declaration side. Removed the varargs from ….publish(…) methods and wait for the actual request to add support for preparing, in transaction callbacks (potentially to be introduced as ….prepare(…) method).

The default acceptance criteria for state change expectations now also considers a boolean true as concluding method result.
2023-02-23 22:14:20 +01:00
Oliver Drotbohm
707d27e335 GH-136 - Simple suppliers need to be executed transactionally in Scenario. 2023-02-20 20:03:09 +01:00
Oliver Drotbohm
52fdc221a1 GH-136 - Introduce Scenario as application module integration test API.
See the Javadoc of Scenario for details.
2023-02-20 16:04:10 +01:00
Oliver Drotbohm
71f928f5b0 GH-130 - Polishing.
Organized imports.
2023-02-03 11:09:07 +01:00
Oliver Drotbohm
3c25958edc GH-123 - Prepare next development iteration. 2023-01-20 10:16:34 +01:00
Oliver Drotbohm
43bea11041 GH-123 - Release version 0.3.0. 2023-01-20 10:16:34 +01:00
Oliver Drotbohm
6f5de96dcc GH-117 - Polishing. 2023-01-13 17:42:51 +01:00
Oliver Drotbohm
6616aaaffa GH-116 - PublishedEvents now sees events from asynchronous event listeners as well.
The ApplicationListener we deploy to capture events published  during a test method execution now uses an InheritableThreadLocal so that events published on threads spawned from the main test execution thread also end up in the PublishedEvents instance prepared for the test method.

Also, the registration of that particular event listener avoids duplicate registrations by inspecting the application context in use for the test method execution for an already registered listener, falling back to registering one.
2023-01-13 16:13:34 +01:00
Oliver Drotbohm
5c34886907 GH-114 - Rename ….modulith.model to ….modulith.core. 2023-01-12 16:34:07 +01:00
Oliver Drotbohm
0d009f06c9 GH-111 - Package and publish Javadoc.
A lot of Javadoc polish. Not done yet.
2023-01-12 16:20:20 +01:00
Oliver Drotbohm
9ce6bf23ae GH-14 - Remove Lombok from production sources.
Polished a lot of Javadoc.
2023-01-12 01:05:35 +01:00
Oliver Drotbohm
30203ecca8 GH-104 - Polish log output for test execution.
Also added ApplicationModules.toString().
2023-01-05 10:21:42 +01:00
Oliver Drotbohm
a7e033172b GH-102 - ApplicationModules now allows traversing modules in topological order.
We now optionally integrate with the JGraphT library to calculate the topological order of modules based on their dependency structure. That order is then exposed in ApplicationModules' iteration and via ….getComparator().

Renamed FormattableJavaClass to FormattableType and allow it to be created from a plain Class as well.
2023-01-05 10:21:36 +01:00
Oliver Drotbohm
3b1bde5c36 GH-100 - Polishing. 2023-01-03 08:50:27 +01:00
Oliver Drotbohm
5d285e0e03 GH-100 - Introduce AssertablePublishedEvents.
In case AssertJ is on the classpath, test cases using the PublishedEventsExtension (for example, implicitly activated via @ApplicationModuleTest) can get an AssertablePublishedEvents injected into the method. In contrast to the original PublishedEvents, that one acts as AssertProvider so that it can be used in assertThat(…).… expressions to verify application events published.

Polished API in PublishedEvents for a more consistent experience.
2023-01-03 02:44:01 +01:00