mirror of
https://github.com/Radarr/Radarr
synced 2024-12-26 17:59:14 +00:00
8280561e11
New: RSS Sync Interval is now user configurable (Default 25 minutes)
35 lines
No EOL
977 B
C#
35 lines
No EOL
977 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using FluentAssertions;
|
|
using Moq;
|
|
using NUnit.Framework;
|
|
using NzbDrone.Core.Jobs;
|
|
using NzbDrone.Core.Model.Notification;
|
|
using NzbDrone.Core.Providers;
|
|
using NzbDrone.Core.Providers.Core;
|
|
using NzbDrone.Core.Test.Framework;
|
|
using NzbDrone.Test.Common.AutoMoq;
|
|
|
|
namespace NzbDrone.Core.Test.JobTests
|
|
{
|
|
[TestFixture]
|
|
// ReSharper disable InconsistentNaming
|
|
public class RssSyncJobTest : CoreTest
|
|
{
|
|
public void WithMinutes(int minutes)
|
|
{
|
|
Mocker.GetMock<ConfigProvider>().SetupGet(s => s.RssSyncInterval).Returns(minutes);
|
|
}
|
|
|
|
[TestCase(10)]
|
|
[TestCase(15)]
|
|
[TestCase(25)]
|
|
[TestCase(60)]
|
|
[TestCase(120)]
|
|
public void should_use_value_from_config_provider(int minutes)
|
|
{
|
|
WithMinutes(minutes);
|
|
Mocker.Resolve<RssSyncJob>().DefaultInterval.Should().Be(TimeSpan.FromMinutes(minutes));
|
|
}
|
|
}
|
|
} |