* Stylecop Rules and Fixes
This commit is contained in:
Qstick
2020-01-03 07:49:24 -05:00
committed by GitHub
parent 63d669178d
commit f77a2feeef
1307 changed files with 8704 additions and 7404 deletions
@@ -1,5 +1,7 @@
using System.Collections.Generic;
using System.IO;
using System.IO.Abstractions;
using System.IO.Abstractions.TestingHelpers;
using System.Linq;
using FizzWare.NBuilder;
using FluentAssertions;
@@ -10,13 +12,11 @@ using NzbDrone.Core.Download;
using NzbDrone.Core.Download.TrackedDownloads;
using NzbDrone.Core.MediaFiles;
using NzbDrone.Core.MediaFiles.TrackImport;
using NzbDrone.Core.Music;
using NzbDrone.Core.Parser;
using NzbDrone.Core.Parser.Model;
using NzbDrone.Core.Test.Framework;
using NzbDrone.Core.Music;
using NzbDrone.Test.Common;
using System.IO.Abstractions.TestingHelpers;
using System.IO;
namespace NzbDrone.Core.Test.MediaFiles
{
@@ -33,7 +33,7 @@ namespace NzbDrone.Core.Test.MediaFiles
public void Setup()
{
GivenAudioFiles(_audioFiles, 10);
Mocker.GetMock<IDiskScanService>().Setup(c => c.GetAudioFiles(It.IsAny<string>(), It.IsAny<bool>()))
.Returns(_audioFiles.Select(x => DiskProvider.GetFileInfo(x)).ToArray());
@@ -54,12 +54,11 @@ namespace NzbDrone.Core.Test.MediaFiles
.Build();
_trackedDownload = new TrackedDownload
{
DownloadItem = downloadItem,
RemoteAlbum = remoteAlbum,
State = TrackedDownloadStage.Downloading
};
};
}
private void GivenAudioFiles(string[] files, long filesize)
@@ -246,7 +245,7 @@ namespace NzbDrone.Core.Test.MediaFiles
.Setup(s => s.Import(It.IsAny<List<ImportDecision<LocalTrack>>>(), true, null, ImportMode.Auto))
.Returns(imported.Select(i => new ImportResult(i)).ToList());
GivenAudioFiles(new []{ _audioFiles.First().Replace(".ext", ".rar") }, 15.Megabytes());
GivenAudioFiles(new[] { _audioFiles.First().Replace(".ext", ".rar") }, 15.Megabytes());
Subject.ProcessRootFolder(DiskProvider.GetDirectoryInfo(_droneFactory));
@@ -288,7 +287,7 @@ namespace NzbDrone.Core.Test.MediaFiles
Subject.ProcessRootFolder(DiskProvider.GetDirectoryInfo(_droneFactory));
DiskProvider.FolderExists(_subFolders[0]).Should().BeTrue();
DiskProvider.FolderExists(_subFolders[0]).Should().BeTrue();
Mocker.GetMock<IDiskProvider>()
.Verify(v => v.DeleteFolder(It.IsAny<string>(), true), Times.Never());