Skip to content

Commit

Permalink
Replace .ToList() with new List<Repository>()
Browse files Browse the repository at this point in the history
  • Loading branch information
brminnick committed Oct 15, 2022
1 parent 18df374 commit eb3d4d8
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,13 @@ protected async Task ExecutePullToRefreshCommandTestAbuseLimit()
gitHubApiAbuseLimitCount_Initial = gitHubUserService.GitHubApiAbuseLimitCount;

emptyDataViewTitle_Initial = repositoryViewModel.EmptyDataViewTitle;
visibleRepositoryList_Initial = repositoryViewModel.VisibleRepositoryList.ToList();
visibleRepositoryList_Initial = new List<Repository>(repositoryViewModel.VisibleRepositoryList);
emptyDataViewDescription_Initial = repositoryViewModel.EmptyDataViewDescription;

await repositoryViewModel.ExecuteRefreshCommand.ExecuteAsync(null).ConfigureAwait(false);

emptyDataViewTitle_Final = repositoryViewModel.EmptyDataViewTitle;
visibleRepositoryList_Final = repositoryViewModel.VisibleRepositoryList.ToList();
visibleRepositoryList_Final = new List<Repository>(repositoryViewModel.VisibleRepositoryList);
emptyDataViewDescription_Final = repositoryViewModel.EmptyDataViewDescription;

pullToRefreshFailedEventArgs = await pullToRefreshFailedTCS.Task.ConfigureAwait(false);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using GitTrends.Mobile.Common;
using GitTrends.Shared;
Expand Down Expand Up @@ -32,13 +31,13 @@ protected async Task ExecutePullToRefreshCommandTestMaximumApiLimitTest()
await AuthenticateUser(gitHubUserService, gitHubGraphQLApiService).ConfigureAwait(false);

emptyDataViewTitle_Initial = repositoryViewModel.EmptyDataViewTitle;
visibleRepositoryList_Initial = repositoryViewModel.VisibleRepositoryList.ToList();
visibleRepositoryList_Initial = new List<Repository>(repositoryViewModel.VisibleRepositoryList);
emptyDataViewDescription_Initial = repositoryViewModel.EmptyDataViewDescription;

await repositoryViewModel.ExecuteRefreshCommand.ExecuteAsync(null).ConfigureAwait(false);

emptyDataViewTitle_Final = repositoryViewModel.EmptyDataViewTitle;
visibleRepositoryList_Final = repositoryViewModel.VisibleRepositoryList.ToList();
visibleRepositoryList_Final = new List<Repository>(repositoryViewModel.VisibleRepositoryList);
emptyDataViewDescription_Final = repositoryViewModel.EmptyDataViewDescription;

pullToRefreshFailedEventArgs = await pullToRefreshFailedTCS.Task.ConfigureAwait(false);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,13 @@ public async Task PullToRefreshCommandTest_ServerError()
await AuthenticateUser(gitHubUserService, gitHubGraphQLApiService).ConfigureAwait(false);

emptyDataViewTitle_Initial = repositoryViewModel.EmptyDataViewTitle;
visibleRepositoryList_Initial = repositoryViewModel.VisibleRepositoryList.ToList();
visibleRepositoryList_Initial = new List<Repository>(repositoryViewModel.VisibleRepositoryList);
emptyDataViewDescription_Initial = repositoryViewModel.EmptyDataViewDescription;

await repositoryViewModel.ExecuteRefreshCommand.ExecuteAsync(null).ConfigureAwait(false);

emptyDataViewTitle_Final = repositoryViewModel.EmptyDataViewTitle;
visibleRepositoryList_Final = repositoryViewModel.VisibleRepositoryList.ToList();
visibleRepositoryList_Final = new List<Repository>(repositoryViewModel.VisibleRepositoryList);
emptyDataViewDescription_Final = repositoryViewModel.EmptyDataViewDescription;

pullToRefreshFailedEventArgs = await pullToRefreshFailedTCS.Task.ConfigureAwait(false);
Expand Down

0 comments on commit eb3d4d8

Please sign in to comment.