mirror of
https://github.com/Radarr/Radarr
synced 2026-01-25 17:01:42 +01:00
test: add IMDb list error message verification tests
This commit is contained in:
parent
7b4f77604f
commit
1fe49f6bf2
1 changed files with 40 additions and 0 deletions
|
|
@ -0,0 +1,40 @@
|
|||
using System;
|
||||
using FluentAssertions;
|
||||
using NLog;
|
||||
using NUnit.Framework;
|
||||
using NzbDrone.Core.ImportLists.RadarrList2.IMDbList;
|
||||
using NzbDrone.Core.Test.Framework;
|
||||
|
||||
namespace NzbDrone.Core.Test.ImportListTests
|
||||
{
|
||||
[TestFixture]
|
||||
public class IMDbListRequestGeneratorFixture : CoreTest<IMDbListRequestGenerator>
|
||||
{
|
||||
[SetUp]
|
||||
public void Setup()
|
||||
{
|
||||
Subject.Logger = LogManager.GetCurrentClassLogger();
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void should_throw_not_supported_exception_for_ls_format_list()
|
||||
{
|
||||
Subject.Settings = new IMDbListSettings { ListId = "ls123456789" };
|
||||
|
||||
Action act = () => Subject.GetMovies();
|
||||
|
||||
act.Should().Throw<NotSupportedException>()
|
||||
.WithMessage("*ls12345678*no longer supported*");
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void should_throw_not_supported_exception_case_insensitive()
|
||||
{
|
||||
Subject.Settings = new IMDbListSettings { ListId = "LS999999999" };
|
||||
|
||||
Action act = () => Subject.GetMovies();
|
||||
|
||||
act.Should().Throw<NotSupportedException>();
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Reference in a new issue