public void ConfigExt_FindServerVersion_NoSetting_ReturnsNull() { var config = new AnalysisConfig(); var actualVersion = ConfigSettingsExtensions.FindServerVersion(config); actualVersion.Should().BeNull(); }
public void ConfigExt_FindServerVersion_ValidVersion_ReturnsVersion() { var config = new AnalysisConfig { SonarQubeVersion = "6.7.1.2" }; var actualVersion = ConfigSettingsExtensions.FindServerVersion(config); actualVersion.Should().Be(new Version("6.7.1.2")); }
public void ConfigExt_FindServerVersion_InvalidVersion_ReturnsNull() { var config = new AnalysisConfig { SonarQubeVersion = "invalid" }; var actualVersion = ConfigSettingsExtensions.FindServerVersion(config); actualVersion.Should().BeNull(); }
public void ConfigExt_FindServerVersion_WhenConfigIsNull_Throws() { Action action = () => ConfigSettingsExtensions.FindServerVersion(null); action.Should().ThrowExactly <ArgumentNullException>().And.ParamName.Should().Be("config"); }