Fixed broken tests
This commit is contained in:
parent
0a2b109a3f
commit
16156192c5
|
@ -36,7 +36,9 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests.Blackhole
|
||||||
_filePath = (@"c:\blackhole\torrent\" + _title + ".torrent").AsOsAgnostic();
|
_filePath = (@"c:\blackhole\torrent\" + _title + ".torrent").AsOsAgnostic();
|
||||||
|
|
||||||
_downloadClientItem = Builder<DownloadClientItem>
|
_downloadClientItem = Builder<DownloadClientItem>
|
||||||
.CreateNew().With(d => d.DownloadId = "_Droned.S01E01.Pilot.1080p.WEB-DL-DRONE_0")
|
.CreateNew()
|
||||||
|
.With(d => d.DownloadId = "_Droned.S01E01.Pilot.1080p.WEB-DL-DRONE_0")
|
||||||
|
.With(d => d.OutputPath = new OsPath(Path.Combine(_completedDownloadFolder, _title)))
|
||||||
.Build();
|
.Build();
|
||||||
|
|
||||||
Mocker.SetConstant<IScanWatchFolder>(Mocker.Resolve<ScanWatchFolder>());
|
Mocker.SetConstant<IScanWatchFolder>(Mocker.Resolve<ScanWatchFolder>());
|
||||||
|
|
|
@ -34,7 +34,9 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests.Blackhole
|
||||||
_filePath = (@"c:\blackhole\nzb\" + _title + ".nzb").AsOsAgnostic();
|
_filePath = (@"c:\blackhole\nzb\" + _title + ".nzb").AsOsAgnostic();
|
||||||
|
|
||||||
_downloadClientItem = Builder<DownloadClientItem>
|
_downloadClientItem = Builder<DownloadClientItem>
|
||||||
.CreateNew().With(d => d.DownloadId = "_Droned.S01E01.Pilot.1080p.WEB-DL-DRONE_0")
|
.CreateNew()
|
||||||
|
.With(d => d.DownloadId = "_Droned.S01E01.Pilot.1080p.WEB-DL-DRONE_0")
|
||||||
|
.With(d => d.OutputPath = new OsPath(Path.Combine(_completedDownloadFolder, _title)))
|
||||||
.Build();
|
.Build();
|
||||||
|
|
||||||
Mocker.SetConstant<IScanWatchFolder>(Mocker.Resolve<ScanWatchFolder>());
|
Mocker.SetConstant<IScanWatchFolder>(Mocker.Resolve<ScanWatchFolder>());
|
||||||
|
|
|
@ -77,7 +77,9 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests.NzbgetTests
|
||||||
};
|
};
|
||||||
|
|
||||||
_downloadClientItem = Builder<DownloadClientItem>
|
_downloadClientItem = Builder<DownloadClientItem>
|
||||||
.CreateNew().With(d => d.DownloadId = "_Droned.S01E01.Pilot.1080p.WEB-DL-DRONE_0")
|
.CreateNew()
|
||||||
|
.With(d => d.DownloadId = "_Droned.S01E01.Pilot.1080p.WEB-DL-DRONE_0")
|
||||||
|
.With(d => d.OutputPath = new OsPath("/remote/mount/tv/Droned.S01E01.Pilot.1080p.WEB-DL-DRONE".AsOsAgnostic()))
|
||||||
.Build();
|
.Build();
|
||||||
|
|
||||||
Mocker.GetMock<INzbgetProxy>()
|
Mocker.GetMock<INzbgetProxy>()
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.IO;
|
||||||
using FizzWare.NBuilder;
|
using FizzWare.NBuilder;
|
||||||
using FluentAssertions;
|
using FluentAssertions;
|
||||||
using Moq;
|
using Moq;
|
||||||
|
@ -103,7 +104,9 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests.SabnzbdTests
|
||||||
};
|
};
|
||||||
|
|
||||||
_downloadClientItem = Builder<DownloadClientItem>
|
_downloadClientItem = Builder<DownloadClientItem>
|
||||||
.CreateNew().With(d => d.DownloadId = _completed.Items.First().Id)
|
.CreateNew()
|
||||||
|
.With(d => d.Status = DownloadItemStatus.Completed)
|
||||||
|
.With(d => d.DownloadId = _completed.Items.First().Id)
|
||||||
.Build();
|
.Build();
|
||||||
|
|
||||||
Mocker.GetMock<ISabnzbdProxy>()
|
Mocker.GetMock<ISabnzbdProxy>()
|
||||||
|
@ -586,6 +589,7 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests.SabnzbdTests
|
||||||
public void should_remove_output_path_folder_when_deleting_a_completed_item_and_delete_data_is_true()
|
public void should_remove_output_path_folder_when_deleting_a_completed_item_and_delete_data_is_true()
|
||||||
{
|
{
|
||||||
var path = @"C:\Test\Series.Title.S01E01".AsOsAgnostic();
|
var path = @"C:\Test\Series.Title.S01E01".AsOsAgnostic();
|
||||||
|
_downloadClientItem.OutputPath = new OsPath(path);
|
||||||
|
|
||||||
Mocker.GetMock<IDiskProvider>()
|
Mocker.GetMock<IDiskProvider>()
|
||||||
.Setup(s => s.FolderExists(path))
|
.Setup(s => s.FolderExists(path))
|
||||||
|
@ -609,6 +613,7 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests.SabnzbdTests
|
||||||
public void should_remove_output_path_file_when_deleting_a_completed_item_and_delete_data_is_true()
|
public void should_remove_output_path_file_when_deleting_a_completed_item_and_delete_data_is_true()
|
||||||
{
|
{
|
||||||
var path = @"C:\Test\Series.Title.S01E01.mkv".AsOsAgnostic();
|
var path = @"C:\Test\Series.Title.S01E01.mkv".AsOsAgnostic();
|
||||||
|
_downloadClientItem.OutputPath = new OsPath(path);
|
||||||
|
|
||||||
Mocker.GetMock<IDiskProvider>()
|
Mocker.GetMock<IDiskProvider>()
|
||||||
.Setup(s => s.FolderExists(path))
|
.Setup(s => s.FolderExists(path))
|
||||||
|
|
Loading…
Reference in New Issue