This repository was archived by the owner on Jun 21, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed
test/GitHub.Api.UnitTests Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ public class TheCreateMethod
1616 public async Task CreatesNewInstanceOfSimpleApiClient ( )
1717 {
1818 const string url = "https://github.com/github/CreatesNewInstanceOfSimpleApiClient" ;
19- var program = Substitute . For < IProgram > ( ) ;
19+ var program = CreateProgram ( ) ;
2020 var keychain = Substitute . For < IKeychain > ( ) ;
2121 var enterpriseProbe = Substitute . For < IEnterpriseProbe > ( ) ;
2222 var wikiProbe = Substitute . For < IWikiProbe > ( ) ;
@@ -40,7 +40,7 @@ public class TheClearFromCacheMethod
4040 public async Task RemovesClientFromCache ( )
4141 {
4242 const string url = "https://github.com/github/RemovesClientFromCache" ;
43- var program = Substitute . For < IProgram > ( ) ;
43+ var program = CreateProgram ( ) ;
4444 var enterpriseProbe = Substitute . For < IEnterpriseProbe > ( ) ;
4545 var wikiProbe = Substitute . For < IWikiProbe > ( ) ;
4646 var factory = new SimpleApiClientFactory (
@@ -56,6 +56,13 @@ public async Task RemovesClientFromCache()
5656 }
5757 }
5858
59+ static IProgram CreateProgram ( )
60+ {
61+ var program = Substitute . For < IProgram > ( ) ;
62+ program . ProductHeader . Returns ( new ProductHeaderValue ( "ProductName" ) ) ;
63+ return program ;
64+ }
65+
5966 static IKeychain CreateKeychain ( )
6067 {
6168 var result = Substitute . For < IKeychain > ( ) ;
You can’t perform that action at this time.
0 commit comments