diff options
| author | Bond_009 <bond.009@outlook.com> | 2021-02-19 17:26:34 +0100 |
|---|---|---|
| committer | Bond_009 <bond.009@outlook.com> | 2021-02-19 17:26:34 +0100 |
| commit | 2b131ddaac922eb7bb9f154afbb3ff2d283cbf0f (patch) | |
| tree | b49bb542f75e47a899c06ec5cdba7a88ea13f6eb | |
| parent | 941d3f621708089f8ca2feb89bb7e8de1bbf7d6d (diff) | |
Cover all branches
| -rw-r--r-- | tests/Jellyfin.Model.Tests/Entities/ProviderIdsExtensionsTests.cs | 12 |
1 files changed, 12 insertions, 0 deletions
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(); |
