Skip to content

Commit b550293

Browse files
authored
dependencies: migrate from json.net to system.text.json (#1274)
# Overview Migrate GCM from JSON.NET to `System.Text.Json`. The first commit updates to .NET 7.0 to take advantage of certain features like `JsonRequired`. The second updates `Microsoft.Identity.Client` so that the workaround for [this issue](AzureAD/microsoft-authentication-library-for-dotnet#4108 ) is no longer necessary. The third updates the current global Json.NET dependency to `System.Text.Json` and ensures it is only used for .NET Framework. The fourth adds a custom converter to handle Bitbucket's use of the non-standard 'scopes' property to provide token endpoint results. The fifth through ninth commits update `Trace2Message`, the Bitbucket REST API, the GitHub REST API, the Azure DevOps API tests, and OAuth-specific code to use `System.Text.Json` instead of Json.NET for JSON serialization/deserialization. # Performance comparison Comparison runs were done using [`dotnet-trace`](https://learn.microsoft.com/en-us/dotnet/core/diagnostics/dotnet-trace) with the command `printf "protocol=https\nhost=github.com" | git-credential-manager get`. The machine used was a Mac with a 2.4 GHz 8-Core Intel Core i9 processor running Ventura 13.4. Times are in milliseconds. ## Individual Run Times | **Newtonsoft.json** | **System.Text.Json** | |---------------------|----------------------| | 364.08 | 304.92 | | 366.11 | 305.23 | | 377.31 | 313.09 | | 381.3 | 313.51 | | 373.25 | 297.71 | | 373.98 | 312.78 | | 370.84 | 317.86 | | 368.25 | 311.78 | | 369.79 | 307.69 | ## Run Summary | | **Newtonsoft.json** | **System.Text.Json** | |-------------|---------------------|----------------------| | **Average** | 371.66 | 309.40 | | **Median** | 370.84 | 311.78 | ## Analysis Per the above, the transition to `System.Text.Json` and .NET 7.0 decreased end-to-end execution times by about 17% on average.
2 parents d66558b + 2e153ce commit b550293

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+430
-292
lines changed

.vscode/launch.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"request": "launch",
1111
"preLaunchTask": "build",
1212
// If you have changed target frameworks, make sure to update the program path.
13-
"program": "${workspaceFolder}/out/shared/Git-Credential-Manager/bin/Debug/net6.0/git-credential-manager.dll",
13+
"program": "${workspaceFolder}/out/shared/Git-Credential-Manager/bin/Debug/net7.0/git-credential-manager.dll",
1414
"args": ["get"],
1515
"cwd": "${workspaceFolder}/out/shared/Git-Credential-Manager",
1616
"console": "integratedTerminal",
@@ -22,7 +22,7 @@
2222
"request": "launch",
2323
"preLaunchTask": "build",
2424
// If you have changed target frameworks, make sure to update the program path.
25-
"program": "${workspaceFolder}/out/shared/Git-Credential-Manager/bin/Debug/net6.0/git-credential-manager.dll",
25+
"program": "${workspaceFolder}/out/shared/Git-Credential-Manager/bin/Debug/net7.0/git-credential-manager.dll",
2626
"args": ["store"],
2727
"cwd": "${workspaceFolder}/out/shared/Git-Credential-Manager",
2828
"console": "integratedTerminal",

.vscode/tasks.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
"type": "shell",
5757
"group": "test",
5858
"args": [
59-
"~/.nuget/packages/reportgenerator/*/*/net6.0/ReportGenerator.dll",
59+
"~/.nuget/packages/reportgenerator/*/*/net7.0/ReportGenerator.dll",
6060
"-reports:${workspaceFolder}/**/TestResults/**/coverage.cobertura.xml",
6161
"-targetdir:${workspaceFolder}/out/code-coverage"
6262
],
@@ -71,7 +71,7 @@
7171
"type": "shell",
7272
"group": "test",
7373
"args": [
74-
"${env:USERROFILE}/.nuget/packages/reportgenerator/*/*/net6.0/ReportGenerator.dll",
74+
"${env:USERROFILE}/.nuget/packages/reportgenerator/*/*/net7.0/ReportGenerator.dll",
7575
"-reports:${workspaceFolder}/**/TestResults/**/coverage.cobertura.xml",
7676
"-targetdir:${workspaceFolder}/out/code-coverage"
7777
],

Directory.Build.props

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,9 @@
2626
<GenerateWindowsAppManifest Condition="'$(GenerateWindowsAppManifest)' == '' AND '$(OSPlatform)' == 'windows' AND '$(_IsExeProject)' == 'true'">true</GenerateWindowsAppManifest>
2727
</PropertyGroup>
2828

29-
<ItemGroup>
30-
<!-- Workaround https://github.com/AzureAD/microsoft-authentication-library-for-dotnet/issues/4108 -->
31-
<PackageReference Include="Newtonsoft.Json">
32-
<Version>13.0.1</Version>
29+
<ItemGroup Condition = "'$(TargetFramework)' == 'net472'">
30+
<PackageReference Include="System.Text.Json">
31+
<Version>7.0.2</Version>
3332
</PackageReference>
3433
</ItemGroup>
3534

build/GCM.MSBuild.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFramework>net6.0</TargetFramework>
4+
<TargetFramework>net7.0</TargetFramework>
55
<IncludeBuildOutput>false</IncludeBuildOutput>
66
</PropertyGroup>
77

docs/development.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -209,13 +209,13 @@ HTML reports can be generated using ReportGenerator, this should be installed
209209
during the build process, from the command line:
210210

211211
```shell
212-
dotnet ~/.nuget/packages/reportgenerator/*/*/net6.0/ReportGenerator.dll -reports:./**/TestResults/**/coverage.cobertura.xml -targetdir:./out/code-coverage
212+
dotnet ~/.nuget/packages/reportgenerator/*/*/net7.0/ReportGenerator.dll -reports:./**/TestResults/**/coverage.cobertura.xml -targetdir:./out/code-coverage
213213
```
214214

215215
or
216216

217217
```shell
218-
dotnet {$env:USERPROFILE}/.nuget/packages/reportgenerator/*/*/net6.0/ReportGenerator.dll -reports:./**/TestResults/**/coverage.cobertura.xml -targetdir:./out/code-coverage
218+
dotnet {$env:USERPROFILE}/.nuget/packages/reportgenerator/*/*/net7.0/ReportGenerator.dll -reports:./**/TestResults/**/coverage.cobertura.xml -targetdir:./out/code-coverage
219219
```
220220

221221
Or via VSCode Terminal/Run Task:

src/linux/Packaging.Linux/Packaging.Linux.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<Import Project="Sdk.props" Sdk="Microsoft.NET.Sdk" />
44

55
<PropertyGroup>
6-
<TargetFramework>net6.0</TargetFramework>
6+
<TargetFramework>net7.0</TargetFramework>
77
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
88
</PropertyGroup>
99

src/linux/Packaging.Linux/layout.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ GCM_SRC="$SRC/shared/Git-Credential-Manager"
3838
PROJ_OUT="$OUT/linux/Packaging.Linux"
3939

4040
# Build parameters
41-
FRAMEWORK=net6.0
41+
FRAMEWORK=net7.0
4242
RUNTIME=linux-x64
4343

4444
# Perform pre-execution checks

src/osx/Installer.Mac/Installer.Mac.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<Import Project="Sdk.props" Sdk="Microsoft.NET.Sdk" />
44

55
<PropertyGroup>
6-
<TargetFramework>net6.0</TargetFramework>
6+
<TargetFramework>net7.0</TargetFramework>
77
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
88
</PropertyGroup>
99

src/osx/Installer.Mac/layout.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ GCM_SRC="$SRC/shared/Git-Credential-Manager"
2424
GCM_UI_SRC="$SRC/shared/Git-Credential-Manager.UI.Avalonia"
2525

2626
# Build parameters
27-
FRAMEWORK=net6.0
27+
FRAMEWORK=net7.0
2828

2929
# Parse script arguments
3030
for i in "$@"

src/shared/Atlassian.Bitbucket.Tests/Atlassian.Bitbucket.Tests.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFramework>net6.0</TargetFramework>
4+
<TargetFramework>net7.0</TargetFramework>
55
<IsPackable>false</IsPackable>
66
<IsTestProject>true</IsTestProject>
77
<LangVersion>latest</LangVersion>

src/shared/Atlassian.Bitbucket.Tests/BitbucketHostProviderTest.cs

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ public async Task BitbucketHostProvider_GetCredentialAsync_Valid_Stored_OAuth(
141141
}
142142
MockStoredAccount(context, input, token);
143143
MockRemoteAccessTokenValid(input, token);
144-
144+
145145
var provider = new BitbucketHostProvider(context, bitbucketAuthentication.Object, MockRestApiRegistry(input, bitbucketApi).Object);
146146

147147
var credential = await provider.GetCredentialAsync(input);
@@ -363,7 +363,7 @@ public async Task BitbucketHostProvider_GetCredentialAsync_AlwaysRefreshCredenti
363363
// Cloud - supports Basic, OAuth
364364
[InlineData("https", "bitbucket.org", "oauth", AuthenticationModes.OAuth)]
365365
[InlineData("https", "bitbucket.org", "basic", AuthenticationModes.Basic)]
366-
[InlineData("https", "bitbucket.org", "NOT-A-REAL-VALUE", CloudConstants.DotOrgAuthenticationModes)]
366+
[InlineData("https", "bitbucket.org", "NOT-A-REAL-VALUE", CloudConstants.DotOrgAuthenticationModes)]
367367
[InlineData("https", "bitbucket.org", "none", CloudConstants.DotOrgAuthenticationModes)]
368368
[InlineData("https", "bitbucket.org", null, CloudConstants.DotOrgAuthenticationModes)]
369369
public async Task BitbucketHostProvider_GetSupportedAuthenticationModes(string protocol, string host, string bitbucketAuthModes, AuthenticationModes expectedModes)
@@ -497,10 +497,9 @@ private void MockPromptOAuth(InputArguments input)
497497
.ReturnsAsync(new CredentialsPromptResult(AuthenticationModes.OAuth));
498498
}
499499

500-
private void MockRemoteBasicValid(InputArguments input, string password, bool twoFactor = true)
500+
private void MockRemoteBasicValid(InputArguments input, string password)
501501
{
502-
var userInfo = new Mock<IUserInfo>(MockBehavior.Strict);
503-
userInfo.Setup(ui => ui.IsTwoFactorAuthenticationEnabled).Returns(twoFactor);
502+
var userInfo = new Mock<IUserInfo>(MockBehavior.Strict);
504503
userInfo.Setup(ui => ui.UserName).Returns(input.UserName);
505504

506505
// Basic
@@ -515,10 +514,9 @@ private void MockRemoteAccessTokenExpired(InputArguments input, string token)
515514
.ReturnsAsync(new RestApiResult<IUserInfo>(System.Net.HttpStatusCode.Unauthorized));
516515
}
517516

518-
private void MockRemoteAccessTokenValid(InputArguments input, string token, bool twoFactor = true)
517+
private void MockRemoteAccessTokenValid(InputArguments input, string token)
519518
{
520-
var userInfo = new Mock<IUserInfo>(MockBehavior.Strict);
521-
userInfo.Setup(ui => ui.IsTwoFactorAuthenticationEnabled).Returns(twoFactor);
519+
var userInfo = new Mock<IUserInfo>(MockBehavior.Strict);
522520
userInfo.Setup(ui => ui.UserName).Returns(input.UserName);
523521

524522
// OAuth
@@ -565,9 +563,9 @@ private void VerifyOAuthRefreshTokenStored(TestCommandContext context, InputArgu
565563
private static Mock<IRegistry<IBitbucketRestApi>> MockRestApiRegistry(InputArguments input, Mock<IBitbucketRestApi> bitbucketApi)
566564
{
567565
var restApiRegistry = new Mock<IRegistry<IBitbucketRestApi>>(MockBehavior.Strict);
568-
566+
569567
restApiRegistry.Setup(rar => rar.Get(input)).Returns(bitbucketApi.Object);
570-
568+
571569
return restApiRegistry;
572570
}
573571

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,32 @@
1-
using Newtonsoft.Json;
1+
using System;
2+
using System.Text.Json;
23
using Xunit;
34

45
namespace Atlassian.Bitbucket.Tests
56
{
67
public class BitbucketTokenEndpointResponseJsonTest
78
{
89
[Fact]
9-
public void BitbucketTokenEndpointResponseJson_Deserialize_Scopes_Not_Scope()
10+
public void BitbucketTokenEndpointResponseJson_Deserialize_Uses_Scopes()
1011
{
11-
var scopesString = "a,b,c";
12-
var json = "{access_token: '', token_type: '', scopes:'" + scopesString + "', scope: 'x,y,z'}";
12+
var accessToken = "123";
13+
var tokenType = "Bearer";
14+
var expiresIn = 1000;
15+
var scopesString = "x,y,z";
16+
var scopeString = "a,b,c";
1317

14-
var result = JsonConvert.DeserializeObject<BitbucketTokenEndpointResponseJson>(json);
18+
var json = $"{{\"access_token\": \"{accessToken}\", \"token_type\": \"{tokenType}\", \"expires_in\": {expiresIn}, \"scopes\": \"{scopesString}\", \"scope\": \"{scopeString}\"}}";
1519

20+
var result = JsonSerializer.Deserialize<BitbucketTokenEndpointResponseJson>(json,
21+
new JsonSerializerOptions
22+
{
23+
PropertyNameCaseInsensitive = true
24+
});
25+
26+
Assert.Equal(accessToken, result.AccessToken);
27+
Assert.Equal(tokenType, result.TokenType);
28+
Assert.Equal(expiresIn, result.ExpiresIn);
1629
Assert.Equal(scopesString, result.Scope);
1730
}
1831
}
19-
}
32+
}

src/shared/Atlassian.Bitbucket.Tests/Cloud/BitbucketRestApiTest.cs

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,17 +14,16 @@ public class BitbucketRestApiTest
1414
[Theory]
1515
[InlineData("jsquire", "token", true)]
1616
[InlineData("jsquire", "password", false)]
17-
public async Task BitbucketRestApi_GetUserInformationAsync_ReturnsUserInfo_ForSuccessfulRequest(string username, string password, bool isBearerToken)
17+
public async Task BitbucketRestApi_GetUserInformationAsync_ReturnsUserInfo_ForSuccessfulRequest(string username, string password, bool isBearerToken)
1818
{
19-
var twoFactorAuthenticationEnabled = false;
2019
var uuid = Guid.NewGuid();
2120
var accountId = "1234";
2221

2322
var context = new TestCommandContext();
2423

2524
var expectedRequestUri = new Uri("https://api.bitbucket.org/2.0/user");
2625

27-
var userinfoResponseJson = $"{{ \"username\": \"{username}\" , \"has_2fa_enabled\": \"{twoFactorAuthenticationEnabled}\", \"account_id\": \"{accountId}\", \"uuid\": \"{uuid}\"}}";
26+
var userinfoResponseJson = $"{{\"username\":\"{username}\",\"has_2fa_enabled\":false,\"account_id\":\"{accountId}\",\"uuid\":\"{uuid}\"}}";
2827

2928
var httpResponse = new HttpResponseMessage(HttpStatusCode.OK)
3029
{
@@ -52,11 +51,8 @@ public async Task BitbucketRestApi_GetUserInformationAsync_ReturnsUserInfo_ForSu
5251

5352
Assert.NotNull(result);
5453
Assert.Equal(username, result.Response.UserName);
55-
Assert.Equal(twoFactorAuthenticationEnabled, result.Response.IsTwoFactorAuthenticationEnabled);
56-
Assert.Equal(accountId, ((UserInfo)result.Response).AccountId);
57-
Assert.Equal(uuid, ((UserInfo)result.Response).Uuid);
5854

5955
httpHandler.AssertRequest(HttpMethod.Get, expectedRequestUri, 1);
6056
}
6157
}
62-
}
58+
}
Lines changed: 21 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
using System;
2+
using System.Text.Json;
3+
using System.Text.Json.Serialization;
14
using System.Threading.Tasks;
25
using Atlassian.Bitbucket.Cloud;
36
using Xunit;
@@ -9,19 +12,29 @@ public class UserInfoTest
912
[Fact]
1013
public void UserInfo_Set()
1114
{
12-
var uuid = System.Guid.NewGuid();
1315
var userInfo = new UserInfo()
1416
{
15-
AccountId = "abc",
16-
IsTwoFactorAuthenticationEnabled = false,
1717
UserName = "123",
18-
Uuid = uuid
1918
};
2019

21-
Assert.Equal("abc", userInfo.AccountId);
22-
Assert.False(userInfo.IsTwoFactorAuthenticationEnabled);
2320
Assert.Equal("123", userInfo.UserName);
24-
Assert.Equal(uuid, userInfo.Uuid);
21+
}
22+
23+
[Fact]
24+
public void Deserialize_UserInfo()
25+
{
26+
var uuid = "{bef4bd75-03fe-4f19-9c6c-ed57b05ab6f6}";
27+
var userName = "bob";
28+
var accountId = "123abc";
29+
30+
var json = $"{{\"uuid\": \"{uuid}\", \"has_2fa_enabled\": null, \"username\": \"{userName}\", \"account_id\": \"{accountId}\"}}";
31+
32+
var result = JsonSerializer.Deserialize<UserInfo>(json, new JsonSerializerOptions()
33+
{
34+
PropertyNameCaseInsensitive = true,
35+
});
36+
37+
Assert.Equal(userName, result.UserName);
2538
}
2639
}
27-
}
40+
}

src/shared/Atlassian.Bitbucket.Tests/DataCenter/BitbucketRestApiTest.cs

Lines changed: 14 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,8 @@ namespace Atlassian.Bitbucket.Tests.DataCenter
1212
public class BitbucketRestApiTest
1313
{
1414
[Fact]
15-
public async Task BitbucketRestApi_GetUserInformationAsync_ReturnsUserInfo_ForSuccessfulRequest_DoesNothing()
15+
public async Task BitbucketRestApi_GetUserInformationAsync_ReturnsUserInfo_ForSuccessfulRequest_DoesNothing()
1616
{
17-
var twoFactorAuthenticationEnabled = false;
18-
1917
var context = new TestCommandContext();
2018

2119
var expectedRequestUri = new Uri("http://example.com/rest/api/1.0/users");
@@ -26,22 +24,21 @@ public async Task BitbucketRestApi_GetUserInformationAsync_ReturnsUserInfo_ForSu
2624
return httpResponse;
2725
});
2826
context.HttpClientFactory.MessageHandler = httpHandler;
29-
27+
3028
context.Settings.RemoteUri = new Uri("http://example.com");
3129

3230
var api = new BitbucketRestApi(context);
3331
var result = await api.GetUserInformationAsync("never used", "never used", false);
3432

3533
Assert.NotNull(result);
3634
Assert.Equal(DataCenterConstants.OAuthUserName, result.Response.UserName);
37-
Assert.Equal(twoFactorAuthenticationEnabled, result.Response.IsTwoFactorAuthenticationEnabled);
3835

3936
httpHandler.AssertRequest(HttpMethod.Get, expectedRequestUri, 1);
4037
}
41-
38+
4239
[Theory]
43-
[InlineData(HttpStatusCode.Unauthorized, true)]
44-
[InlineData(HttpStatusCode.NotFound, false)]
40+
[InlineData(HttpStatusCode.Unauthorized, true)]
41+
[InlineData(HttpStatusCode.NotFound, false)]
4542
public async Task BitbucketRestApi_IsOAuthInstalledAsync_ReflectsBitbucketAuthenticationResponse(HttpStatusCode responseCode, bool impliedSupport)
4643
{
4744
var context = new TestCommandContext();
@@ -75,7 +72,7 @@ public async Task BitbucketRestApi_GetAuthenticationMethodsAsync_ReflectRestApiR
7572
var httpHandler = new TestHttpMessageHandler();
7673

7774
var expectedRequestUri = new Uri("http://example.com/rest/authconfig/1.0/login-options");
78-
75+
7976
var httpResponse = new HttpResponseMessage(HttpStatusCode.OK)
8077
{
8178
Content = new StringContent(loginOptionResponseJson)
@@ -99,19 +96,19 @@ public async Task BitbucketRestApi_GetAuthenticationMethodsAsync_ReflectRestApiR
9996
Assert.Equal(authMethods.Count, impliedSupportedMethods.Count);
10097
Assert.Contains(authMethods, m => impliedSupportedMethods.Contains(m));
10198
Assert.DoesNotContain(authMethods, m => impliedUnsupportedMethods.Contains(m));
102-
}
99+
}
103100

104-
public static IEnumerable<object[]> GetAuthenticationMethodsAsyncData =>
101+
public static IEnumerable<object[]> GetAuthenticationMethodsAsyncData =>
105102
new List<object[]>
106103
{
107-
new object[] { $"{{ \"results\":[ {{ \"type\":\"LOGIN_FORM\"}}]}}",
108-
new List<AuthenticationMethod>{AuthenticationMethod.BasicAuth},
104+
new object[] { $"{{ \"results\":[ {{ \"type\":\"LOGIN_FORM\"}}]}}",
105+
new List<AuthenticationMethod>{AuthenticationMethod.BasicAuth},
109106
new List<AuthenticationMethod>{AuthenticationMethod.Sso}},
110-
new object[] { $"{{ \"results\":[{{\"type\":\"IDP\"}}]}}",
111-
new List<AuthenticationMethod>{AuthenticationMethod.Sso},
107+
new object[] { $"{{ \"results\":[{{\"type\":\"IDP\"}}]}}",
108+
new List<AuthenticationMethod>{AuthenticationMethod.Sso},
112109
new List<AuthenticationMethod>{AuthenticationMethod.BasicAuth}},
113-
new object[] { $"{{ \"results\":[{{\"type\":\"IDP\"}}, {{ \"type\":\"LOGIN_FORM\"}}, {{ \"type\":\"UNDEFINED\"}}]}}",
114-
new List<AuthenticationMethod>{AuthenticationMethod.Sso, AuthenticationMethod.BasicAuth},
110+
new object[] { $"{{ \"results\":[{{\"type\":\"IDP\"}}, {{ \"type\":\"LOGIN_FORM\"}}, {{ \"type\":\"UNDEFINED\"}}]}}",
111+
new List<AuthenticationMethod>{AuthenticationMethod.Sso, AuthenticationMethod.BasicAuth},
115112
new List<AuthenticationMethod>()},
116113
};
117114
}

src/shared/Atlassian.Bitbucket.Tests/DataCenter/UserInfoTest.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,12 @@ public class UserInfoTest
99
[Fact]
1010
public void UserInfo_Set()
1111
{
12-
var uuid = System.Guid.NewGuid();
1312
var userInfo = new UserInfo()
1413
{
1514
UserName = "123"
1615
};
1716

18-
Assert.False(userInfo.IsTwoFactorAuthenticationEnabled);
1917
Assert.Equal("123", userInfo.UserName);
2018
}
2119
}
22-
}
20+
}

src/shared/Atlassian.Bitbucket/Atlassian.Bitbucket.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFrameworks>net6.0</TargetFrameworks>
5-
<TargetFrameworks Condition="'$(OSPlatform)'=='windows'">net6.0;net472</TargetFrameworks>
4+
<TargetFrameworks>net7.0</TargetFrameworks>
5+
<TargetFrameworks Condition="'$(OSPlatform)'=='windows'">net7.0;net472</TargetFrameworks>
66
<AssemblyName>Atlassian.Bitbucket</AssemblyName>
77
<RootNamespace>Atlassian.Bitbucket</RootNamespace>
88
<IsTestProject>false</IsTestProject>

0 commit comments

Comments
 (0)