I am writing tests for a function which parses data from json to create an object, but for asserts I used indirect not raw data.
I already wrote few of those and it seems fine for me. Json file will not change and so the data.
Normal test with raw data:
assert(json["name"], object.name)
My tests with indirect data:
assert("John", object.name)
Aucun commentaire:
Enregistrer un commentaire