2011-10-21 02:42:17 +03:00
|
|
|
using System;
|
2011-11-14 03:22:18 +03:00
|
|
|
|
2011-08-28 08:45:36 +03:00
|
|
|
using Moq;
|
|
|
|
using NUnit.Framework;
|
2011-12-02 04:33:17 +03:00
|
|
|
using NzbDrone.Core.Jobs;
|
2011-08-28 08:45:36 +03:00
|
|
|
using NzbDrone.Core.Model.Notification;
|
2011-12-15 07:15:53 +03:00
|
|
|
using NzbDrone.Core.Test.Framework;
|
2011-11-14 03:22:18 +03:00
|
|
|
using NzbDrone.Test.Common.AutoMoq;
|
2011-08-28 08:45:36 +03:00
|
|
|
|
2011-10-21 02:42:17 +03:00
|
|
|
namespace NzbDrone.Core.Test.JobTests
|
2011-08-28 08:45:36 +03:00
|
|
|
{
|
|
|
|
[TestFixture]
|
2013-02-02 23:54:03 +03:00
|
|
|
public class EpisodeSearchJobTest:SqlCeTest
|
2011-08-28 08:45:36 +03:00
|
|
|
{
|
|
|
|
[TestCase(0)]
|
|
|
|
[TestCase(-1)]
|
|
|
|
[TestCase(-100)]
|
2012-09-11 09:35:25 +03:00
|
|
|
[ExpectedException(typeof(ArgumentException))]
|
2011-08-28 08:45:36 +03:00
|
|
|
public void start_target_id_less_than_0_throws_exception(int target)
|
|
|
|
{
|
2011-12-15 07:15:53 +03:00
|
|
|
WithStrictMocker();
|
2012-09-11 09:35:25 +03:00
|
|
|
Mocker.Resolve<EpisodeSearchJob>().Start(new ProgressNotification("Test"), new { EpisodeId = target });
|
2011-08-28 08:45:36 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
[TestCase(-1)]
|
|
|
|
[TestCase(-100)]
|
2012-09-11 09:35:25 +03:00
|
|
|
[ExpectedException(typeof(ArgumentException))]
|
2011-08-28 08:45:36 +03:00
|
|
|
public void start_secondary_target_id_less_than_0_throws_exception(int target)
|
|
|
|
{
|
2011-12-15 07:15:53 +03:00
|
|
|
WithStrictMocker();
|
2012-09-11 09:35:25 +03:00
|
|
|
Mocker.Resolve<SeasonSearchJob>().Start(new ProgressNotification("Test"), new { SeriesId = 1, SeasonNumber = target });
|
2011-08-28 08:45:36 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|