mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-20 13:33:34 -07:00
Adding some structure to NzbDrone.Core.Test
This commit is contained in:
parent
ae1a32b874
commit
e5c4f34e0e
41 changed files with 1673 additions and 1745 deletions
33
NzbDrone.Core.Test/JobTests/SearchJobTest.cs
Normal file
33
NzbDrone.Core.Test/JobTests/SearchJobTest.cs
Normal file
|
@ -0,0 +1,33 @@
|
|||
using System;
|
||||
using AutoMoq;
|
||||
using Moq;
|
||||
using NUnit.Framework;
|
||||
using NzbDrone.Core.Model.Notification;
|
||||
using NzbDrone.Core.Providers.Jobs;
|
||||
|
||||
namespace NzbDrone.Core.Test.JobTests
|
||||
{
|
||||
[TestFixture]
|
||||
public class SearchJobTest
|
||||
{
|
||||
[TestCase(0)]
|
||||
[TestCase(-1)]
|
||||
[TestCase(-100)]
|
||||
[ExpectedException(typeof(ArgumentOutOfRangeException))]
|
||||
public void start_target_id_less_than_0_throws_exception(int target)
|
||||
{
|
||||
var mocker = new AutoMoqer(MockBehavior.Strict);
|
||||
mocker.Resolve<EpisodeSearchJob>().Start(new ProgressNotification("Test"), target, 0);
|
||||
}
|
||||
|
||||
[TestCase(0)]
|
||||
[TestCase(-1)]
|
||||
[TestCase(-100)]
|
||||
[ExpectedException(typeof(ArgumentOutOfRangeException))]
|
||||
public void start_secondary_target_id_less_than_0_throws_exception(int target)
|
||||
{
|
||||
var mocker = new AutoMoqer(MockBehavior.Strict);
|
||||
mocker.Resolve<SeasonSearchJob>().Start(new ProgressNotification("Test"), 0, target);
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue