public void CallsBaseLoaderWhenNavigated() { // Arrange var repoListViewModel = new RepoListPageViewModel(_loader, _listLoader, _progressService, _navigationService, _repoService); // Act repoListViewModel.OnNavigatedTo(null); // Assert Mock.Get(_loader).Verify(moq => moq.LoadAsync(It.IsAny<Func<CancellationToken, Task>>()), Times.Once); Mock.Get(_listLoader).Verify(moq => moq.LoadAsync(It.IsAny<Func<CancellationToken, Task>>()), Times.Never); }
public void RepoListContainsAllReposLoaded() { // Arrange var repoListViewModel = new RepoListPageViewModel(_loader, _listLoader, _progressService, _navigationService, _repoService); // Act repoListViewModel.OnNavigatedTo(null); // Assert Assert.AreEqual(_repoList, repoListViewModel.Repos); }