コード例 #1
0
        public void SortingByName()
        {
            //arrange
            _driver.Url = _urlForSorting;
            var sortingOnCoreFilteringContext = new SortingOnCoreFilteringContext(_driver);
            var sortingResultContext          = new SortingResultContext(_driver);


            //act
            sortingOnCoreFilteringContext.SelectSortingByName();
            var actualResult = sortingResultContext.GetSortingResultByName();

            //assert
            CollectionAssert.IsOrdered(actualResult, "The sorting result should be in alphabetical order.");
        }
コード例 #2
0
        public void PriceSortingIncrease()
        {
            //arrange
            _driver.Url = _urlForSorting;
            var sortingOnCoreFilteringContext = new SortingOnCoreFilteringContext(_driver);
            var sortingResultContext          = new SortingResultContext(_driver);

            //act
            sortingOnCoreFilteringContext.SelectSortingByIncreasedPrice();
            var actualResult = sortingResultContext.GetSortingResultByPrice();
            var actualPrices = actualResult.Select(s => double.Parse(s.Replace("грн", string.Empty)
                                                                     .Replace(" ", string.Empty)
                                                                     .Replace(",", ".")));

            //assert
            CollectionAssert.IsOrdered(actualPrices, "The sorted prices should be increased.");
        }