1
0
Fork 0
mirror of https://github.com/Sonarr/Sonarr synced 2024-12-29 19:26:06 +00:00
Sonarr/NzbDrone.Core.Test/JobTests/SearchJobTest.cs
2012-09-10 23:35:25 -07:00

34 lines
1 KiB
C#

using System;
using Moq;
using NUnit.Framework;
using NzbDrone.Core.Jobs;
using NzbDrone.Core.Model.Notification;
using NzbDrone.Core.Test.Framework;
using NzbDrone.Test.Common.AutoMoq;
namespace NzbDrone.Core.Test.JobTests
{
[TestFixture]
public class SearchJobTest:CoreTest
{
[TestCase(0)]
[TestCase(-1)]
[TestCase(-100)]
[ExpectedException(typeof(ArgumentException))]
public void start_target_id_less_than_0_throws_exception(int target)
{
WithStrictMocker();
Mocker.Resolve<EpisodeSearchJob>().Start(new ProgressNotification("Test"), new { EpisodeId = target });
}
[TestCase(-1)]
[TestCase(-100)]
[ExpectedException(typeof(ArgumentException))]
public void start_secondary_target_id_less_than_0_throws_exception(int target)
{
WithStrictMocker();
Mocker.Resolve<SeasonSearchJob>().Start(new ProgressNotification("Test"), new { SeriesId = 1, SeasonNumber = target });
}
}
}