Skip to content
This repository was archived by the owner on Jun 21, 2023. It is now read-only.

Commit e97ff65

Browse files
committed
Merge master into shana/fix-tests
2 parents 7f05e63 + af82551 commit e97ff65

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed

src/UnitTests/GitHub.Api/SimpleApiClientFactoryTests.cs

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ public class TheCreateMethod
1313
[Fact]
1414
public void CreatesNewInstanceOfSimpleApiClient()
1515
{
16+
const string url = "https://github.com/github/CreatesNewInstanceOfSimpleApiClient";
1617
var program = new Program();
1718
var enterpriseProbe = Substitute.For<IEnterpriseProbeTask>();
1819
var wikiProbe = Substitute.For<IWikiProbe>();
@@ -21,11 +22,11 @@ public void CreatesNewInstanceOfSimpleApiClient()
2122
new Lazy<IEnterpriseProbeTask>(() => enterpriseProbe),
2223
new Lazy<IWikiProbe>(() => wikiProbe));
2324

24-
var client = factory.Create("https://github.com/github/visualstudio");
25+
var client = factory.Create(url);
2526

26-
Assert.Equal("https://github.com/github/visualstudio", client.OriginalUrl);
27+
Assert.Equal(url, client.OriginalUrl);
2728
Assert.Equal(HostAddress.GitHubDotComHostAddress, client.HostAddress);
28-
Assert.Same(client, factory.Create("https://github.com/github/visualstudio")); // Tests caching.
29+
Assert.Same(client, factory.Create(url)); // Tests caching.
2930
}
3031
}
3132

@@ -34,6 +35,7 @@ public class TheClearFromCacheMethod
3435
[Fact]
3536
public void RemovesClientFromCache()
3637
{
38+
const string url = "https://github.com/github/RemovesClientFromCache";
3739
var program = new Program();
3840
var enterpriseProbe = Substitute.For<IEnterpriseProbeTask>();
3941
var wikiProbe = Substitute.For<IWikiProbe>();
@@ -42,10 +44,10 @@ public void RemovesClientFromCache()
4244
new Lazy<IEnterpriseProbeTask>(() => enterpriseProbe),
4345
new Lazy<IWikiProbe>(() => wikiProbe));
4446

45-
var client = factory.Create("https://github.com/github/visualstudio");
47+
var client = factory.Create(url);
4648
factory.ClearFromCache(client);
4749

48-
Assert.NotSame(client, factory.Create("https://github.com/github/visualstudio"));
50+
Assert.NotSame(client, factory.Create(url));
4951
}
5052
}
5153
}

src/UnitTests/GitHub.App/Caches/CredentialCacheTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ public class TheInvalidateMethod : TestBaseClass
172172
[Fact]
173173
public async Task InvalidatesTheCredential()
174174
{
175-
const string key = nameof(InvalidatesTheCredential);
175+
const string key = "TheInvalidateMethod.InvalidatesTheCredential";
176176
using (var credentialCache = new CredentialCache())
177177
{
178178
var credential = Tuple.Create("somebody", "somebody's secret");
@@ -211,7 +211,7 @@ public class TheInvalidateObjectMethod : TestBaseClass
211211
[Fact]
212212
public async Task InvalidatesTheCredential()
213213
{
214-
const string key = nameof(InvalidatesTheCredential);
214+
const string key = "TheInvalidateObjectMethod.InvalidatesTheCredential";
215215
using (var credentialCache = new CredentialCache())
216216
{
217217
var credential = Tuple.Create("somebody", "somebody's secret");

0 commit comments

Comments
 (0)