mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-21 05:53:33 -07:00
Added broken tests
This commit is contained in:
parent
bca2e0c6b1
commit
26c03d7162
8 changed files with 89 additions and 67 deletions
36
NzbDrone.Core.Test/QualityProfileTest.cs
Normal file
36
NzbDrone.Core.Test/QualityProfileTest.cs
Normal file
|
@ -0,0 +1,36 @@
|
|||
using MbUnit.Framework;
|
||||
using NzbDrone.Core.Repository;
|
||||
|
||||
namespace NzbDrone.Core.Test
|
||||
{
|
||||
[TestFixture]
|
||||
public class QualityProfileTest
|
||||
{
|
||||
/// <summary>
|
||||
/// Test_s the storage.
|
||||
/// </summary>
|
||||
///
|
||||
///
|
||||
[Test]
|
||||
public void Test_Storage()
|
||||
{
|
||||
//Arrange
|
||||
var repo = MockLib.MemoryRepository;
|
||||
var testProfile = new QualityProfile
|
||||
{
|
||||
Cutoff = Quality.SDTV,
|
||||
Q = new[] { Quality.HDTV, Quality.DVD }
|
||||
};
|
||||
|
||||
//Act
|
||||
var id = (int)repo.Add(testProfile);
|
||||
var fetch = repo.Single<QualityProfile>(c => c.Id == id);
|
||||
|
||||
//Assert
|
||||
Assert.AreEqual(id, fetch.Id);
|
||||
Assert.AreEqual(testProfile.Cutoff, fetch.Cutoff);
|
||||
Assert.AreEqual(testProfile.Qualitys, fetch.Qualitys);
|
||||
Assert.AreElementsEqual(testProfile.Q, fetch.Q);
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue