Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class MockView extends Mock implements ContactListViewContract {
- @override
- void onLoadContactsComplete(List<Contact> items) {
- }
- @override
- void onLoadContactsError() {}
- }
- void main() {
- test('ContactListPresenter test', () {
- Injector.configure(Flavor.MOCK);
- MockView view = new MockView();
- ContactListPresenter presenter = new ContactListPresenter(view);
- presenter.loadContacts();
- verify(view.onLoadContactsComplete).called(1);
- });
- }
Add Comment
Please, Sign In to add comment