appsquickly / TyphoonRestClient

Flexible HTTP client for Objective-C and Swift
Apache License 2.0
24 stars 5 forks source link

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

Open jasperblues opened 9 years ago

jasperblues commented 9 years ago

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.

alexgarbarev commented 9 years ago

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)

jasperblues commented 9 years ago

:+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.