Fix unit test issue

This commit is contained in:
Jack251970 2025-02-23 21:59:35 +08:00
parent f5f0986036
commit ef68ccb70a

View file

@ -15,13 +15,18 @@ namespace Flow.Launcher.Infrastructure
private readonly IAlphabet _alphabet;
// This is a workaround to allow unit tests to set the instance
public StringMatcher(IAlphabet alphabet, Settings settings)
{
_alphabet = alphabet;
UserSettingSearchPrecision = settings.QuerySearchPrecision;
}
// This is a workaround to allow unit tests to set the instance
public StringMatcher(IAlphabet alphabet)
{
_alphabet = alphabet;
}
public static MatchResult FuzzySearch(string query, string stringToCompare)
{
return Ioc.Default.GetRequiredService<StringMatcher>().FuzzyMatch(query, stringToCompare);