From e30c07896277d0b6a753fdde7c80cfe4c03ce6bd Mon Sep 17 00:00:00 2001 From: Qstick Date: Sun, 6 Sep 2020 22:00:37 -0400 Subject: [PATCH] Remove unnecessary usings Signed-off-by: Robin Dadswell --- .../DownloadClientFixtureBase.cs | 1 - .../Checks/MonoNotNetCoreCheckFixture.cs | 42 +++++++++++++++++++ .../Instrumentation/DatabaseTargetFixture.cs | 1 - .../DiskScanServiceTests/ScanFixture.cs | 1 - .../RootFolderServiceFixture.cs | 4 -- .../Blacklisting/BlacklistRepository.cs | 4 +- .../History/HistoryRepository.cs | 1 - .../MediaFiles/AudioTagService.cs | 1 - .../Commands/UnknownCommandExecutor.cs | 7 +--- .../MetadataSource/ISearchForNewEntity.cs | 3 +- .../FileSystem/FileSystemModule.cs | 1 - src/Readarr.Api.V1/Queue/QueueActionModule.cs | 1 - .../Pipelines/CacheHeaderPipeline.cs | 1 - .../Pipelines/IfModifiedPipeline.cs | 1 - .../Pipelines/ReadarrVersionPipeline.cs | 1 - .../Extensions/Pipelines/UrlBasePipeline.cs | 1 - 16 files changed, 45 insertions(+), 26 deletions(-) create mode 100644 src/NzbDrone.Core.Test/HealthCheck/Checks/MonoNotNetCoreCheckFixture.cs diff --git a/src/NzbDrone.Core.Test/Download/DownloadClientTests/DownloadClientFixtureBase.cs b/src/NzbDrone.Core.Test/Download/DownloadClientTests/DownloadClientFixtureBase.cs index 38534971f..ce8488287 100644 --- a/src/NzbDrone.Core.Test/Download/DownloadClientTests/DownloadClientFixtureBase.cs +++ b/src/NzbDrone.Core.Test/Download/DownloadClientTests/DownloadClientFixtureBase.cs @@ -8,7 +8,6 @@ using NzbDrone.Common.Http; using NzbDrone.Core.Books; using NzbDrone.Core.Configuration; using NzbDrone.Core.Download; -using NzbDrone.Core.IndexerSearch.Definitions; using NzbDrone.Core.Parser; using NzbDrone.Core.Parser.Model; using NzbDrone.Core.RemotePathMappings; diff --git a/src/NzbDrone.Core.Test/HealthCheck/Checks/MonoNotNetCoreCheckFixture.cs b/src/NzbDrone.Core.Test/HealthCheck/Checks/MonoNotNetCoreCheckFixture.cs new file mode 100644 index 000000000..991040b35 --- /dev/null +++ b/src/NzbDrone.Core.Test/HealthCheck/Checks/MonoNotNetCoreCheckFixture.cs @@ -0,0 +1,42 @@ +using System.Collections.Generic; +using NUnit.Framework; +using NzbDrone.Common.Processes; +using NzbDrone.Core.HealthCheck.Checks; +using NzbDrone.Core.Test.Framework; + +namespace NzbDrone.Core.Test.HealthCheck.Checks +{ + [TestFixture] + public class MonoNotNetCoreCheckFixture : CoreTest + { + [Test] + [Platform(Exclude = "Mono")] + public void should_return_ok_if_net_core() + { + Subject.Check().ShouldBeOk(); + } + + [Test] + [Platform("Mono")] + public void should_log_warning_if_mono() + { + Subject.Check().ShouldBeWarning(); + } + + [Test] + [Platform("Mono")] + public void should_return_ok_if_bsd() + { + Mocker.GetMock() + .Setup(x => x.StartAndCapture("uname", null, null)) + .Returns(new ProcessOutput + { + Lines = new List + { + new ProcessOutputLine(ProcessOutputLevel.Standard, "FreeBSD") + } + }); + Subject.Check().ShouldBeOk(); + } + } +} diff --git a/src/NzbDrone.Core.Test/Instrumentation/DatabaseTargetFixture.cs b/src/NzbDrone.Core.Test/Instrumentation/DatabaseTargetFixture.cs index 2f19d1dd8..69f4d25d6 100644 --- a/src/NzbDrone.Core.Test/Instrumentation/DatabaseTargetFixture.cs +++ b/src/NzbDrone.Core.Test/Instrumentation/DatabaseTargetFixture.cs @@ -9,7 +9,6 @@ using NzbDrone.Core.Instrumentation; using NzbDrone.Core.MediaFiles; using NzbDrone.Core.Test.Framework; using NzbDrone.Test.Common; -using NzbDrone.Test.Common.Categories; namespace NzbDrone.Core.Test.Instrumentation { diff --git a/src/NzbDrone.Core.Test/MediaFiles/DiskScanServiceTests/ScanFixture.cs b/src/NzbDrone.Core.Test/MediaFiles/DiskScanServiceTests/ScanFixture.cs index 1c9d10f8a..f7b173b30 100644 --- a/src/NzbDrone.Core.Test/MediaFiles/DiskScanServiceTests/ScanFixture.cs +++ b/src/NzbDrone.Core.Test/MediaFiles/DiskScanServiceTests/ScanFixture.cs @@ -9,7 +9,6 @@ using FluentAssertions; using Moq; using NUnit.Framework; using NzbDrone.Common.Disk; -using NzbDrone.Core.Books; using NzbDrone.Core.DecisionEngine; using NzbDrone.Core.MediaFiles; using NzbDrone.Core.MediaFiles.BookImport; diff --git a/src/NzbDrone.Core.Test/RootFolderTests/RootFolderServiceFixture.cs b/src/NzbDrone.Core.Test/RootFolderTests/RootFolderServiceFixture.cs index 5d6b71d74..c56f6ff0b 100644 --- a/src/NzbDrone.Core.Test/RootFolderTests/RootFolderServiceFixture.cs +++ b/src/NzbDrone.Core.Test/RootFolderTests/RootFolderServiceFixture.cs @@ -1,13 +1,9 @@ using System; using System.Collections.Generic; using System.IO; -using System.Linq; -using FizzWare.NBuilder; -using FluentAssertions; using Moq; using NUnit.Framework; using NzbDrone.Common.Disk; -using NzbDrone.Core.Books; using NzbDrone.Core.RootFolders; using NzbDrone.Core.Test.Framework; using NzbDrone.Test.Common; diff --git a/src/NzbDrone.Core/Blacklisting/BlacklistRepository.cs b/src/NzbDrone.Core/Blacklisting/BlacklistRepository.cs index d82686169..4384ccf00 100644 --- a/src/NzbDrone.Core/Blacklisting/BlacklistRepository.cs +++ b/src/NzbDrone.Core/Blacklisting/BlacklistRepository.cs @@ -1,6 +1,4 @@ -using System.Collections.Generic; -using Dapper; -using NzbDrone.Core.Books; +using System.Collections.Generic; using NzbDrone.Core.Datastore; using NzbDrone.Core.Messaging.Events; diff --git a/src/NzbDrone.Core/History/HistoryRepository.cs b/src/NzbDrone.Core/History/HistoryRepository.cs index 61cddb484..0c7ae7be7 100644 --- a/src/NzbDrone.Core/History/HistoryRepository.cs +++ b/src/NzbDrone.Core/History/HistoryRepository.cs @@ -1,7 +1,6 @@ using System; using System.Collections.Generic; using System.Linq; -using NzbDrone.Core.Books; using NzbDrone.Core.Datastore; using NzbDrone.Core.Messaging.Events; using NzbDrone.Core.Qualities; diff --git a/src/NzbDrone.Core/MediaFiles/AudioTagService.cs b/src/NzbDrone.Core/MediaFiles/AudioTagService.cs index 614a866f1..43ed0ca87 100644 --- a/src/NzbDrone.Core/MediaFiles/AudioTagService.cs +++ b/src/NzbDrone.Core/MediaFiles/AudioTagService.cs @@ -4,7 +4,6 @@ using System.Linq; using NLog; using NLog.Fluent; using NzbDrone.Common.Disk; -using NzbDrone.Common.Extensions; using NzbDrone.Common.Instrumentation.Extensions; using NzbDrone.Core.Books; using NzbDrone.Core.Configuration; diff --git a/src/NzbDrone.Core/Messaging/Commands/UnknownCommandExecutor.cs b/src/NzbDrone.Core/Messaging/Commands/UnknownCommandExecutor.cs index 08fb2725d..94ffa98e0 100644 --- a/src/NzbDrone.Core/Messaging/Commands/UnknownCommandExecutor.cs +++ b/src/NzbDrone.Core/Messaging/Commands/UnknownCommandExecutor.cs @@ -1,9 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using NLog; +using NLog; namespace NzbDrone.Core.Messaging.Commands { diff --git a/src/NzbDrone.Core/MetadataSource/ISearchForNewEntity.cs b/src/NzbDrone.Core/MetadataSource/ISearchForNewEntity.cs index b11be909d..7767ae714 100644 --- a/src/NzbDrone.Core/MetadataSource/ISearchForNewEntity.cs +++ b/src/NzbDrone.Core/MetadataSource/ISearchForNewEntity.cs @@ -1,5 +1,4 @@ -using System; -using System.Collections.Generic; +using System.Collections.Generic; namespace NzbDrone.Core.MetadataSource { diff --git a/src/Readarr.Api.V1/FileSystem/FileSystemModule.cs b/src/Readarr.Api.V1/FileSystem/FileSystemModule.cs index e98dc5f79..13b6fcf25 100644 --- a/src/Readarr.Api.V1/FileSystem/FileSystemModule.cs +++ b/src/Readarr.Api.V1/FileSystem/FileSystemModule.cs @@ -1,7 +1,6 @@ using System.Linq; using Nancy; using NzbDrone.Common.Disk; -using NzbDrone.Common.Extensions; using NzbDrone.Core.MediaFiles; using Readarr.Http.Extensions; diff --git a/src/Readarr.Api.V1/Queue/QueueActionModule.cs b/src/Readarr.Api.V1/Queue/QueueActionModule.cs index 767324229..eacf3a963 100644 --- a/src/Readarr.Api.V1/Queue/QueueActionModule.cs +++ b/src/Readarr.Api.V1/Queue/QueueActionModule.cs @@ -1,5 +1,4 @@ using System.Collections.Generic; -using System.Linq; using Nancy; using NzbDrone.Core.Download; using NzbDrone.Core.Download.Pending; diff --git a/src/Readarr.Http/Extensions/Pipelines/CacheHeaderPipeline.cs b/src/Readarr.Http/Extensions/Pipelines/CacheHeaderPipeline.cs index 6403f7fdd..030d877fd 100644 --- a/src/Readarr.Http/Extensions/Pipelines/CacheHeaderPipeline.cs +++ b/src/Readarr.Http/Extensions/Pipelines/CacheHeaderPipeline.cs @@ -1,4 +1,3 @@ -using System; using Nancy; using Nancy.Bootstrapper; using Readarr.Http.Frontend; diff --git a/src/Readarr.Http/Extensions/Pipelines/IfModifiedPipeline.cs b/src/Readarr.Http/Extensions/Pipelines/IfModifiedPipeline.cs index a49ea53c9..df8fd39ac 100644 --- a/src/Readarr.Http/Extensions/Pipelines/IfModifiedPipeline.cs +++ b/src/Readarr.Http/Extensions/Pipelines/IfModifiedPipeline.cs @@ -1,4 +1,3 @@ -using System; using Nancy; using Nancy.Bootstrapper; using Readarr.Http.Frontend; diff --git a/src/Readarr.Http/Extensions/Pipelines/ReadarrVersionPipeline.cs b/src/Readarr.Http/Extensions/Pipelines/ReadarrVersionPipeline.cs index fec3a2a8e..5267cd276 100644 --- a/src/Readarr.Http/Extensions/Pipelines/ReadarrVersionPipeline.cs +++ b/src/Readarr.Http/Extensions/Pipelines/ReadarrVersionPipeline.cs @@ -1,4 +1,3 @@ -using System; using Nancy; using Nancy.Bootstrapper; using NzbDrone.Common.EnvironmentInfo; diff --git a/src/Readarr.Http/Extensions/Pipelines/UrlBasePipeline.cs b/src/Readarr.Http/Extensions/Pipelines/UrlBasePipeline.cs index 29689c329..b91d497f0 100644 --- a/src/Readarr.Http/Extensions/Pipelines/UrlBasePipeline.cs +++ b/src/Readarr.Http/Extensions/Pipelines/UrlBasePipeline.cs @@ -1,4 +1,3 @@ -using System; using Nancy; using Nancy.Bootstrapper; using Nancy.Responses;