-
I see Atrium uses a non-trivial string representation for objects, like adding identity ID to the object ( What if I want to customize it, is it possible or is it hardcoded inside the framework? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 7 replies
-
It's not hard-coded and its possible to exchange the current implementation with yours. You need to replace the current implementation of ch.tutteli.atrium.reporting.text.TextObjectFormatter with your own implementation.
If you intend to exchange it all the time then I suggest you use your own expectation verb: https://github.com/robstoll/atrium#use-own-expectation-verb see also readme.examples.OwnExpectationVerbSpec for an example. just as info, I started refactoring the output and there we won't see the object identity any more, it will only show up when Anyhow... I am curious, how do you want to change the string presentation? |
Beta Was this translation helpful? Give feedback.
It's not hard-coded and its possible to exchange the current implementation with yours. You need to replace the current implementation of ch.tutteli.atrium.reporting.text.TextObjectFormatter with your own implementation.
If you want that only for one use case then you can use
If you intend to exchange it all the time then I suggest you use your own expectation verb: https://github.com/robstoll/atrium#use-own-expectation-verb see also readme.examples.OwnExpectationVerbSpec for an example.
just as info, I started refactoring the output and there we won't s…