mercredi 21 février 2018

Is there any good way to use mock in rust test?

Is there any good way to use mock in rust test? like Mockito(java) and scalamock(scala). After some search, I find mock_derive is some like. But I found it was difficult to use. For example it is difficult to mock a static instance of a trait object with functions return Result type.

I don't know what is the common way to do mocking in rust, so please give me some advises. Thanks.

Aucun commentaire:

Enregistrer un commentaire