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."); }
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."); }