From 1fe49f6bf2cd0f1f1ce6e430f40c1de11773a458 Mon Sep 17 00:00:00 2001 From: admin Date: Fri, 19 Dec 2025 10:15:33 -0600 Subject: [PATCH] test: add IMDb list error message verification tests --- .../IMDbListRequestGeneratorFixture.cs | 40 +++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 src/NzbDrone.Core.Test/ImportListTests/IMDbListRequestGeneratorFixture.cs diff --git a/src/NzbDrone.Core.Test/ImportListTests/IMDbListRequestGeneratorFixture.cs b/src/NzbDrone.Core.Test/ImportListTests/IMDbListRequestGeneratorFixture.cs new file mode 100644 index 0000000000..6291b3f425 --- /dev/null +++ b/src/NzbDrone.Core.Test/ImportListTests/IMDbListRequestGeneratorFixture.cs @@ -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 + { + [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() + .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(); + } + } +}