示例#1
0
        public void CheckSearchByTitle()
        {
            var seacher = Searcher.GetItemWithTitle;
            var result  = Searcher.Search(seacher, SearchTitle, DataToTest.GetDataToSearchOrSort());

            Assert.IsTrue(result[0].Id == IdByTitleSearch);
        }
示例#2
0
        public void CheckSortByYearDESC()
        {
            var sortByYear = Sorter.SortByYearDESC;
            var result     = Sorter.Sort(sortByYear, DataToTest.GetDataToSearchOrSort());

            Assert.IsTrue(result[0].Id == TestLibrary.IdBySortYearDESC);
        }
示例#3
0
        public void CheckGroupingItemByYear()
        {
            var groupedCatalogByYear = Sorter.GroupByYear;
            var resultGrouping       = Sorter.Sort(groupedCatalogByYear, DataToTest.GetDataToSearchOrSort());

            Assert.IsTrue(TestLibrary.CountOfGroup(resultGrouping) == TestLibrary.CountOfGroupForYear);
        }
示例#4
0
 internal static List <ItemCatalog> OnlyBook()
 {
     return(DataToTest.GetDataToSearchOrSort().Where(item => item is Book).ToList());
 }