Guest User

Untitled

a guest
Jan 16th, 2018
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. class MockView extends Mock implements ContactListViewContract {
  2.  
  3. @override
  4. void onLoadContactsComplete(List<Contact> items) {
  5.  
  6. }
  7. @override
  8. void onLoadContactsError() {}
  9.  
  10. }
  11.  
  12. void main() {
  13.  
  14. test('ContactListPresenter test', () {
  15. Injector.configure(Flavor.MOCK);
  16. MockView view = new MockView();
  17.  
  18. ContactListPresenter presenter = new ContactListPresenter(view);
  19.  
  20. presenter.loadContacts();
  21.  
  22. verify(view.onLoadContactsComplete).called(1);
  23.  
  24. });
  25.  
  26. }
Add Comment
Please, Sign In to add comment