using JSMR.Domain.Enums;
using JSMR.Infrastructure.Common.Languages;
using Shouldly;

namespace JSMR.Tests.Unit;

public class LanguageIdentifierTests
{
    private readonly LanguageIdentifier _languageIdentifier = new();

    [Theory]
    [InlineData("これは日本語のサンプル文章です。今日はいい天気ですね。", Language.Japanese)]
    [InlineData("This is an English sample sentence used for language detection.", Language.English)]
    [InlineData("這是一段中文（繁體）的範例文字，用於語言辨識。", Language.ChineseTraditional)]
    [InlineData("이것은 한국어 예문으로, 언어 식별을 위한 문장입니다。", Language.Korean)]
    [InlineData("", Language.Unknown)]
    public void Identify_Languages(string text, Language expectedLanguage)
    {
        _languageIdentifier.GetLanguage(text).ShouldBe(expectedLanguage);
    }
}