New: Readarr 0.1

This commit is contained in:
ta264
2020-05-06 21:14:11 +01:00
parent 476f2d6047
commit 08496c82af
911 changed files with 14837 additions and 24442 deletions
@@ -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();