vendredi 21 août 2015

How to force unit test's state to "Test wasn't run"? (MS Test)

I have a few unit tests that are testing a proxy for 3-rd party REST API (GET only). The data that this API returns can change and sometimes there is no data at all. That means that sometimes, i can't check whether my code works, or not. I don't want to make my tests pass when they haven't checked everything, and i also don't want it to fail everytime there is no data. I'm using Ms Test, and I've noticed, that there is "Test wasn't run" state of the tests, which is assigned to tests in some situations. Can i call this state explicitly from my unit tests code, or this is a bad idea and theres a well known practice for this kind of situations?

Aucun commentaire:

Enregistrer un commentaire