mirror of
https://github.com/jellyfin/jellyfin-plugin-opensubtitles.git
synced 2024-12-04 20:37:12 +00:00
16 lines
441 B
C#
16 lines
441 B
C#
using System.IO;
|
|
using Xunit;
|
|
|
|
namespace Jellyfin.Plugin.OpenSubtitles.OpenSubtitlesHandler.Tests;
|
|
|
|
public class OpenSubtitlesRequestHelperTests
|
|
{
|
|
[Theory]
|
|
[InlineData("breakdance.avi", "8e245d9679d31e12")]
|
|
public void ComputeHash_Success(string filename, string hash)
|
|
{
|
|
using var str = File.OpenRead(Path.Join("Test Data", filename));
|
|
Assert.Equal(hash, OpenSubtitlesRequestHelper.ComputeHash(str));
|
|
}
|
|
}
|