Improve XML docs and formatting in tests and constants

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.
This commit is contained in:
2026-02-21 15:46:18 -05:00
parent 2dc0129a11
commit e887356385
86 changed files with 385 additions and 255 deletions
@@ -8,19 +8,33 @@ namespace Jellyfin.Extensions.Tests
using System.Collections.Generic;
using Xunit;
/// <summary>
/// Tests for CopyTo extension methods.
/// </summary>
public static class CopyToExtensionsTests
{
/// <summary>
/// Gets test data for valid CopyTo operations.
/// </summary>
/// <returns>The test data.</returns>
public static TheoryData<IReadOnlyList<int>, IList<int>, int, IList<int>> CopyTo_Valid_Correct_TestData()
{
var data = new TheoryData<IReadOnlyList<int>, IList<int>, int, IList<int>>
TheoryData<IReadOnlyList<int>, IList<int>, int, IList<int>> data = new TheoryData<IReadOnlyList<int>, IList<int>, int, IList<int>>
{
{ new[] { 0, 1, 2, 3, 4, 5 }, new[] { 0, 0, 0, 0, 0, 0 }, 0, new[] { 0, 1, 2, 3, 4, 5 } },
{ new[] { 0, 1, 2 }, new[] { 5, 4, 3, 2, 1, 0 }, 2, new[] { 5, 4, 0, 1, 2, 0 } }
{ new[] { 0, 1, 2 }, new[] { 5, 4, 3, 2, 1, 0 }, 2, new[] { 5, 4, 0, 1, 2, 0 } },
};
return data;
}
/// <summary>
/// Tests that CopyTo correctly copies elements.
/// </summary>
/// <param name="source">The source list.</param>
/// <param name="destination">The destination list.</param>
/// <param name="index">The starting index.</param>
/// <param name="expected">The expected result.</param>
[Theory]
[MemberData(nameof(CopyTo_Valid_Correct_TestData))]
public static void CopyTo_Valid_Correct(IReadOnlyList<int> source, IList<int> destination, int index, IList<int> expected)
@@ -29,20 +43,30 @@ namespace Jellyfin.Extensions.Tests
Assert.Equal(expected, destination);
}
/// <summary>
/// Gets test data for invalid CopyTo operations that should throw.
/// </summary>
/// <returns>The test data.</returns>
public static TheoryData<IReadOnlyList<int>, IList<int>, int> CopyTo_Invalid_ThrowsArgumentOutOfRangeException_TestData()
{
var data = new TheoryData<IReadOnlyList<int>, IList<int>, int>
TheoryData<IReadOnlyList<int>, IList<int>, int> data = new TheoryData<IReadOnlyList<int>, IList<int>, int>
{
{ new[] { 0, 1, 2, 3, 4, 5 }, new[] { 0, 0, 0, 0, 0, 0 }, -1 },
{ new[] { 0, 1, 2 }, new[] { 5, 4, 3, 2, 1, 0 }, 6 },
{ new[] { 0, 1, 2 }, Array.Empty<int>(), 0 },
{ new[] { 0, 1, 2, 3, 4, 5 }, new[] { 0 }, 0 },
{ new[] { 0, 1, 2, 3, 4, 5 }, new[] { 0, 0, 0, 0, 0, 0 }, 1 }
{ new[] { 0, 1, 2, 3, 4, 5 }, new[] { 0, 0, 0, 0, 0, 0 }, 1 },
};
return data;
}
/// <summary>
/// Tests that CopyTo throws ArgumentOutOfRangeException for invalid inputs.
/// </summary>
/// <param name="source">The source list.</param>
/// <param name="destination">The destination list.</param>
/// <param name="index">The starting index.</param>
[Theory]
[MemberData(nameof(CopyTo_Invalid_ThrowsArgumentOutOfRangeException_TestData))]
public static void CopyTo_Invalid_ThrowsArgumentOutOfRangeException(IReadOnlyList<int> source, IList<int> destination, int index)