2 implementations of NormalizeName
Microsoft.AspNetCore.Identity.Test (1)
UserManagerTest.cs (1)
294
public string
NormalizeName
(string key) => "#" + key;
Microsoft.Extensions.Identity.Core (1)
UpperInvariantLookupNormalizer.cs (1)
19
public string?
NormalizeName
(string? name)
33 references to NormalizeName
Microsoft.AspNetCore.Identity.EntityFrameworkCore.Test (1)
src\Identity\test\Shared\MockHelpers.cs (1)
79
lookupNormalizer.Setup(i => i.
NormalizeName
(It.IsAny<string>())).Returns(normalizerFunc);
Microsoft.AspNetCore.Identity.InMemory.Test (1)
src\Identity\test\Shared\MockHelpers.cs (1)
79
lookupNormalizer.Setup(i => i.
NormalizeName
(It.IsAny<string>())).Returns(normalizerFunc);
Microsoft.AspNetCore.Identity.Test (29)
RoleManagerTest.cs (4)
19
store.Setup(s => s.SetNormalizedRoleNameAsync(role, normalizer.
NormalizeName
(role.Name), CancellationToken.None)).Returns(Task.FromResult(0)).Verifiable();
39
store.Setup(s => s.SetNormalizedRoleNameAsync(role, normalizer.
NormalizeName
(role.Name), CancellationToken.None)).Returns(Task.FromResult(0)).Verifiable();
65
store.Setup(s => s.FindByNameAsync(normalizer.
NormalizeName
("Foo"), CancellationToken.None)).Returns(Task.FromResult(role)).Verifiable();
101
store.Setup(s => s.FindByNameAsync(normalizer.
NormalizeName
("Foo"), CancellationToken.None)).Returns(Task.FromResult(role)).Verifiable();
src\Identity\test\Shared\MockHelpers.cs (1)
79
lookupNormalizer.Setup(i => i.
NormalizeName
(It.IsAny<string>())).Returns(normalizerFunc);
UserManagerTest.cs (24)
71
store.Setup(s => s.SetNormalizedUserNameAsync(user, normalizer.
NormalizeName
(user.UserName), CancellationToken.None)).Returns(Task.FromResult(0)).Verifiable();
112
store.Setup(s => s.SetNormalizedUserNameAsync(user, normalizer.
NormalizeName
(user.UserName), CancellationToken.None)).Returns(Task.FromResult(0)).Verifiable();
148
store.Setup(s => s.SetNormalizedUserNameAsync(user, normalizer.
NormalizeName
(user.UserName), CancellationToken.None)).Returns(Task.FromResult(0)).Verifiable();
169
store.Setup(s => s.SetNormalizedUserNameAsync(user, normalizer.
NormalizeName
(user.UserName), CancellationToken.None)).Returns(Task.FromResult(0)).Verifiable();
191
store.Setup(s => s.SetNormalizedUserNameAsync(user, normalizer.
NormalizeName
("foo"), CancellationToken.None)).Returns(Task.FromResult(0)).Verifiable();
227
store.Setup(s => s.FindByNameAsync(normalizer.
NormalizeName
(user.UserName), CancellationToken.None)).Returns(Task.FromResult(user)).Verifiable();
342
store.Setup(s => s.AddToRoleAsync(user, normalizer.
NormalizeName
("A"), CancellationToken.None))
345
store.Setup(s => s.AddToRoleAsync(user, normalizer.
NormalizeName
("B"), CancellationToken.None))
348
store.Setup(s => s.AddToRoleAsync(user, normalizer.
NormalizeName
("C"), CancellationToken.None))
353
store.Setup(s => s.IsInRoleAsync(user, normalizer.
NormalizeName
("A"), CancellationToken.None))
356
store.Setup(s => s.IsInRoleAsync(user, normalizer.
NormalizeName
("B"), CancellationToken.None))
359
store.Setup(s => s.IsInRoleAsync(user, normalizer.
NormalizeName
("C"), CancellationToken.None))
370
store.Verify(s => s.AddToRoleAsync(user, normalizer.
NormalizeName
("C"), CancellationToken.None), Times.Once());
420
store.Setup(s => s.AddToRoleAsync(user, normalizer.
NormalizeName
("A"), CancellationToken.None))
423
store.Setup(s => s.IsInRoleAsync(user, normalizer.
NormalizeName
("B"), CancellationToken.None))
444
store.Setup(s => s.RemoveFromRoleAsync(user, normalizer.
NormalizeName
("A"), CancellationToken.None))
447
store.Setup(s => s.RemoveFromRoleAsync(user, normalizer.
NormalizeName
("B"), CancellationToken.None))
450
store.Setup(s => s.RemoveFromRoleAsync(user, normalizer.
NormalizeName
("C"), CancellationToken.None))
454
store.Setup(s => s.IsInRoleAsync(user, normalizer.
NormalizeName
("A"), CancellationToken.None))
457
store.Setup(s => s.IsInRoleAsync(user, normalizer.
NormalizeName
("B"), CancellationToken.None))
460
store.Setup(s => s.IsInRoleAsync(user, normalizer.
NormalizeName
("C"), CancellationToken.None))
481
store.Setup(s => s.RemoveFromRoleAsync(user, normalizer.
NormalizeName
("A"), CancellationToken.None))
484
store.Setup(s => s.IsInRoleAsync(user, normalizer.
NormalizeName
("A"), CancellationToken.None))
487
store.Setup(s => s.IsInRoleAsync(user, normalizer.
NormalizeName
("B"), CancellationToken.None))
Microsoft.Extensions.Identity.Core (2)
RoleManager.cs (1)
235
return (KeyNormalizer == null) ? key : KeyNormalizer.
NormalizeName
(key);
UserManager.cs (1)
592
=> (KeyNormalizer == null) ? name : KeyNormalizer.
NormalizeName
(name);