Skip to content

Commit 94db68d

Browse files
author
Adit Sheth
committed
More updates.
1 parent 68db86d commit 94db68d

File tree

1 file changed

+0
-42
lines changed

1 file changed

+0
-42
lines changed

src/Http/Authentication.Core/test/TokenExtensionTests.cs

Lines changed: 0 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -150,28 +150,6 @@ public async Task GetTokenWorksWithExplicitScheme()
150150
Assert.Equal("3", await context.GetTokenAsync("simple", "Three"));
151151
}
152152

153-
[Fact]
154-
public void StoreTokensStoresTokensWithNullValues()
155-
{
156-
var properties = new AuthenticationProperties();
157-
var tokens = new List<AuthenticationToken>
158-
{
159-
new AuthenticationToken { Name = "access_token", Value = "access_value" },
160-
new AuthenticationToken { Name = "refresh_token", Value = null },
161-
new AuthenticationToken { Name = "id_token", Value = "id_value" }
162-
};
163-
164-
properties.StoreTokens(tokens);
165-
166-
Assert.Equal("access_value", properties.GetTokenValue("access_token"));
167-
Assert.Null(properties.GetTokenValue("refresh_token"));
168-
Assert.Equal("id_value", properties.GetTokenValue("id_token"));
169-
170-
var retrievedTokens = properties.GetTokens().ToList();
171-
Assert.Equal(2, retrievedTokens.Count);
172-
Assert.DoesNotContain(retrievedTokens, t => t.Name == "refresh_token");
173-
}
174-
175153
[Fact]
176154
public void UpdateTokenValueWorksWithNullGetTokenValueResult()
177155
{
@@ -188,26 +166,6 @@ public void UpdateTokenValueWorksWithNullGetTokenValueResult()
188166
Assert.Null(targetProperties.GetTokenValue("refresh_token"));
189167
}
190168

191-
[Fact]
192-
public void GetTokensExcludesTokensWithNullValues()
193-
{
194-
var properties = new AuthenticationProperties();
195-
var tokens = new List<AuthenticationToken>
196-
{
197-
new AuthenticationToken { Name = "access_token", Value = "access_value" },
198-
new AuthenticationToken { Name = "refresh_token", Value = null },
199-
new AuthenticationToken { Name = "id_token", Value = "id_value" }
200-
};
201-
202-
properties.StoreTokens(tokens);
203-
var retrievedTokens = properties.GetTokens().ToList();
204-
205-
Assert.Equal(2, retrievedTokens.Count);
206-
Assert.Contains(retrievedTokens, t => t.Name == "access_token" && t.Value == "access_value");
207-
Assert.Contains(retrievedTokens, t => t.Name == "id_token" && t.Value == "id_value");
208-
Assert.DoesNotContain(retrievedTokens, t => t.Name == "refresh_token");
209-
}
210-
211169
private class SimpleAuth : IAuthenticationHandler
212170
{
213171
public Task<AuthenticateResult> AuthenticateAsync()

0 commit comments

Comments
 (0)