Skip to content

Commit 56973ed

Browse files
committed
fix: update tests
1 parent 99e7810 commit 56973ed

1 file changed

Lines changed: 8 additions & 8 deletions

File tree

Flow.Launcher.Test/FuzzyMatcherTest.cs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ public void WhenGivenQueryString_ThenShouldReturn_TheDesiredScoring(
150150
string queryString, string compareString, int expectedScore)
151151
{
152152
// When, Given
153-
var matcher = new StringMatcher(alphabet) {UserSettingSearchPrecision = SearchPrecisionScore.Regular};
153+
var matcher = new StringMatcher(alphabet) { UserSettingSearchPrecision = SearchPrecisionScore.Regular };
154154
var rawScore = matcher.FuzzyMatch(queryString, compareString).RawScore;
155155

156156
// Should
@@ -184,7 +184,7 @@ public void WhenGivenDesiredPrecision_ThenShouldReturn_AllResultsGreaterOrEqual(
184184
bool expectedPrecisionResult)
185185
{
186186
// When
187-
var matcher = new StringMatcher(alphabet) {UserSettingSearchPrecision = expectedPrecisionScore};
187+
var matcher = new StringMatcher(alphabet) { UserSettingSearchPrecision = expectedPrecisionScore };
188188

189189
// Given
190190
var matchResult = matcher.FuzzyMatch(queryString, compareString);
@@ -193,7 +193,7 @@ public void WhenGivenDesiredPrecision_ThenShouldReturn_AllResultsGreaterOrEqual(
193193
Debug.WriteLine("###############################################");
194194
Debug.WriteLine($"QueryString: {queryString} CompareString: {compareString}");
195195
Debug.WriteLine(
196-
$"RAW SCORE: {matchResult.RawScore}, PrecisionLevelSetAt: {expectedPrecisionScore} ({(int) expectedPrecisionScore})");
196+
$"RAW SCORE: {matchResult.RawScore}, PrecisionLevelSetAt: {expectedPrecisionScore} ({(int)expectedPrecisionScore})");
197197
Debug.WriteLine("###############################################");
198198
Debug.WriteLine("");
199199

@@ -235,7 +235,7 @@ public void WhenGivenQuery_ShouldReturnResults_ContainingAllQuerySubstrings(
235235
bool expectedPrecisionResult)
236236
{
237237
// When
238-
var matcher = new StringMatcher(alphabet) {UserSettingSearchPrecision = expectedPrecisionScore};
238+
var matcher = new StringMatcher(alphabet) { UserSettingSearchPrecision = expectedPrecisionScore };
239239

240240
// Given
241241
var matchResult = matcher.FuzzyMatch(queryString, compareString);
@@ -244,7 +244,7 @@ public void WhenGivenQuery_ShouldReturnResults_ContainingAllQuerySubstrings(
244244
Debug.WriteLine("###############################################");
245245
Debug.WriteLine($"QueryString: {queryString} CompareString: {compareString}");
246246
Debug.WriteLine(
247-
$"RAW SCORE: {matchResult.RawScore}, PrecisionLevelSetAt: {expectedPrecisionScore} ({(int) expectedPrecisionScore})");
247+
$"RAW SCORE: {matchResult.RawScore}, PrecisionLevelSetAt: {expectedPrecisionScore} ({(int)expectedPrecisionScore})");
248248
Debug.WriteLine("###############################################");
249249
Debug.WriteLine("");
250250

@@ -263,7 +263,7 @@ public void WhenGivenAQuery_Scoring_ShouldGiveMoreWeightToStartOfNewWord(
263263
string queryString, string compareString1, string compareString2)
264264
{
265265
// When
266-
var matcher = new StringMatcher(alphabet) {UserSettingSearchPrecision = SearchPrecisionScore.Regular};
266+
var matcher = new StringMatcher(alphabet) { UserSettingSearchPrecision = SearchPrecisionScore.Regular };
267267

268268
// Given
269269
var compareString1Result = matcher.FuzzyMatch(queryString, compareString1);
@@ -335,8 +335,8 @@ public void WhenMultipleResults_ExactMatchingResult_ShouldHaveGreatestScore(
335335
var secondDescriptionMatch = matcher.FuzzyMatch(queryString, secondDescription).RawScore;
336336
var secondExecutableNameMatch = matcher.FuzzyMatch(queryString, secondExecutableName).RawScore;
337337

338-
var firstScore = new[] {firstNameMatch, firstDescriptionMatch, firstExecutableNameMatch}.Max();
339-
var secondScore = new[] {secondNameMatch, secondDescriptionMatch, secondExecutableNameMatch}.Max();
338+
var firstScore = new[] { firstNameMatch, firstDescriptionMatch, firstExecutableNameMatch }.Max();
339+
var secondScore = new[] { secondNameMatch, secondDescriptionMatch, secondExecutableNameMatch }.Max();
340340

341341
// Assert
342342
ClassicAssert.IsTrue(firstScore > secondScore,

0 commit comments

Comments
 (0)