protected override void AdditionalSetup() { base.AdditionalSetup(); this.settings = new Mock <ISettings>(MockBehavior.Strict); this.repository = new AdunisRepository(this.settings.Object); this.account = new Mock <IAccountService>(MockBehavior.Strict); this.account.SetupGet(t => t.HasAccount).Returns(true); this.account.Setup(t => t.Retrieve()) .Returns(new Account { RefreshToken = Guid.NewGuid().ToString(), Token = Guid.NewGuid().ToString(), TokenRetrieved = DateTime.Now, TokenValidUntil = DateTime.Now.AddDays(1), UserName = "******" }); this.Ioc.RegisterSingleton(this.account.Object); this.Ioc.RegisterSingleton(this.repository); this.Ioc.RegisterType <IAdunisSync, AdunisSync>(); }
public ExamViewModel(IMvxNavigationService navigationService, IAdunisSync adunisSync, IAdunisRepository adunisRepository, ILogging logging) { this.NavigationService = navigationService; this.adunisSync = adunisSync; this.adunisRepository = adunisRepository; this.logging = logging; }
public AdunisViewModel(IMvxNavigationService navigationService, IAdunisRepository adunisRepository, IAdunisSync adunisSync, IUserInteractionService userInteraction) { this.NavigationService = navigationService; this.adunisRepository = adunisRepository; this.adunisSync = adunisSync; this.userInteraction = userInteraction; }
public AdunisSync(IAdunisWebHandler handler, IAdunisRepository repo, IDevice device, IAccountService account, ILogging logging) { this.handler = handler; this.repo = repo; this.device = device; this.account = account; this.logging = logging; }
public HomeViewModel(IMvxNavigationService navigationService, ISettings settings, IUserInteractionService userInteraction, IAccountService account, IAdunisRepository adunisRepository) { this.NavigationService = navigationService; this.settings = settings; this.userInteraction = userInteraction; this.account = account; this.adunisRepository = adunisRepository; }
public SettingsViewModel(IMvxNavigationService navigationService, IIOCacheService cacheService, IUserInteractionService userInteraction, IAdunisRepository adunisRepository, INewsRepository newsRepository, IMenuRepository menuRepository, IDevice device) { this.NavigationService = navigationService; this.cacheService = cacheService; this.userInteraction = userInteraction; this.adunisRepository = adunisRepository; this.newsRepository = newsRepository; this.menuRepository = menuRepository; this.device = device; }
public TimetableViewModel(IMvxNavigationService navigationService, IAdunisRepository adunisRepository, IAdunisSync adunisSync, ILogging logging) { this.NavigationService = navigationService; this.adunisRepository = adunisRepository; this.adunisSync = adunisSync; this.logging = logging; this.OnPropertyChanged(() => this.CurrentWeek, () => { if (this.CurrentWeek == null) { return; } this.LoadFromCache(this.CurrentWeek.Start); }); }
public AccountViewModel( IMvxNavigationService navigationService, IAccountService account, IIOCacheService cache, IAdunisRepository adunisRepository, IAccountBalanceRepository accountBalanceRepository, IOAuthUtils oAuth, IUserInteractionService userInteraction) { this.NavigationService = navigationService; this.account = account; this.cache = cache; this.adunisRepository = adunisRepository; this.accountBalanceRepository = accountBalanceRepository; this.oAuth = oAuth; this.userInteraction = userInteraction; }