public void CheckSearchByTitle() { var seacher = Searcher.GetItemWithTitle; var result = Searcher.Search(seacher, SearchTitle, DataToTest.GetDataToSearchOrSort()); Assert.IsTrue(result[0].Id == IdByTitleSearch); }
public void CheckSortByYearDESC() { var sortByYear = Sorter.SortByYearDESC; var result = Sorter.Sort(sortByYear, DataToTest.GetDataToSearchOrSort()); Assert.IsTrue(result[0].Id == TestLibrary.IdBySortYearDESC); }
public void CheckGroupingItemByYear() { var groupedCatalogByYear = Sorter.GroupByYear; var resultGrouping = Sorter.Sort(groupedCatalogByYear, DataToTest.GetDataToSearchOrSort()); Assert.IsTrue(TestLibrary.CountOfGroup(resultGrouping) == TestLibrary.CountOfGroupForYear); }
internal static List <ItemCatalog> OnlyBook() { return(DataToTest.GetDataToSearchOrSort().Where(item => item is Book).ToList()); }