|
|
|
@ -47,6 +47,15 @@ namespace Jellyfin.Model.Tests.Entities
|
|
|
|
|
Assert.True(provider.HasProviderId(MetadataProvider.Imdb));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[Fact]
|
|
|
|
|
public void HasProviderId_FoundNameEmptyValue_False()
|
|
|
|
|
{
|
|
|
|
|
var provider = new ProviderIdsExtensionsTestsObject();
|
|
|
|
|
provider.ProviderIds[MetadataProvider.Imdb.ToString()] = string.Empty;
|
|
|
|
|
|
|
|
|
|
Assert.False(provider.HasProviderId(MetadataProvider.Imdb));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[Fact]
|
|
|
|
|
public void GetProviderId_NullInstance_ThrowsArgumentNullException()
|
|
|
|
|
{
|
|
|
|
@ -112,6 +121,16 @@ namespace Jellyfin.Model.Tests.Entities
|
|
|
|
|
Assert.Equal(ExampleImdbId, id);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[Fact]
|
|
|
|
|
public void TryGetProviderId_FoundNameEmptyValue_False()
|
|
|
|
|
{
|
|
|
|
|
var provider = new ProviderIdsExtensionsTestsObject();
|
|
|
|
|
provider.ProviderIds[MetadataProvider.Imdb.ToString()] = string.Empty;
|
|
|
|
|
|
|
|
|
|
Assert.False(provider.TryGetProviderId(MetadataProvider.Imdb, out var id));
|
|
|
|
|
Assert.Null(id);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[Fact]
|
|
|
|
|
public void SetProviderId_NullInstance_ThrowsArgumentNullException()
|
|
|
|
|
{
|
|
|
|
|