I have an integration test suite that calls my web api and checks the response against the expected model. Currently I am serializing the model that should be returned using json.net which works in most cases. It breaks down for OData controllers as OData handles serializing differently to JSON.net with dates having the date offset appended and decimals being trimmed by OData in some cases (100.00 goes to 100.0).
Is there a library that provides an OData serializer that could be used in the tests? Alternatively is there a way to make JSON.net behave like OData or vice versa? Failing either of these is there a better solution than just manually typing the expected strong for these cases?
Aucun commentaire:
Enregistrer un commentaire