1
0
mirror of https://github.com/Sonarr/Sonarr.git synced 2024-10-31 07:52:37 +01:00
Sonarr/NzbDrone.Core.Test/JobTests/SearchJobTest.cs

36 lines
1.0 KiB
C#
Raw Normal View History

using System;
using Moq;
using NUnit.Framework;
2011-12-02 02:33:17 +01:00
using NzbDrone.Core.Jobs;
using NzbDrone.Core.Model.Notification;
2011-12-15 05:15:53 +01:00
using NzbDrone.Core.Test.Framework;
using NzbDrone.Test.Common.AutoMoq;
namespace NzbDrone.Core.Test.JobTests
{
[TestFixture]
2011-12-15 05:15:53 +01:00
public class SearchJobTest:CoreTest
{
[TestCase(0)]
[TestCase(-1)]
[TestCase(-100)]
[ExpectedException(typeof(ArgumentOutOfRangeException))]
public void start_target_id_less_than_0_throws_exception(int target)
{
2011-12-15 05:15:53 +01:00
WithStrictMocker();
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)
{
2011-12-15 05:15:53 +01:00
WithStrictMocker();
Mocker.Resolve<SeasonSearchJob>().Start(new ProgressNotification("Test"), 0, target);
}
}
}