@@ -182,10 +182,15 @@ public void WhenGivenDesiredPrecisionThenShouldReturnAllResultsGreaterOrEqual(
182182 [ TestCase ( "sql manag" , MicrosoftSqlServerManagementStudio , StringMatcher . SearchPrecisionScore . Regular , true ) ]
183183 [ TestCase ( "sql" , MicrosoftSqlServerManagementStudio , StringMatcher . SearchPrecisionScore . Regular , true ) ]
184184 [ 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 ) ]
185188 [ TestCase ( "sql studio" , MicrosoftSqlServerManagementStudio , StringMatcher . SearchPrecisionScore . Regular , true ) ]
186189 [ TestCase ( "mic" , MicrosoftSqlServerManagementStudio , StringMatcher . SearchPrecisionScore . Regular , true ) ]
187190 [ TestCase ( "chr" , "Shutdown" , StringMatcher . SearchPrecisionScore . Regular , false ) ]
191+ [ TestCase ( "mssms" , MicrosoftSqlServerManagementStudio , StringMatcher . SearchPrecisionScore . Regular , false ) ]
188192 [ 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 ) ]
189194 [ TestCase ( "a test" , "This is a test" , StringMatcher . SearchPrecisionScore . Regular , true ) ]
190195 [ TestCase ( "test" , "This is a test" , StringMatcher . SearchPrecisionScore . Regular , true ) ]
191196 public void WhenGivenQueryShouldReturnResultsContainingAllQuerySubstrings (
@@ -214,21 +219,5 @@ public void WhenGivenQueryShouldReturnResultsContainingAllQuerySubstrings(
214219 $ "Raw Score: { matchResult . RawScore } { Environment . NewLine } " +
215220 $ "Precision Score: { ( int ) expectedPrecisionScore } ") ;
216221 }
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- }
233222 }
234223}
0 commit comments