@@ -245,7 +245,7 @@ public void SetSearch_WithEmptySearchTerm_ReturnsAllItems()
245245 pagedCollection . SetSource ( source ) ;
246246
247247 // Act
248- pagedCollection . SetSearch ( x => x , "" ) ;
248+ pagedCollection . SetSearchAsync ( x => x , "" ) ;
249249
250250 // Assert
251251 Assert . HasCount ( 3 , pagedCollection . CurrentPageItems ) ;
@@ -261,7 +261,7 @@ public void SetSearch_WithNoMatches_ReturnsEmptyCollection()
261261 pagedCollection . SetSource ( source ) ;
262262
263263 // Act
264- pagedCollection . SetSearch ( x => x , "xyz" ) ;
264+ pagedCollection . SetSearchAsync ( x => x , "xyz" ) ;
265265
266266 // Assert
267267 Assert . HasCount ( 0 , pagedCollection . CurrentPageItems ) ;
@@ -276,7 +276,7 @@ public void SetSearch_WithPartialMatch_ReturnsMatchingItems()
276276 pagedCollection . SetSource ( source ) ;
277277
278278 // Act
279- pagedCollection . SetSearch ( x => x , "an" ) ;
279+ pagedCollection . SetSearchAsync ( x => x , "an" ) ;
280280
281281 // Assert
282282 Assert . HasCount ( 1 , pagedCollection . CurrentPageItems ) ;
@@ -292,11 +292,11 @@ public void SetSearch_WithWildcardAsterisk_ReturnsMatchingItems()
292292 pagedCollection . SetSource ( source ) ;
293293
294294 // Act
295- pagedCollection . SetSearch ( x => x , "*a*" , true ) ;
295+ pagedCollection . SetSearchAsync ( x => x , "*a*" , true ) ;
296296
297297 // Assert
298- Assert . HasCount ( 2 , pagedCollection . CurrentPageItems ) ;
299- CollectionAssert . AreEqual ( new List < string > { "apple" , "banana" } , pagedCollection . CurrentPageItems . ToList ( ) ) ;
298+ Assert . HasCount ( 3 , pagedCollection . CurrentPageItems ) ;
299+ CollectionAssert . AreEqual ( new List < string > { "apple" , "banana" , "date" } , pagedCollection . CurrentPageItems . ToList ( ) ) ;
300300 }
301301
302302 [ TestMethod ]
@@ -308,7 +308,7 @@ public void SetSearch_WithWildcardQuestionMark_ReturnsMatchingItems()
308308 pagedCollection . SetSource ( source ) ;
309309
310310 // Act
311- pagedCollection . SetSearch ( x => x , "appl?" , true ) ;
311+ pagedCollection . SetSearchAsync ( x => x , "appl?" , true ) ;
312312
313313 // Assert
314314 Assert . HasCount ( 2 , pagedCollection . CurrentPageItems ) ;
@@ -324,15 +324,15 @@ public void SetSearch_CaseInsensitive_ReturnsMatchingItems()
324324 pagedCollection . SetSource ( source ) ;
325325
326326 // Act
327- pagedCollection . SetSearch ( x => x , "apple" ) ;
327+ pagedCollection . SetSearchAsync ( x => x , "apple" ) ;
328328
329329 // Assert
330330 Assert . HasCount ( 1 , pagedCollection . CurrentPageItems ) ;
331331 Assert . AreEqual ( "Apple" , pagedCollection . CurrentPageItems [ 0 ] ) ;
332332 }
333333
334334 [ TestMethod ]
335- public void SetSearch_MultiColumn_ORLogic_ReturnsMatchingItems ( )
335+ public async Task SetSearch_MultiColumn_ORLogic_ReturnsMatchingItems ( )
336336 {
337337 // Arrange
338338 var source = new List < Person >
@@ -345,7 +345,7 @@ public void SetSearch_MultiColumn_ORLogic_ReturnsMatchingItems()
345345 pagedCollection . SetSource ( source ) ;
346346
347347 // Act: Search for "HR" in Name or Department
348- pagedCollection . SetSearch ( [ p => p . Name , p => p . Department ] , "HR" ) ;
348+ await pagedCollection . SetSearchAsync ( [ p => p . Name , p => p . Department ] , "HR" ) ;
349349
350350 // Assert
351351 Assert . HasCount ( 2 , pagedCollection . CurrentPageItems ) ;
@@ -403,13 +403,13 @@ public void RemoveFilter_WithNullKey_ThrowsArgumentNullException()
403403 }
404404
405405 [ TestMethod ]
406- public void SetSearchAll_WithNullSelectors_ThrowsArgumentNullException ( )
406+ public async Task SetSearchAll_WithNullSelectors_ThrowsArgumentNullException ( )
407407 {
408408 // Arrange
409409 var pagedCollection = new PagedCollection < string > ( 10 ) ;
410410
411411 // Act
412- Assert . ThrowsExactly < ArgumentNullException > ( ( ) => pagedCollection . SetSearchAll ( null ! , "term" ) ) ;
412+ await Assert . ThrowsExactlyAsync < ArgumentNullException > ( ( ) => pagedCollection . SetSearchAllAsync ( null ! , "term" ) ) ;
413413 }
414414
415415 [ TestMethod ]
@@ -646,7 +646,7 @@ public void PropertyChanged_IsFiredForIsSearching()
646646 } ;
647647
648648 // Act
649- pagedCollection . SetSearch ( x => x , "a" , false , 10 ) ;
649+ pagedCollection . SetSearchAsync ( x => x , "a" , false , 10 ) ;
650650 System . Threading . Thread . Sleep ( 20 ) ; // Allow debounce timer to start
651651
652652 // Assert
0 commit comments