Files
pgsql-jellyfin/tests/Jellyfin.MediaEncoding.Keyframes.Tests/FfProbe/FfProbeKeyframeExtractorTests.cs
T
wjones af1152b001 Refactor: standardize namespace and using directive style
Refactored all C# test files to use explicit namespace declarations and moved all using directives inside the namespace block for consistency. Updated assembly info and cache files to reflect the new build. Adjusted MvcTestingAppManifest.json to use fully qualified assembly names. No functional changes; all updates are related to code style, organization, and project metadata.
2026-02-20 16:26:53 -05:00

33 lines
1.3 KiB
C#

// <copyright file="FfProbeKeyframeExtractorTests.cs" company="PlaceholderCompany">
// Copyright (c) PlaceholderCompany. All rights reserved.
// </copyright>
namespace Jellyfin.MediaEncoding.Keyframes.FfProbe
{
using System.IO;
using System.Text.Json;
using Xunit;
public class FfProbeKeyframeExtractorTests
{
[Theory]
[InlineData("keyframes.txt", "keyframes_result.json")]
[InlineData("keyframes_streamduration.txt", "keyframes_streamduration_result.json")]
public void ParseStream_Valid_Success(string testDataFileName, string resultFileName)
{
var testDataPath = Path.Combine("FfProbe/Test Data", testDataFileName);
var resultPath = Path.Combine("FfProbe/Test Data", resultFileName);
using var resultFileStream = File.OpenRead(resultPath);
var expectedResult = JsonSerializer.Deserialize<KeyframeData>(resultFileStream)!;
using var fileStream = File.OpenRead(testDataPath);
using var streamReader = new StreamReader(fileStream);
var result = FfProbeKeyframeExtractor.ParseStream(streamReader);
Assert.Equal(expectedResult.TotalDuration, result.TotalDuration);
Assert.Equal(expectedResult.KeyframeTicks, result.KeyframeTicks);
}
}
}