@@ -27,11 +27,11 @@ public async Task LogsTheUserInSuccessfullyAndCachesRelevantInfo()
2727 apiClient . GetOrCreateApplicationAuthenticationCode (
2828 Args . TwoFactorChallengCallback , Args . String , Args . Boolean )
2929 . Returns ( Observable . Return ( new ApplicationAuthorization ( "S3CR3TS" ) ) ) ;
30- apiClient . GetUser ( ) . Returns ( Observable . Return ( CreateUserAndScopes ( "baymax" ) ) ) ;
30+ apiClient . GetUser ( ) . Returns ( Observable . Return ( CreateOctokitUser ( "baymax" ) ) ) ;
3131 var hostCache = new InMemoryBlobCache ( ) ;
3232 var modelService = new ModelService ( apiClient , hostCache , Substitute . For < IAvatarProvider > ( ) ) ;
3333 var loginManager = Substitute . For < ILoginManager > ( ) ;
34- loginManager . Login ( HostAddress . GitHubDotComHostAddress , Arg . Any < IGitHubClient > ( ) , "baymax" , "aPassword" ) . Returns ( CreateUserAndScopes ( "baymax" ) . User ) ;
34+ loginManager . Login ( HostAddress . GitHubDotComHostAddress , Arg . Any < IGitHubClient > ( ) , "baymax" , "aPassword" ) . Returns ( CreateOctokitUser ( "baymax" ) ) ;
3535 var loginCache = new TestLoginCache ( ) ;
3636 var usage = Substitute . For < IUsageTracker > ( ) ;
3737 var host = new RepositoryHost ( apiClient , modelService , loginManager , loginCache , usage ) ;
@@ -52,11 +52,11 @@ public async Task IncrementsLoginCount()
5252 apiClient . GetOrCreateApplicationAuthenticationCode (
5353 Args . TwoFactorChallengCallback , Args . String , Args . Boolean )
5454 . Returns ( Observable . Return ( new ApplicationAuthorization ( "S3CR3TS" ) ) ) ;
55- apiClient . GetUser ( ) . Returns ( Observable . Return ( CreateUserAndScopes ( "baymax" ) ) ) ;
55+ apiClient . GetUser ( ) . Returns ( Observable . Return ( CreateOctokitUser ( "baymax" ) ) ) ;
5656 var hostCache = new InMemoryBlobCache ( ) ;
5757 var modelService = Substitute . For < IModelService > ( ) ;
5858 var loginManager = Substitute . For < ILoginManager > ( ) ;
59- loginManager . Login ( HostAddress . GitHubDotComHostAddress , Arg . Any < IGitHubClient > ( ) , "baymax" , "aPassword" ) . Returns ( CreateUserAndScopes ( "baymax" ) . User ) ;
59+ loginManager . Login ( HostAddress . GitHubDotComHostAddress , Arg . Any < IGitHubClient > ( ) , "baymax" , "aPassword" ) . Returns ( CreateOctokitUser ( "baymax" ) ) ;
6060 var loginCache = new TestLoginCache ( ) ;
6161 var usage = Substitute . For < IUsageTracker > ( ) ;
6262 var host = new RepositoryHost ( apiClient , modelService , loginManager , loginCache , usage ) ;
@@ -97,7 +97,7 @@ public async Task LogsTheUserInSuccessfullyAndCachesRelevantInfo()
9797 var hostCache = new InMemoryBlobCache ( ) ;
9898 var modelService = new ModelService ( apiClient , hostCache , Substitute . For < IAvatarProvider > ( ) ) ;
9999 var loginManager = Substitute . For < ILoginManager > ( ) ;
100- loginManager . LoginFromCache ( HostAddress . GitHubDotComHostAddress , Arg . Any < IGitHubClient > ( ) ) . Returns ( CreateUserAndScopes ( "baymax" ) . User ) ;
100+ loginManager . LoginFromCache ( HostAddress . GitHubDotComHostAddress , Arg . Any < IGitHubClient > ( ) ) . Returns ( CreateOctokitUser ( "baymax" ) ) ;
101101 var loginCache = new TestLoginCache ( ) ;
102102 var usage = Substitute . For < IUsageTracker > ( ) ;
103103 var host = new RepositoryHost ( apiClient , modelService , loginManager , loginCache , usage ) ;
@@ -118,7 +118,7 @@ public async Task IncrementsLoginCount()
118118 var hostCache = new InMemoryBlobCache ( ) ;
119119 var modelService = Substitute . For < IModelService > ( ) ;
120120 var loginManager = Substitute . For < ILoginManager > ( ) ;
121- loginManager . LoginFromCache ( HostAddress . GitHubDotComHostAddress , Arg . Any < IGitHubClient > ( ) ) . Returns ( CreateUserAndScopes ( "baymax" ) . User ) ;
121+ loginManager . LoginFromCache ( HostAddress . GitHubDotComHostAddress , Arg . Any < IGitHubClient > ( ) ) . Returns ( CreateOctokitUser ( "baymax" ) ) ;
122122 var loginCache = new TestLoginCache ( ) ;
123123 var usage = Substitute . For < IUsageTracker > ( ) ;
124124 var host = new RepositoryHost ( apiClient , modelService , loginManager , loginCache , usage ) ;
0 commit comments