@@ -182,10 +182,15 @@ public void WhenGivenDesiredPrecisionThenShouldReturnAllResultsGreaterOrEqual(
182
182
[ TestCase ( "sql manag" , MicrosoftSqlServerManagementStudio , StringMatcher . SearchPrecisionScore . Regular , true ) ]
183
183
[ TestCase ( "sql" , MicrosoftSqlServerManagementStudio , StringMatcher . SearchPrecisionScore . Regular , true ) ]
184
184
[ TestCase ( "sql serv" , MicrosoftSqlServerManagementStudio , StringMatcher . SearchPrecisionScore . Regular , true ) ]
185
+ [ TestCase ( "sqlserv" , MicrosoftSqlServerManagementStudio , StringMatcher . SearchPrecisionScore . Regular , false ) ]
186
+ [ TestCase ( "sql servman" , MicrosoftSqlServerManagementStudio , StringMatcher . SearchPrecisionScore . Regular , false ) ]
187
+ [ TestCase ( "sql serv man" , MicrosoftSqlServerManagementStudio , StringMatcher . SearchPrecisionScore . Regular , true ) ]
185
188
[ TestCase ( "sql studio" , MicrosoftSqlServerManagementStudio , StringMatcher . SearchPrecisionScore . Regular , true ) ]
186
189
[ TestCase ( "mic" , MicrosoftSqlServerManagementStudio , StringMatcher . SearchPrecisionScore . Regular , true ) ]
187
190
[ TestCase ( "chr" , "Shutdown" , StringMatcher . SearchPrecisionScore . Regular , false ) ]
191
+ [ TestCase ( "mssms" , MicrosoftSqlServerManagementStudio , StringMatcher . SearchPrecisionScore . Regular , false ) ]
188
192
[ TestCase ( "chr" , "Change settings for text-to-speech and for speech recognition (if installed)." , StringMatcher . SearchPrecisionScore . Regular , false ) ]
193
+ [ TestCase ( "ch r" , "Change settings for text-to-speech and for speech recognition (if installed)." , StringMatcher . SearchPrecisionScore . Regular , true ) ]
189
194
[ TestCase ( "a test" , "This is a test" , StringMatcher . SearchPrecisionScore . Regular , true ) ]
190
195
[ TestCase ( "test" , "This is a test" , StringMatcher . SearchPrecisionScore . Regular , true ) ]
191
196
public void WhenGivenQueryShouldReturnResultsContainingAllQuerySubstrings (
@@ -214,21 +219,5 @@ public void WhenGivenQueryShouldReturnResultsContainingAllQuerySubstrings(
214
219
$ "Raw Score: { matchResult . RawScore } { Environment . NewLine } " +
215
220
$ "Precision Score: { ( int ) expectedPrecisionScore } ") ;
216
221
}
217
-
218
- [ TestCase ( "sql servman" , MicrosoftSqlServerManagementStudio , false ) ]
219
- [ TestCase ( "sql serv man" , MicrosoftSqlServerManagementStudio , true ) ]
220
- [ TestCase ( "sql" , MicrosoftSqlServerManagementStudio , true ) ]
221
- [ TestCase ( "sqlserv" , MicrosoftSqlServerManagementStudio , false ) ]
222
- [ TestCase ( "mssms" , MicrosoftSqlServerManagementStudio , false ) ]
223
- [ TestCase ( "chr" , "Change settings for text-to-speech and for speech recognition (if installed)." , false ) ]
224
- [ TestCase ( "ch r" , "Change settings for text-to-speech and for speech recognition (if installed)." , true ) ]
225
- public void WhenGivenQueryShouldEvaluateTrueFalseIfCompareStringContainsAllSubstrings ( string queryString , string compareString , bool expectedResult )
226
- {
227
- // When, Given
228
- var matchResult = StringMatcher . FuzzySearch ( queryString , compareString ) . AllSubstringsContainedInCompareString ;
229
-
230
- // Should
231
- Assert . AreEqual ( matchResult , expectedResult ) ;
232
- }
233
222
}
234
223
}
0 commit comments