@@ -26,11 +26,11 @@ public async Task LogsTheUserInSuccessfullyAndCachesRelevantInfo()
2626 apiClient . GetOrCreateApplicationAuthenticationCode (
2727 Args . TwoFactorChallengCallback , Args . String , Args . Boolean )
2828 . Returns ( Observable . Return ( new ApplicationAuthorization ( "S3CR3TS" ) ) ) ;
29- apiClient . GetUser ( ) . Returns ( Observable . Return ( CreateUserAndScopes ( "baymax" ) ) ) ;
29+ apiClient . GetUser ( ) . Returns ( Observable . Return ( CreateOctokitUser ( "baymax" ) ) ) ;
3030 var hostCache = new InMemoryBlobCache ( ) ;
3131 var modelService = new ModelService ( apiClient , hostCache , Substitute . For < IAvatarProvider > ( ) ) ;
3232 var loginManager = Substitute . For < ILoginManager > ( ) ;
33- loginManager . Login ( HostAddress . GitHubDotComHostAddress , Arg . Any < IGitHubClient > ( ) , "baymax" , "aPassword" ) . Returns ( CreateUserAndScopes ( "baymax" ) . User ) ;
33+ loginManager . Login ( HostAddress . GitHubDotComHostAddress , Arg . Any < IGitHubClient > ( ) , "baymax" , "aPassword" ) . Returns ( CreateOctokitUser ( "baymax" ) ) ;
3434 var keychain = Substitute . For < IKeychain > ( ) ;
3535 var usage = Substitute . For < IUsageTracker > ( ) ;
3636 var host = new RepositoryHost ( apiClient , modelService , loginManager , keychain , usage ) ;
@@ -51,11 +51,11 @@ public async Task IncrementsLoginCount()
5151 apiClient . GetOrCreateApplicationAuthenticationCode (
5252 Args . TwoFactorChallengCallback , Args . String , Args . Boolean )
5353 . Returns ( Observable . Return ( new ApplicationAuthorization ( "S3CR3TS" ) ) ) ;
54- apiClient . GetUser ( ) . Returns ( Observable . Return ( CreateUserAndScopes ( "baymax" ) ) ) ;
54+ apiClient . GetUser ( ) . Returns ( Observable . Return ( CreateOctokitUser ( "baymax" ) ) ) ;
5555 var hostCache = new InMemoryBlobCache ( ) ;
5656 var modelService = Substitute . For < IModelService > ( ) ;
5757 var loginManager = Substitute . For < ILoginManager > ( ) ;
58- loginManager . Login ( HostAddress . GitHubDotComHostAddress , Arg . Any < IGitHubClient > ( ) , "baymax" , "aPassword" ) . Returns ( CreateUserAndScopes ( "baymax" ) . User ) ;
58+ loginManager . Login ( HostAddress . GitHubDotComHostAddress , Arg . Any < IGitHubClient > ( ) , "baymax" , "aPassword" ) . Returns ( CreateOctokitUser ( "baymax" ) ) ;
5959 var keychain = Substitute . For < IKeychain > ( ) ;
6060 var usage = Substitute . For < IUsageTracker > ( ) ;
6161 var host = new RepositoryHost ( apiClient , modelService , loginManager , keychain , usage ) ;
@@ -96,7 +96,7 @@ public async Task LogsTheUserInSuccessfullyAndCachesRelevantInfo()
9696 var hostCache = new InMemoryBlobCache ( ) ;
9797 var modelService = new ModelService ( apiClient , hostCache , Substitute . For < IAvatarProvider > ( ) ) ;
9898 var loginManager = Substitute . For < ILoginManager > ( ) ;
99- loginManager . LoginFromCache ( HostAddress . GitHubDotComHostAddress , Arg . Any < IGitHubClient > ( ) ) . Returns ( CreateUserAndScopes ( "baymax" ) . User ) ;
99+ loginManager . LoginFromCache ( HostAddress . GitHubDotComHostAddress , Arg . Any < IGitHubClient > ( ) ) . Returns ( CreateOctokitUser ( "baymax" ) ) ;
100100 var keychain = Substitute . For < IKeychain > ( ) ;
101101 var usage = Substitute . For < IUsageTracker > ( ) ;
102102 var host = new RepositoryHost ( apiClient , modelService , loginManager , keychain , usage ) ;
@@ -117,7 +117,7 @@ public async Task IncrementsLoginCount()
117117 var hostCache = new InMemoryBlobCache ( ) ;
118118 var modelService = Substitute . For < IModelService > ( ) ;
119119 var loginManager = Substitute . For < ILoginManager > ( ) ;
120- loginManager . LoginFromCache ( HostAddress . GitHubDotComHostAddress , Arg . Any < IGitHubClient > ( ) ) . Returns ( CreateUserAndScopes ( "baymax" ) . User ) ;
120+ loginManager . LoginFromCache ( HostAddress . GitHubDotComHostAddress , Arg . Any < IGitHubClient > ( ) ) . Returns ( CreateOctokitUser ( "baymax" ) ) ;
121121 var keychain = Substitute . For < IKeychain > ( ) ;
122122 var usage = Substitute . For < IUsageTracker > ( ) ;
123123 var host = new RepositoryHost ( apiClient , modelService , loginManager , keychain , usage ) ;
0 commit comments