diff --git a/tests/Jellyfin.Common.Tests/Json/JsonNullableGuidConverterTests.cs b/tests/Jellyfin.Common.Tests/Json/JsonNullableGuidConverterTests.cs index efc0c4af9..22bc7afb9 100644 --- a/tests/Jellyfin.Common.Tests/Json/JsonNullableGuidConverterTests.cs +++ b/tests/Jellyfin.Common.Tests/Json/JsonNullableGuidConverterTests.cs @@ -39,17 +39,29 @@ namespace Jellyfin.Common.Tests.Json } [Fact] - public void Deserialize_Null_EmptyGuid() + public void Deserialize_Null_Null() { Assert.Null(JsonSerializer.Deserialize("null", _options)); } [Fact] - public void Serialize_EmptyGuid_EmptyGuid() + public void Deserialize_EmptyGuid_EmptyGuid() + { + Assert.Equal(Guid.Empty, JsonSerializer.Deserialize(@"""00000000-0000-0000-0000-000000000000""", _options)); + } + + [Fact] + public void Serialize_EmptyGuid_Null() { Assert.Equal("null", JsonSerializer.Serialize((Guid?)Guid.Empty, _options)); } + [Fact] + public void Serialize_Null_Null() + { + Assert.Equal("null", JsonSerializer.Serialize((Guid?)null, _options)); + } + [Fact] public void Serialize_Valid_NoDash_Success() {