2011-10-20 23:42:17 +00:00
|
|
|
using System;
|
2011-11-14 00:22:18 +00:00
|
|
|
|
2011-08-28 05:45:36 +00:00
|
|
|
using Moq;
|
|
|
|
using NUnit.Framework;
|
|
|
|
using NzbDrone.Core.Model.Notification;
|
|
|
|
using NzbDrone.Core.Providers.Jobs;
|
2011-11-14 00:22:18 +00:00
|
|
|
using NzbDrone.Test.Common.AutoMoq;
|
2011-08-28 05:45:36 +00:00
|
|
|
|
2011-10-20 23:42:17 +00:00
|
|
|
namespace NzbDrone.Core.Test.JobTests
|
2011-08-28 05:45:36 +00:00
|
|
|
{
|
|
|
|
[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);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|