Cover all branches

This commit is contained in:
Bond_009 2021-02-19 17:26:34 +01:00
parent 941d3f6217
commit 2b131ddaac
1 changed files with 12 additions and 0 deletions

View File

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