-
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Add more usage of C# 12 collection expressions. - Remove redundant null checks.
- Loading branch information
1 parent
c832407
commit 173898c
Showing
6 changed files
with
37 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -38,7 +38,7 @@ public static void GetAvatarUrl_Returns_Correct_Url_If_No_Email_Claim() | |
public static void GetAvatarUrl_Returns_Correct_Url(string email, string expected) | ||
{ | ||
// Arrange | ||
var identity = new ClaimsIdentity(new[] { new Claim(ClaimTypes.Email, email) }); | ||
var identity = new ClaimsIdentity([new Claim(ClaimTypes.Email, email)]); | ||
var principal = new ClaimsPrincipal(identity); | ||
|
||
// Act | ||
|
@@ -52,7 +52,7 @@ public static void GetAvatarUrl_Returns_Correct_Url(string email, string expecte | |
public static void GetAvatarUrl_Returns_Correct_Url_With_Explicit_Size() | ||
{ | ||
// Arrange | ||
var identity = new ClaimsIdentity(new[] { new Claim(ClaimTypes.Email, "[email protected]") }); | ||
var identity = new ClaimsIdentity([new Claim(ClaimTypes.Email, "[email protected]")]); | ||
var principal = new ClaimsPrincipal(identity); | ||
|
||
// Act | ||
|
@@ -87,7 +87,7 @@ public static void GetDisplayName_Returns_Correct_Value_If_No_GivenName_Or_Name( | |
public static void GetDisplayName_Returns_Correct_Value_If_No_GivenName_But_Name(string name, string expected) | ||
{ | ||
// Arrange | ||
var identity = new ClaimsIdentity(new[] { new Claim(ClaimTypes.Name, name) }); | ||
var identity = new ClaimsIdentity([new Claim(ClaimTypes.Name, name)]); | ||
var principal = new ClaimsPrincipal(identity); | ||
|
||
// Act | ||
|
@@ -103,7 +103,7 @@ public static void GetDisplayName_Returns_Correct_Value_If_No_GivenName_But_Name | |
public static void GetDisplayName_Returns_Correct_Value_If_Blank_GivenName_But_Name(string name, string expected) | ||
{ | ||
// Arrange | ||
var identity = new ClaimsIdentity(new[] { new Claim(ClaimTypes.Name, name), new Claim(ClaimTypes.GivenName, string.Empty) }); | ||
var identity = new ClaimsIdentity([new Claim(ClaimTypes.Name, name), new Claim(ClaimTypes.GivenName, string.Empty)]); | ||
var principal = new ClaimsPrincipal(identity); | ||
|
||
// Act | ||
|
@@ -119,7 +119,7 @@ public static void GetDisplayName_Returns_Correct_Value_If_Blank_GivenName_But_N | |
public static void GetDisplayName_Returns_Correct_Value_If_GivenName(string givenName, string expected) | ||
{ | ||
// Arrange | ||
var identity = new ClaimsIdentity(new[] { new Claim(ClaimTypes.GivenName, givenName) }); | ||
var identity = new ClaimsIdentity([new Claim(ClaimTypes.GivenName, givenName)]); | ||
var principal = new ClaimsPrincipal(identity); | ||
|
||
// Act | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters