mirror of https://github.com/lidarr/Lidarr
Fixed a couple tests, so they shouldn't fail due to other tests impacting them.
This commit is contained in:
parent
714bcee5cb
commit
f78c5f2124
|
@ -19,6 +19,8 @@ namespace NzbDrone.Core.Test
|
||||||
//Reset config file
|
//Reset config file
|
||||||
var mocker = new AutoMoqer();
|
var mocker = new AutoMoqer();
|
||||||
var configFile = mocker.Resolve<ConfigFileProvider>().ConfigFile;
|
var configFile = mocker.Resolve<ConfigFileProvider>().ConfigFile;
|
||||||
|
|
||||||
|
if (File.Exists(configFile))
|
||||||
File.Delete(configFile);
|
File.Delete(configFile);
|
||||||
|
|
||||||
mocker.Resolve<ConfigFileProvider>().CreateDefaultConfigFile();
|
mocker.Resolve<ConfigFileProvider>().CreateDefaultConfigFile();
|
||||||
|
|
|
@ -73,18 +73,22 @@ namespace NzbDrone.Core.Test
|
||||||
var postDownloadStatus = PostDownloadStatusType.Failed;
|
var postDownloadStatus = PostDownloadStatusType.Failed;
|
||||||
|
|
||||||
var postDownloadProvider = new PostDownloadProvider();
|
var postDownloadProvider = new PostDownloadProvider();
|
||||||
postDownloadProvider.Add(new PostDownloadInfoModel
|
|
||||||
|
var model = new PostDownloadInfoModel
|
||||||
{
|
{
|
||||||
Name = path,
|
Name = path,
|
||||||
Status = postDownloadStatus,
|
Status = postDownloadStatus,
|
||||||
Added = DateTime.Now.AddMinutes(-5)
|
Added = DateTime.Now.AddMinutes(-5)
|
||||||
});
|
};
|
||||||
|
|
||||||
|
postDownloadProvider.Add(model);
|
||||||
|
|
||||||
//Act
|
//Act
|
||||||
mocker.Resolve<PostDownloadProvider>().ProcessFailedOrUnpackingDownload(new DirectoryInfo(Path.Combine(Directory.GetCurrentDirectory(), path)), postDownloadStatus);
|
mocker.Resolve<PostDownloadProvider>().ProcessFailedOrUnpackingDownload(new DirectoryInfo(Path.Combine(Directory.GetCurrentDirectory(), path)), postDownloadStatus);
|
||||||
|
|
||||||
//Assert
|
//Assert
|
||||||
mocker.VerifyAllMocks();
|
mocker.VerifyAllMocks();
|
||||||
|
postDownloadProvider.Remove(model);
|
||||||
}
|
}
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
|
|
Loading…
Reference in New Issue