public void Execute_WhenUserCmdLineArgumentsIsNull_Throws() { // Arrange var testSubject = new SonarScannerWrapper(new TestLogger()); Action act = () => testSubject.Execute(new AnalysisConfig(), null); // Act & Assert act.Should().ThrowExactly <ArgumentNullException>().And.ParamName.Should().Be("userCmdLineArguments"); }
public void Execute_WhenConfigIsNull_Throws() { // Arrange var testSubject = new SonarScannerWrapper(new TestLogger()); Action act = () => testSubject.Execute(null, new string[] { }); // Act & Assert act.Should().ThrowExactly <ArgumentNullException>().And.ParamName.Should().Be("config"); }