diff options
Diffstat (limited to 'tests/Jellyfin.Providers.Tests/Manager/MetadataServiceTests.cs')
| -rw-r--r-- | tests/Jellyfin.Providers.Tests/Manager/MetadataServiceTests.cs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/Jellyfin.Providers.Tests/Manager/MetadataServiceTests.cs b/tests/Jellyfin.Providers.Tests/Manager/MetadataServiceTests.cs index 28b2e1d8f..e18faa422 100644 --- a/tests/Jellyfin.Providers.Tests/Manager/MetadataServiceTests.cs +++ b/tests/Jellyfin.Providers.Tests/Manager/MetadataServiceTests.cs @@ -91,7 +91,7 @@ namespace Jellyfin.Providers.Tests.Manager // Use type Series to hit DisplayOrder Assert.False(TestMergeBaseItemData<Series, SeriesInfo>(propName, oldValue, newValue, null, false, out _)); - if (lockField != null) + if (lockField is not null) { Assert.False(TestMergeBaseItemData<Series, SeriesInfo>(propName, oldValue, newValue, lockField, true, out _)); Assert.False(TestMergeBaseItemData<Series, SeriesInfo>(propName, null, newValue, lockField, false, out _)); @@ -120,7 +120,7 @@ namespace Jellyfin.Providers.Tests.Manager // Use type Audio to hit AlbumArtists Assert.False(TestMergeBaseItemData<Audio, SongInfo>(propName, oldValue, newValue, null, false, out _)); - if (lockField != null) + if (lockField is not null) { Assert.False(TestMergeBaseItemData<Audio, SongInfo>(propName, oldValue, newValue, lockField, true, out _)); Assert.False(TestMergeBaseItemData<Audio, SongInfo>(propName, Array.Empty<string>(), newValue, lockField, false, out _)); @@ -328,11 +328,11 @@ namespace Jellyfin.Providers.Tests.Manager People = oldValue }; - var lockedFields = lockField == null ? Array.Empty<MetadataField>() : new[] { (MetadataField)lockField }; + var lockedFields = lockField is null ? Array.Empty<MetadataField>() : new[] { (MetadataField)lockField }; MetadataService<Movie, MovieInfo>.MergeBaseItemData(source, target, lockedFields, replaceData, false); actualValue = target.People; - return newValue?.Equals(actualValue) ?? actualValue == null; + return newValue?.Equals(actualValue) ?? actualValue is null; } /// <summary> @@ -367,12 +367,12 @@ namespace Jellyfin.Providers.Tests.Manager }; property.SetValue(target.Item, oldValue); - var lockedFields = lockField == null ? Array.Empty<MetadataField>() : new[] { (MetadataField)lockField }; + var lockedFields = lockField is null ? Array.Empty<MetadataField>() : new[] { (MetadataField)lockField }; // generic type doesn't actually matter to call the static method, just has to be filled in MetadataService<TItemType, TIdType>.MergeBaseItemData(source, target, lockedFields, replaceData, false); actualValue = property.GetValue(target.Item); - return newValue?.Equals(actualValue) ?? actualValue == null; + return newValue?.Equals(actualValue) ?? actualValue is null; } } } |
