mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-09-08 04:18:06 +02:00
25 lines
730 B
C#
25 lines
730 B
C#
using System.IO;
|
|
using System.Text.Json;
|
|
using System.Threading.Tasks;
|
|
using Jellyfin.Extensions.Json;
|
|
using MediaBrowser.MediaEncoding.Probing;
|
|
using MediaBrowser.Model.IO;
|
|
using Xunit;
|
|
|
|
namespace Jellyfin.MediaEncoding.Tests
|
|
{
|
|
public class FFprobeParserTests
|
|
{
|
|
[Theory]
|
|
[InlineData("ffprobe1.json")]
|
|
public async Task Test(string fileName)
|
|
{
|
|
var path = Path.Join("Test Data", fileName);
|
|
await using (var stream = AsyncFile.OpenRead(path))
|
|
{
|
|
var res = await JsonSerializer.DeserializeAsync<InternalMediaInfoResult>(stream, JsonDefaults.Options).ConfigureAwait(false);
|
|
Assert.NotNull(res);
|
|
}
|
|
}
|
|
}
|
|
}
|