Skip to content

Commit 7af00ce

Browse files
committed
chore: import flamingock-test-support with api(...) to expose the API
1 parent a399b8b commit 7af00ce

File tree

2 files changed

+15
-15
lines changed

2 files changed

+15
-15
lines changed

platform-plugins/flamingock-springboot-test-support/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
val springBootVersion = "2.0.0.RELEASE"
22
val springFrameworkVersion = "5.0.4.RELEASE"
33
dependencies {
4-
implementation(project(":core:flamingock-test-support"))
4+
api(project(":core:flamingock-test-support"))
55

66
implementation(project(":core:flamingock-core"))
77
implementation(project(":core:flamingock-core-commons"))

platform-plugins/flamingock-springboot-test-support/src/main/java/io/flamingock/springboot/testsupport/FlamingockTestAutoConfiguration.java

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -16,57 +16,57 @@
1616
package io.flamingock.springboot.testsupport;
1717

1818
import io.flamingock.internal.core.builder.AbstractChangeRunnerBuilder;
19-
import io.flamingock.support.FlamingockTestSupport;
20-
import io.flamingock.support.stages.GivenStage;
2119
import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
2220
import org.springframework.context.annotation.Bean;
2321
import org.springframework.context.annotation.Configuration;
2422
import org.springframework.context.annotation.Scope;
2523

2624
/**
27-
* Auto-configuration that provides a {@link GivenStage} bean for Flamingock testing.
25+
* Autoconfiguration that provides a {@link FlamingockSpringBootTestSupport} bean for Flamingock testing.
2826
*
2927
* <p>This configuration is automatically picked up when using {@link FlamingockSpringBootTest}
30-
* and provides a ready-to-use {@code GivenStage} bean that can be autowired directly in tests.</p>
28+
* and provides a ready-to-use {@code FlamingockSpringBootTestSupport} bean that can be autowired
29+
* directly in tests.</p>
3130
*
3231
* <p><strong>Example usage:</strong></p>
3332
* <pre>{@code
3433
* @FlamingockSpringBootTest(classes = {MyApp.class, TestConfig.class})
3534
* class MyFlamingockTest {
3635
*
3736
* @Autowired
38-
* private GivenStage givenStage;
37+
* private FlamingockSpringBootTestSupport flamingockTestSupport;
3938
*
4039
* @Test
4140
* void testMigration() {
42-
* givenStage
41+
* flamingockTestSupport.givenBuilderFromContext()
4342
* .whenRun()
4443
* .thenExpectAuditSequenceStrict(APPLIED(MyChange.class))
4544
* .verify();
4645
* }
4746
* }
4847
* }</pre>
4948
*
50-
* <p><strong>Note:</strong> The {@code GivenStage} bean has prototype scope, meaning a new instance
51-
* is created for each injection point. This is necessary because {@code GivenStage} accumulates
52-
* internal state (preconditions, expectations) and is not reusable between tests.</p>
49+
* <p><strong>Note:</strong> The {@code FlamingockSpringBootTestSupport} bean has prototype scope,
50+
* meaning a new instance is created for each injection point. This is necessary because the
51+
* underlying {@code GivenStage} accumulates internal state (preconditions, expectations) and
52+
* is not reusable between tests.</p>
5353
*
5454
* @see FlamingockSpringBootTest
55-
* @see FlamingockTestSupport
56-
* @see GivenStage
55+
* @see FlamingockSpringBootTestSupport
56+
* @see io.flamingock.support.FlamingockTestSupport
5757
* @since 1.0
5858
*/
5959
@Configuration
6060
public class FlamingockTestAutoConfiguration {
6161

6262
/**
63-
* Creates a {@link GivenStage} bean for Flamingock testing.
63+
* Creates a {@link FlamingockSpringBootTestSupport} bean for Flamingock testing.
6464
*
6565
* <p>The bean has prototype scope to ensure each test gets its own fresh instance,
66-
* as {@code GivenStage} accumulates state and cannot be shared between tests.</p>
66+
* as the underlying {@code GivenStage} accumulates state and cannot be shared between tests.</p>
6767
*
6868
* @param builderFromContext the Flamingock builder, automatically configured by Spring Boot
69-
* @return a new {@code GivenStage} instance ready for testing
69+
* @return a new {@code FlamingockSpringBootTestSupport} instance ready for testing
7070
*/
7171
@Bean
7272
@Scope("prototype")

0 commit comments

Comments
 (0)