1
0
Fork 0
mirror of https://github.com/Sonarr/Sonarr synced 2024-12-28 02:37:40 +00:00
Sonarr/NzbDrone.Core.Test/JobTests/EpisodeSearchJobTest.cs

35 lines
1 KiB
C#
Raw Normal View History

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