mirror of
https://github.com/Readarr/Readarr.git
synced 2026-04-21 22:04:31 -04:00
Moved source code under src folder - massive change
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
using FizzWare.NBuilder;
|
||||
using FluentAssertions;
|
||||
using NUnit.Framework;
|
||||
using NzbDrone.Core.MediaFiles;
|
||||
using NzbDrone.Core.Qualities;
|
||||
using NzbDrone.Core.Test.Framework;
|
||||
using NzbDrone.Core.Tv;
|
||||
|
||||
namespace NzbDrone.Core.Test.MediaFiles
|
||||
{
|
||||
[TestFixture]
|
||||
public class MediaFileRepositoryFixture : DbTest<MediaFileRepository, EpisodeFile>
|
||||
{
|
||||
[Test]
|
||||
public void get_files_by_series()
|
||||
{
|
||||
var files = Builder<EpisodeFile>.CreateListOfSize(10)
|
||||
.All()
|
||||
.With(c => c.Id = 0)
|
||||
.With(c => c.Quality =new QualityModel(Quality.Bluray720p))
|
||||
.Random(4)
|
||||
.With(s => s.SeriesId = 12)
|
||||
.BuildListOfNew();
|
||||
|
||||
|
||||
Db.InsertMany(files);
|
||||
|
||||
var seriesFiles = Subject.GetFilesBySeries(12);
|
||||
|
||||
seriesFiles.Should().HaveCount(4);
|
||||
seriesFiles.Should().OnlyContain(c => c.SeriesId == 12);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user