Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using Microsoft.VisualStudio.TestTools.UnitTesting;
- using MvvmCross.Core.ViewModels;
- using MvvmCross.Core.Views;
- using MvvmCross.Platform.Core;
- namespace PokeApp.Tests
- {
- public class MockDispatcher
- : MvxMainThreadDispatcher
- , IMvxViewDispatcher
- {
- public readonly List<MvxViewModelRequest> Requests = new List<MvxViewModelRequest>();
- public readonly List<MvxPresentationHint> Hints = new List<MvxPresentationHint>();
- public bool RequestMainThreadAction(Action action)
- {
- action();
- return true;
- }
- public bool ShowViewModel(MvxViewModelRequest request)
- {
- Requests.Add(request);
- return true;
- }
- public bool ChangePresentation(MvxPresentationHint hint)
- {
- Hints.Add(hint);
- return true;
- }
- public bool RequestMainThreadAction(Action action, bool maskExceptions = true)
- {
- throw new NotImplementedException();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement