Ejemplo n.º 1
0
        public bool CheckConvertation(double bestExchangeRate, double worstExchangeRate)
        {
            _10UnitTests.ResultPage selectPage = new _10UnitTests.ResultPage(driver);
            string costBYN = selectPage.GetCostBYN().Trim(new char[] { 'B', 'Y', 'N' });

            selectPage.SelectUSD();
            string costUSD    = selectPage.getCostUSD().Trim(new char[] { 'U', 'S', 'D' });
            double resultRate = Double.Parse(costBYN) / Double.Parse(costUSD);

            if (resultRate >= worstExchangeRate && resultRate <= bestExchangeRate)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
Ejemplo n.º 2
0
        public bool CheckSortByTime()
        {
            _10UnitTests.ResultPage selectPage = new _10UnitTests.ResultPage(driver);

            string[] first             = selectPage.GetFirstTime().Split(new char[] { ' ' });
            string[] second            = selectPage.GetSecondTime().Split(new char[] { ' ' });
            string[] third             = selectPage.GetSecondTime().Split(new char[] { ' ' });
            double   firstTimeMinutes  = Double.Parse(first[0]) * 60 + Double.Parse(first[2]);
            double   secondTimeMinutes = Double.Parse(second[0]) * 60 + Double.Parse(second[2]);
            double   thirdTimeMinutes  = Double.Parse(third[0]) * 60 + Double.Parse(third[2]);

            if (firstTimeMinutes <= secondTimeMinutes && secondTimeMinutes <= thirdTimeMinutes)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
Ejemplo n.º 3
0
 public void SelectTicket()
 {
     _10UnitTests.ResultPage selectPage = new _10UnitTests.ResultPage(driver);
     selectPage.ClickTicket();
 }
Ejemplo n.º 4
0
 public void SelectSortByTime()
 {
     _10UnitTests.ResultPage selectPage = new _10UnitTests.ResultPage(driver);
     selectPage.StartSort();
 }