spring_boot_starter_test 0.2.1
spring_boot_starter_test: ^0.2.1 copied to clipboard
Testing for spring_boot_dart apps and starters: springBootTest, bean overrides for mocks, ApplicationContextRunner, matchers and log capture. Works with flutter_test.
0.2.1 #
- feat: spring_boot_starter_flutter, @Log, --dart-define properties, Flutter counter example
0.2.0 #
hasSingleBean,hasBeananddoesNotHaveBeancount the beans of the parent contexts too (withParent), like AssertJ's defaultScope.INCLUDE_ANCESTORS.BeanOverrideby type replaces the single@Primarybean among several (it failed);BeanOverride(name:)takes an alias and replaces the bean it names, keeping every alias (it failed).- Breaking: initializers are
ApplicationContextInitializerobjects (ApplicationContextInitializer.of((context) => ...)), followingspring_boot_dart. ApplicationContextRunner.runAsyncrefreshes withrefreshAsync()(asynchronous@PostConstruct/ init methods are awaited; a failed start is closed withcloseAsync()).ApplicationContextRunnersorts its auto-configurations like Boot'sAutoConfigurations.of(...): by name,order, thenbefore/after(withAutoConfiguration(module, metadata)takes the module's@AutoConfigurationModule).ApplicationContextRunner.withParent,withAllowBeanDefinitionOverridingandwithAllowCircularReferences(truefails the run: circular references are always an error).BeanOverridenames a new bean likewithBean(defaultBeanName:URLServicestays, type arguments are left out).- Breaking:
ApplicationContextRunner.withBean<T>(supplier)takes a supplier like Boot'swithBean(type, supplier): each run gets a new instance (an instance was reused after a previous run destroyed it). springBootTestcloses its context withcloseAsync()(asynchronous@PreDestroyand lifecycle stops are awaited);ApplicationContextRunner.runAsynctoo.
0.1.7 #
ApplicationContextRunnerattaches relaxed names to its environment, like an application started bySpringApplication(app.read-timeoutfindsapp.readTimeout)- breaking:
ApplicationContextRunner.withBeanregisters an extra bean before the configurations are processed, like Boot's (a@ConditionalOnMissingBeanbacks off; a missing back-off gives a second bean), instead of replacing definitions;withBeanOverridereplaces a bean likeBeanOverride;ApplicationContextRunner.beansholds bean definitions, the overrides moved tooverrides withPropertyValuesacceptskey:valuelikeTestPropertyValues; breaking: values are trimmedspringBootTest(dynamicProperties:)withDynamicPropertyRegistry: properties evaluated when the context starts (@DynamicPropertySource)app.outputno longer holds the startup line (Spring Boot's startup info is now logged throughSpringLog)springBootTestkeeps the application's auto-configuration order and exclusions, and does not register the shutdown hook (it closes its own context)
0.1.6 #
- update road map
- ci: release with a button on main, skip new packages when publishing; shorter pubspec descriptions
0.1.5 #
- add feign runner + web socket runner
- add web core + faign starter for http calling
0.1.4 #
- feat: ObjectMapper in core — JSON on generated metadata (@Introspected, @JsonProperty/@JsonIgnore/@JsonInclude/@JsonCreator/@JsonValue), spring.jackson.* in Boot
0.1.3 #
- add scheduling + cache starters
- fix extension add aop docs
0.1.2 #
- ci: release only from the release branch; fix version-dependent test; Node 24 actions
- fix tests
0.1.1 #
- Example on pub.dev (
example/) and a description within 180 characters.
0.1.0 #
Initial version.
springBootTest(@SpringBootTest): thetest/resources/test classpath (resourceDirectories),propertyFiles(@TestPropertySource), properties, profiles, environment, initializers,markDirty(@DirtiesContext), restoredSpringLogstate.BeanOverride(@MockitoBean/@TestBean), keeping name, aliases, qualifiers and@Primary/@Fallback.ApplicationContextRunnerwithAssertableApplicationContext.- Matchers:
hasSingleBean,hasBean,doesNotHaveBean,hasBeanNamed,hasFailed. captureLogs.- Built on
test_api+matcherforflutter_testcompatibility.