Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
georgii-borovinskikh-sonarsource committed Jan 6, 2025
1 parent 62dc2fa commit b541115
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
namespace SonarLint.VisualStudio.Integration.UnitTests.Helpers
{
[TestClass]
public class SonarLintOutputTests
public class SonarLintOutputLoggerFactory
{
// the normal check for export does not work here because this is a special Property export instead of the normal Class export
// [TestMethod]
Expand All @@ -41,7 +41,7 @@ public void Ctor_CreatesLoggerWithExpectedParameters()
{
var loggerFactory = Substitute.For<ILoggerFactory>();

var testSubject = new SonarLintOutputLoggerFactory(loggerFactory, Substitute.For<IServiceProvider>(), Substitute.For<ISonarLintSettings>());
var testSubject = new Integration.Helpers.SonarLintOutputLoggerFactory(loggerFactory, Substitute.For<IServiceProvider>(), Substitute.For<ISonarLintSettings>());

testSubject.Instance.Should().NotBeNull();
loggerFactory.Create(Arg.Any<SonarLintOutputWindowLoggerWriter>(), Arg.Any<SonarLintSettingsLoggerSettingsProvider>());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,10 @@
*/

using System.Diagnostics.CodeAnalysis;
using SonarLint.VisualStudio.Core;
using SonarLint.VisualStudio.Core.Logging;

namespace SonarLint.VisualStudio.Roslyn.Suppressions;

[ExcludeFromCodeCoverage]
internal class SystemDebugLoggerWriter : ILoggerWriter
{
public void WriteLine(string message) => Debug.WriteLine(message);
}

[ExcludeFromCodeCoverage]
internal class EnableAllLoggerSettingsProvider : ILoggerSettingsProvider
{
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
/*
* SonarLint for Visual Studio
* Copyright (C) 2016-2024 SonarSource SA
* mailto:info AT sonarsource DOT com
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3 of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/

using System.Diagnostics.CodeAnalysis;
using SonarLint.VisualStudio.Core.Logging;

namespace SonarLint.VisualStudio.Roslyn.Suppressions;

[ExcludeFromCodeCoverage]
internal class SystemDebugLoggerWriter : ILoggerWriter
{
public void WriteLine(string message) => Debug.WriteLine(message);
}

0 comments on commit b541115

Please sign in to comment.