mirror of
https://github.com/spring-projects/spring-framework
synced 2026-06-08 17:33:33 +00:00
5d309d5724
This commit improves SimpleAliasRegistryTests in the following ways. - Some existing methods have been split up into smaller test methods which focus on a single use case. - The use of Mockito mocks has been replaced by a hand-crafted StubStringValueResolver which ensures that existing aliases and names are not accidentally replaced by null thereby removing their removing there mappings inadvertently. - Several test methods now include inline comments that document the current state of the aliasMap in order to clarify what is happening behind the scenes in the ConcurrentHashMap. - Several test methods warn that the current expectations are based on ConcurrentHashMap iteration order! - New @ParameterizedTest which is currently @Disabled but demonstrates that complex use cases involving placeholder replacement can be supported consistently -- regardless of the values of the aliases involved -- but only if alias registration order is honored. Closes gh-31353