Skip to content

Commit ebc4cf9

Browse files
C# syntax updates
1 parent 180cf8c commit ebc4cf9

4 files changed

Lines changed: 36 additions & 10 deletions

File tree

src/Codebreaker.Identity.sln

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
2+
Microsoft Visual Studio Solution File, Format Version 12.00
3+
# Visual Studio Version 17
4+
VisualStudioVersion = 17.14.36121.58
5+
MinimumVisualStudioVersion = 10.0.40219.1
6+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Codebreaker.Identity", "services\identity\Codebreaker.Identity\Codebreaker.Identity.csproj", "{0F0F9423-3793-5157-B688-D616FC508021}"
7+
EndProject
8+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Codebreaker.Identity.Tests", "services\identity\Codebreaker.Identity.Tests\Codebreaker.Identity.Tests.csproj", "{908DAF3F-1A04-E26E-CE74-87B1C27E47AC}"
9+
EndProject
10+
Global
11+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
12+
Debug|Any CPU = Debug|Any CPU
13+
Release|Any CPU = Release|Any CPU
14+
EndGlobalSection
15+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
16+
{0F0F9423-3793-5157-B688-D616FC508021}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
17+
{0F0F9423-3793-5157-B688-D616FC508021}.Debug|Any CPU.Build.0 = Debug|Any CPU
18+
{0F0F9423-3793-5157-B688-D616FC508021}.Release|Any CPU.ActiveCfg = Release|Any CPU
19+
{0F0F9423-3793-5157-B688-D616FC508021}.Release|Any CPU.Build.0 = Release|Any CPU
20+
{908DAF3F-1A04-E26E-CE74-87B1C27E47AC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
21+
{908DAF3F-1A04-E26E-CE74-87B1C27E47AC}.Debug|Any CPU.Build.0 = Debug|Any CPU
22+
{908DAF3F-1A04-E26E-CE74-87B1C27E47AC}.Release|Any CPU.ActiveCfg = Release|Any CPU
23+
{908DAF3F-1A04-E26E-CE74-87B1C27E47AC}.Release|Any CPU.Build.0 = Release|Any CPU
24+
EndGlobalSection
25+
GlobalSection(SolutionProperties) = preSolution
26+
HideSolutionNode = FALSE
27+
EndGlobalSection
28+
GlobalSection(ExtensibilityGlobals) = postSolution
29+
SolutionGuid = {5AABC12D-CB55-4156-BFE7-95FDD686A192}
30+
EndGlobalSection
31+
EndGlobal

src/services/identity/Codebreaker.Identity.Tests/AnonymousUserServiceTests.cs

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -80,15 +80,10 @@ public void ServiceInitialization_WithNullLogger_ShouldThrow()
8080
}
8181

8282
// A test wrapper for GraphAnonymousUserService that allows testing without actually using Graph API
83-
private class GraphAnonymousUserServiceWrapper : GraphAnonymousUserService
83+
private class GraphAnonymousUserServiceWrapper(
84+
IOptions<AnonymousUserOptions> options,
85+
ILogger<GraphAnonymousUserService> logger) : GraphAnonymousUserService(options, logger)
8486
{
85-
public GraphAnonymousUserServiceWrapper(
86-
IOptions<AnonymousUserOptions> options,
87-
ILogger<GraphAnonymousUserService> logger)
88-
: base(options, logger)
89-
{
90-
// Constructor only for initialization testing
91-
}
9287

9388
// We don't test the actual Graph API methods here
9489
public new Task<AnonymousUser> CreateAnonUser(string userName) =>

src/services/identity/Codebreaker.Identity/Services/GraphAnonymousUserService.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ public async Task<AnonymousUser> CreateAnonUser(string userName)
5656
try
5757
{
5858
// Create the user in Azure AD via Microsoft Graph
59-
var newUser = new User
59+
User newUser = new()
6060
{
6161
AccountEnabled = true,
6262
DisplayName = displayName,

src/services/identity/Codebreaker.Identity/Services/MockAnonymousUserService.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ namespace Codebreaker.Identity.Services;
99
public class MockAnonymousUserService : IAnonymousUserService
1010
{
1111
private readonly ILogger<MockAnonymousUserService> _logger;
12-
private readonly List<AnonymousUser> _users = new();
12+
private readonly List<AnonymousUser> _users = [];
1313

1414
/// <summary>
1515
/// Initializes a new instance of the <see cref="MockAnonymousUserService"/> class

0 commit comments

Comments
 (0)