TyphoonRestClient icon indicating copy to clipboard operation
TyphoonRestClient copied to clipboard

Provide instructions for testing a ValueConverter using json string as input/output

Open jasperblues opened this issue 10 years ago • 2 comments

This would allow starting with the json snippet that will be reused, and writing a unit test for the converter before plugging it all in.

jasperblues avatar Nov 09 '15 08:11 jasperblues

ValueConverters are decoupled with JSON format, because TRC supports not only JSON. So, you can test your TRCValueTransformer with NSNumber or NSString input (in case of JSON)

alexgarbarev avatar Nov 09 '15 09:11 alexgarbarev

:+1: I think it would still be useful to unit test this common scenario easily, before integrating with whole system. Perhaps a base class to extend or something.

jasperblues avatar Nov 09 '15 09:11 jasperblues