mirror of
https://github.com/Readarr/Readarr.git
synced 2026-04-21 22:04:31 -04:00
New: Readarr 0.1
This commit is contained in:
+12
-12
@@ -22,8 +22,8 @@ namespace NzbDrone.Core.Test.Download.Pending.PendingReleaseServiceTests
|
||||
public class RemoveRejectedFixture : CoreTest<PendingReleaseService>
|
||||
{
|
||||
private DownloadDecision _temporarilyRejected;
|
||||
private Artist _artist;
|
||||
private Album _album;
|
||||
private Author _artist;
|
||||
private Book _album;
|
||||
private QualityProfile _profile;
|
||||
private ReleaseInfo _release;
|
||||
private ParsedAlbumInfo _parsedAlbumInfo;
|
||||
@@ -32,20 +32,20 @@ namespace NzbDrone.Core.Test.Download.Pending.PendingReleaseServiceTests
|
||||
[SetUp]
|
||||
public void Setup()
|
||||
{
|
||||
_artist = Builder<Artist>.CreateNew()
|
||||
_artist = Builder<Author>.CreateNew()
|
||||
.Build();
|
||||
|
||||
_album = Builder<Album>.CreateNew()
|
||||
_album = Builder<Book>.CreateNew()
|
||||
.Build();
|
||||
|
||||
_profile = new QualityProfile
|
||||
{
|
||||
Name = "Test",
|
||||
Cutoff = Quality.MP3_192.Id,
|
||||
Cutoff = Quality.MP3_320.Id,
|
||||
Items = new List<QualityProfileQualityItem>
|
||||
{
|
||||
new QualityProfileQualityItem { Allowed = true, Quality = Quality.MP3_192 },
|
||||
new QualityProfileQualityItem { Allowed = true, Quality = Quality.MP3_256 },
|
||||
new QualityProfileQualityItem { Allowed = true, Quality = Quality.MP3_320 },
|
||||
new QualityProfileQualityItem { Allowed = true, Quality = Quality.MP3_320 },
|
||||
new QualityProfileQualityItem { Allowed = true, Quality = Quality.MP3_320 }
|
||||
},
|
||||
};
|
||||
@@ -55,10 +55,10 @@ namespace NzbDrone.Core.Test.Download.Pending.PendingReleaseServiceTests
|
||||
_release = Builder<ReleaseInfo>.CreateNew().Build();
|
||||
|
||||
_parsedAlbumInfo = Builder<ParsedAlbumInfo>.CreateNew().Build();
|
||||
_parsedAlbumInfo.Quality = new QualityModel(Quality.MP3_192);
|
||||
_parsedAlbumInfo.Quality = new QualityModel(Quality.MP3_320);
|
||||
|
||||
_remoteAlbum = new RemoteAlbum();
|
||||
_remoteAlbum.Albums = new List<Album> { _album };
|
||||
_remoteAlbum.Albums = new List<Book> { _album };
|
||||
_remoteAlbum.Artist = _artist;
|
||||
_remoteAlbum.ParsedAlbumInfo = _parsedAlbumInfo;
|
||||
_remoteAlbum.Release = _release;
|
||||
@@ -75,11 +75,11 @@ namespace NzbDrone.Core.Test.Download.Pending.PendingReleaseServiceTests
|
||||
|
||||
Mocker.GetMock<IArtistService>()
|
||||
.Setup(s => s.GetArtists(It.IsAny<IEnumerable<int>>()))
|
||||
.Returns(new List<Artist> { _artist });
|
||||
.Returns(new List<Author> { _artist });
|
||||
|
||||
Mocker.GetMock<IParsingService>()
|
||||
.Setup(s => s.GetAlbums(It.IsAny<ParsedAlbumInfo>(), _artist, null))
|
||||
.Returns(new List<Album> { _album });
|
||||
.Returns(new List<Book> { _album });
|
||||
|
||||
Mocker.GetMock<IPrioritizeDownloadDecision>()
|
||||
.Setup(s => s.PrioritizeDecisions(It.IsAny<List<DownloadDecision>>()))
|
||||
@@ -94,7 +94,7 @@ namespace NzbDrone.Core.Test.Download.Pending.PendingReleaseServiceTests
|
||||
|
||||
var heldReleases = Builder<PendingRelease>.CreateListOfSize(1)
|
||||
.All()
|
||||
.With(h => h.ArtistId = _artist.Id)
|
||||
.With(h => h.AuthorId = _artist.Id)
|
||||
.With(h => h.Title = title)
|
||||
.With(h => h.Release = release)
|
||||
.Build();
|
||||
|
||||
Reference in New Issue
Block a user