From 2b131ddaac922eb7bb9f154afbb3ff2d283cbf0f Mon Sep 17 00:00:00 2001 From: Bond_009 Date: Fri, 19 Feb 2021 17:26:34 +0100 Subject: [PATCH] Cover all branches --- .../Entities/ProviderIdsExtensionsTests.cs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/tests/Jellyfin.Model.Tests/Entities/ProviderIdsExtensionsTests.cs b/tests/Jellyfin.Model.Tests/Entities/ProviderIdsExtensionsTests.cs index 912fe74ec..c1a1525ba 100644 --- a/tests/Jellyfin.Model.Tests/Entities/ProviderIdsExtensionsTests.cs +++ b/tests/Jellyfin.Model.Tests/Entities/ProviderIdsExtensionsTests.cs @@ -117,6 +117,18 @@ namespace Jellyfin.Model.Tests.Entities Assert.Single(nullProvider.ProviderIds); } + [Fact] + public void SetProviderId_NullProviderAndEmptyName_Success() + { + var nullProvider = new ProviderIdsExtensionsTestsObject() + { + ProviderIds = null! + }; + + nullProvider.SetProviderId(MetadataProvider.Imdb, string.Empty); + Assert.Null(nullProvider.ProviderIds); + } + private class ProviderIdsExtensionsTestsObject : IHasProviderIds { public static readonly ProviderIdsExtensionsTestsObject Empty = new ProviderIdsExtensionsTestsObject();