mirror of
https://github.com/Readarr/Readarr.git
synced 2026-04-18 21:34:28 -04:00
fixed some tests, spelling issues.
This commit is contained in:
@@ -1,14 +1,9 @@
|
||||
|
||||
|
||||
using System.Linq;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using FizzWare.NBuilder;
|
||||
using FluentAssertions;
|
||||
using Moq;
|
||||
using NUnit.Framework;
|
||||
using NzbDrone.Core.Lifecycle;
|
||||
using NzbDrone.Core.Qualities;
|
||||
using NzbDrone.Core.Tv;
|
||||
using NzbDrone.Core.Test.Framework;
|
||||
|
||||
namespace NzbDrone.Core.Test.Qualities
|
||||
@@ -20,7 +15,7 @@ namespace NzbDrone.Core.Test.Qualities
|
||||
[Test]
|
||||
public void Init_should_add_two_profiles()
|
||||
{
|
||||
Subject.Init();
|
||||
Subject.Handle(new ApplicationStartedEvent());
|
||||
|
||||
Mocker.GetMock<IQualityProfileRepository>()
|
||||
.Verify(v => v.Insert(It.IsAny<QualityProfile>()), Times.Exactly(2));
|
||||
@@ -35,7 +30,7 @@ namespace NzbDrone.Core.Test.Qualities
|
||||
.Setup(s => s.All())
|
||||
.Returns(Builder<QualityProfile>.CreateListOfSize(2).Build().ToList());
|
||||
|
||||
Subject.Init();
|
||||
Subject.Handle(new ApplicationStartedEvent());
|
||||
|
||||
Mocker.GetMock<IQualityProfileRepository>()
|
||||
.Verify(v => v.Insert(It.IsAny<QualityProfile>()), Times.Never());
|
||||
|
||||
@@ -1,11 +1,7 @@
|
||||
|
||||
|
||||
using System.Linq;
|
||||
using System.Collections.Generic;
|
||||
using FizzWare.NBuilder;
|
||||
using FluentAssertions;
|
||||
using Moq;
|
||||
using NUnit.Framework;
|
||||
using NzbDrone.Core.Lifecycle;
|
||||
using NzbDrone.Core.Qualities;
|
||||
using NzbDrone.Core.Test.Framework;
|
||||
|
||||
@@ -18,26 +14,10 @@ namespace NzbDrone.Core.Test.Qualities
|
||||
[Test]
|
||||
public void Init_should_add_all_sizes()
|
||||
{
|
||||
Subject.Init();
|
||||
Subject.Handle(new ApplicationStartedEvent());
|
||||
|
||||
Mocker.GetMock<IQualitySizeRepository>()
|
||||
.Verify(v => v.Insert(It.IsAny<QualitySize>()), Times.Exactly(Quality.All().Count - 1));
|
||||
|
||||
//Todo: Should we validate each was inserted exactly as configured?
|
||||
|
||||
//var types = Mocker.Resolve<QualitySizeService>().All();
|
||||
|
||||
//types.Should().HaveCount(10);
|
||||
//types.Should().Contain(e => e.Name == "SDTV" && e.QualityId == 1);
|
||||
//types.Should().Contain(e => e.Name == "DVD" && e.QualityId == 2);
|
||||
//types.Should().Contain(e => e.Name == "WEBDL-480p" && e.QualityId == 8);
|
||||
//types.Should().Contain(e => e.Name == "HDTV-720p" && e.QualityId == 4);
|
||||
//types.Should().Contain(e => e.Name == "HDTV-1080p" && e.QualityId == 9);
|
||||
//types.Should().Contain(e => e.Name == "Raw-HD" && e.QualityId == 10);
|
||||
//types.Should().Contain(e => e.Name == "WEBDL-720p" && e.QualityId == 5);
|
||||
//types.Should().Contain(e => e.Name == "WEBDL-1080p" && e.QualityId == 3);
|
||||
//types.Should().Contain(e => e.Name == "Bluray720p" && e.QualityId == 6);
|
||||
//types.Should().Contain(e => e.Name == "Bluray1080p" && e.QualityId == 7);
|
||||
}
|
||||
|
||||
[Test]
|
||||
@@ -50,7 +30,7 @@ namespace NzbDrone.Core.Test.Qualities
|
||||
new QualitySize { QualityId = 1, Name = "SDTV", MinSize = 0, MaxSize = 100 }
|
||||
});
|
||||
|
||||
Subject.Init();
|
||||
Subject.Handle(new ApplicationStartedEvent());
|
||||
|
||||
Mocker.GetMock<IQualitySizeRepository>()
|
||||
.Verify(v => v.Insert(It.IsAny<QualitySize>()), Times.Exactly(Quality.All().Count - 2));
|
||||
|
||||
Reference in New Issue
Block a user