e887356385
Added and enhanced XML documentation comments across the codebase, including detailed summaries and parameter descriptions for methods, classes, and constants. Documented all MatroskaConstants. Improved test readability with comments and explicit variable declarations. Made minor formatting and consistency fixes in test files. No functional changes. Updated project cache and binary files to reflect documentation improvements.
33 lines
1.1 KiB
C#
33 lines
1.1 KiB
C#
// <copyright file="JsonFlagEnumTests.cs" company="PlaceholderCompany">
|
|
// Copyright (c) PlaceholderCompany. All rights reserved.
|
|
// </copyright>
|
|
|
|
namespace Jellyfin.Extensions.Tests.Json.Converters;
|
|
|
|
using System.Text.Json;
|
|
using Jellyfin.Extensions.Json.Converters;
|
|
using MediaBrowser.Model.Session;
|
|
using Xunit;
|
|
|
|
public class JsonFlagEnumTests
|
|
{
|
|
private readonly JsonSerializerOptions _jsonOptions = new()
|
|
{
|
|
Converters =
|
|
{
|
|
new JsonFlagEnumConverter<TranscodeReason>(),
|
|
},
|
|
};
|
|
|
|
[Theory]
|
|
[InlineData(TranscodeReason.AudioIsExternal | TranscodeReason.ContainerNotSupported, "[\"ContainerNotSupported\",\"AudioIsExternal\"]")]
|
|
[InlineData(TranscodeReason.AudioIsExternal | TranscodeReason.ContainerNotSupported | TranscodeReason.VideoBitDepthNotSupported, "[\"ContainerNotSupported\",\"AudioIsExternal\",\"VideoBitDepthNotSupported\"]")]
|
|
[InlineData((TranscodeReason)0, "[]")]
|
|
public void Serialize_Transcode_Reason(TranscodeReason transcodeReason, string output)
|
|
{
|
|
var result = JsonSerializer.Serialize(transcodeReason, _jsonOptions);
|
|
|
|
Assert.Equal(output, result);
|
|
}
|
|
}
|