public void TracksShowAllThreadsForUnownedThreads(bool showAllThreads) { var source = new ThreadReference[] { GetExampleThreadReference(0) }; var criteria = new InventorySearchCriteria { ShowAllThreads = showAllThreads, SearchString = "Id" }; source.ApplyCriteria(criteria).Should().HaveCount(showAllThreads ? 1 : 0); }
public void ApplyWithInvalidTerm(string searchString) { var source = new ThreadReference[] { GetExampleThreadReference() }; var criteria = new InventorySearchCriteria { ShowAllThreads = true, SearchString = searchString }; var results = source.ApplyCriteria(criteria).ToArray(); Assert.False(results.Any()); }
public void ApplyToIdAndDescription(string searchString) { var source = new ThreadReference[] { GetExampleThreadReference() }; var criteria = new InventorySearchCriteria { ShowAllThreads = true, SearchString = searchString }; var results = source.ApplyCriteria(criteria).ToArray(); results.Should().NotBeEmpty(); }