transcendental-lisp/fitnesse/FitNesseRoot/FitNesse/SuiteAcceptanceTests/SuiteSlimTests/TestCustomConverter/content.txt

28 lines
1.1 KiB
Plaintext
Raw Permalink Normal View History

We check whether a custom converter for lists can be used to change how lists are returned to the wiki.
Whether a converter is applied to a method's result depends on its declared return type:
* List (exactly, no sub-interface or class implementing it): converter is '''not applied''' (this is needed for some Slim tables, such as !-QueryTable-!).
* All return types: converter is applied, based on the actual class of the object returned, or on its declared type when !style_code[null] is returned
|import |
|fitnesse.slim.test|
|script |!-TestSlimWithConverter-!|
|check |get object |[a, b, c]|
|check |get list |[a, b, c]|
|check |get array list |[a, b, c]|
|same list|[a, b, c] |
|set list converter |
|check |get object |{a, b, c}|
|check |get list |[a, b, c]|
|check |get array list |{a, b, c}|
|same list|{a, b, c} |
|same list|[a, b, c] |
|remove list converter |
|check |get object |[a, b, c]|
|check |get list |[a, b, c]|
|check |get array list |[a, b, c]|
|same list|[a, b, c] |