test: add IMDb list error message verification tests

This commit is contained in:
admin 2025-12-19 10:15:33 -06:00
parent 7b4f77604f
commit 1fe49f6bf2

View file

@ -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>();
}
}
}