Skip to content

Commit

Permalink
Added accept to SC
Browse files Browse the repository at this point in the history
  • Loading branch information
ugras-ergun-sonarsource committed Jan 15, 2024
1 parent a694423 commit 3cc3902
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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)]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
}

0 comments on commit 3cc3902

Please sign in to comment.