vendredi 8 décembre 2017

Mockito with functions in Dart

I have a method that I would like to mock, however when I am trying to verify calls of this method. I get an error that says:

Used on a non-mockito object

Here is the simplified code:

test('test',() {
   MockReducer reducer = new MockReducer();
   verify(reducer).called(0);
});

Why can't I do something like this?

Aucun commentaire:

Enregistrer un commentaire