public void FilterUsersByName_SearchTermsLove_ReturnLoveLace(string value) { // Arrange IEnumerable <Models.User> FoundUsers; // Act FoundUsers = _searchController.FilterUsersByName(value, _users); // Assert Assert.True(FoundUsers.Count() == 1); Assert.True(FoundUsers.FirstOrDefault().Name.Equals("Lovelace")); }
public void FilterUsersByName_SearchTermsOr_ReturnTorvaldsCrockford(string value) { // Arrange IEnumerable <Models.User> FoundUsers; // Act FoundUsers = _searchController.FilterUsersByName(value, _users); //Assert Assert.True(FoundUsers.Count() == 2); Assert.True(FoundUsers.FirstOrDefault().Name == "Crockford"); Assert.True(FoundUsers.Last().Name == "Torvalds"); }