When I write a test which checks that the string value is surrounded by apostrophs by configuring a corresponding formatter for type String, this formatter is erroneously also applied to each value in the collection, leading to the following failure:
Failed verification:
CustomStringFormatterShouldNotBeAppliedToCollectionsForIntelliJTest$ClassWithStringAndStringCollection
Expected auto generated toString:
ClassWithStringAndStringCollection{theString='ece92ceb-3625-4268-b18d-0a95bdc12b26', theStringCollection=[cf517611-c145-4258-8a3c-766ff13f3d6c]}
To contain fields with values:
- theStringCollection: 'cf517611-c145-4258-8a3c-766ff13f3d6c'
I have a class containing both a field of type String and of type Collection.
IntelliJ (Template "String concat (+) and super.toString()") generates the following code for this:
When I write a test which checks that the string value is surrounded by apostrophs by configuring a corresponding formatter for type String, this formatter is erroneously also applied to each value in the collection, leading to the following failure:
Here is a test to reproduce:
Using a Map<String, String> instead of List produces a similar error.