1
0
Fork 0
mirror of https://github.com/lidarr/Lidarr synced 2024-12-29 11:05:44 +00:00
Lidarr/NzbDrone.Core.Test/QualityProfileTest.cs
2010-09-29 10:19:18 -07:00

36 lines
No EOL
967 B
C#

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);
}
}
}