diff --git a/src/Core.UnitTests/Configuration/ConnectedModeFeaturesConfigurationTests.cs b/src/Core.UnitTests/Configuration/ConnectedModeFeaturesConfigurationTests.cs index 74db8ed1b8..b10e31e1ef 100644 --- a/src/Core.UnitTests/Configuration/ConnectedModeFeaturesConfigurationTests.cs +++ b/src/Core.UnitTests/Configuration/ConnectedModeFeaturesConfigurationTests.cs @@ -52,11 +52,11 @@ public void IsAcceptTransitionAvailable_NoServerInfo_ReturnsFalse() [DataRow(9, 6, 9)] [DataRow(0, 0, 0)] [DataTestMethod] - public void IsAcceptTransitionAvailable_AnySonarCloudVersion_ReturnsFalse(int major, int minor, int build) + public void IsAcceptTransitionAvailable_AnySonarCloudVersion_ReturnsTrue(int major, int minor, int build) { var testSubject = CreateTestSubject(new ServerInfo(new Version(major, minor, build), ServerType.SonarCloud)); - testSubject.IsAcceptTransitionAvailable().Should().BeFalse(); + testSubject.IsAcceptTransitionAvailable().Should().BeTrue(); } [DataRow(0, 0, 0, false)] diff --git a/src/Core/Configuration/ConnectedModeFeaturesConfiguration.cs b/src/Core/Configuration/ConnectedModeFeaturesConfiguration.cs index f8847cbdc2..4d6fe7056e 100644 --- a/src/Core/Configuration/ConnectedModeFeaturesConfiguration.cs +++ b/src/Core/Configuration/ConnectedModeFeaturesConfiguration.cs @@ -88,7 +88,7 @@ public bool IsAcceptTransitionAvailable() { var serverInfo = sonarQubeService.GetServerInfo(); - return serverInfo != null && (serverInfo.ServerType == ServerType.SonarQube && serverInfo.Version >= minimalSonarQubeVersionForAccept); + return serverInfo != null && IsSupportedForVersion(serverInfo, minimalSonarQubeVersionForAccept); } } } diff --git a/src/SonarQube.Client.Tests/Requests/DefaultConfiguration_Configure.cs b/src/SonarQube.Client.Tests/Requests/DefaultConfiguration_Configure.cs index 47cde104da..ea3de6c32f 100644 --- a/src/SonarQube.Client.Tests/Requests/DefaultConfiguration_Configure.cs +++ b/src/SonarQube.Client.Tests/Requests/DefaultConfiguration_Configure.cs @@ -116,7 +116,7 @@ public void ConfigureSonarCloud_Writes_Debug_Messages() "Registered SonarQube.Client.Api.V10_2.GetTaintVulnerabilitiesWithCCTRequest", "Registered SonarQube.Client.Api.V7_20.GetExclusionsRequest", "Registered SonarQube.Client.Api.V9_7.SearchHotspotRequest", - "Registered SonarQube.Client.Api.V9_9.TransitionIssueRequestWithWontFix", + "Registered SonarQube.Client.Api.V10_4.TransitionIssueRequestWithAccept", "Registered SonarQube.Client.Api.V9_9.CommentIssueRequest", "Registered SonarQube.Client.Api.V9_9.SearchFilesByNameRequest" }; diff --git a/src/SonarQube.Client/Api/DefaultConfiguration.cs b/src/SonarQube.Client/Api/DefaultConfiguration.cs index 84a02489f9..d599020860 100644 --- a/src/SonarQube.Client/Api/DefaultConfiguration.cs +++ b/src/SonarQube.Client/Api/DefaultConfiguration.cs @@ -95,7 +95,7 @@ public static UnversionedRequestFactory ConfigureSonarCloud(UnversionedRequestFa .RegisterRequest() .RegisterRequest() .RegisterRequest() - .RegisterRequest() + .RegisterRequest() .RegisterRequest() .RegisterRequest();