-
Notifications
You must be signed in to change notification settings - Fork 38.6k
Closed
Labels
in: testIssues in the test moduleIssues in the test moduletype: enhancementA general enhancementA general enhancement
Milestone
Description
Multiple inlined properties can currently only be supplied as an array of strings:
@TestPropertySource(properties = {
"key1 = value1",
"key2 = value2"
})
It would be nice to be able to use a single text block (or multiple text blocks):
@TestPropertySource(properties = """
key1 = value1
key2 = value2
"""
)
However, TestPropertySourceUtils.convertInlinedPropertiesToMap(String...)
currently throws an exception if a single String
contains more than one key-value pair.
That check made sense when we expected users to supply one key-value pair per string in an array, but that restriction no longer makes sense when text blocks are taken into consideration.
We should therefore remove that restriction and allow users to supply inlined properties as a text block.
Metadata
Metadata
Assignees
Labels
in: testIssues in the test moduleIssues in the test moduletype: enhancementA general enhancementA general enhancement