コード例 #1
0
        public void VatExceptionCreationWidhValidDataTest()
        {
            AddNewProjectInTestRail();
            // AddTestCaseInProject();



            VatAccountData account = new VatAccountData("123456780");

            account.Account20 = "123456710";

            List <VatAccountData> oldAccounts = app.VatException.GetAccountList();

            app.VatException.Create(account);
            List <VatAccountData> newAccounts = app.VatException.GetAccountList();

            //if (oldAccounts.Count + 1 != newAccounts.Count)
            //{
            //    AddFailResultInTestRail();
            //}
            //else
            //{
            //    AddPassResultInTestRail();
            //}


            Assert.AreEqual(oldAccounts.Count + 1, newAccounts.Count);
            oldAccounts.Add(account);
            oldAccounts.Sort();
            newAccounts.Sort();
            Assert.AreEqual(oldAccounts, newAccounts);
        }
コード例 #2
0
 public VatExceptionHelper Create(VatAccountData account)
 {
     //manager.Navigation.OpenHomePage();  //данные методы можно удалить
     //Thread.Sleep(1000); //данные методы можно удалить
     manager.Navigation.GoToVATExceptionListPage();
     Thread.Sleep(1000);
     InitRecordCreation();
     FillRecordForm(account);
     SaveRecordCreation();
     Thread.Sleep(1000);
     return(this);
 }
コード例 #3
0
        public VatExceptionHelper FillRecordForm(VatAccountData account)
        {
            //By locator = By.Id("account0");
            //string text = account.Account0;


            driver.FindElement(By.Id("account0")).Click();
            Type(By.Id("account0"), account.Account0);
            //driver.FindElement(By.Id("account0")).Click();
            //driver.FindElement(By.Id("account0")).SendKeys(account.Account0);

            driver.FindElement(By.Id("account20")).Click();
            Type(By.Id("account20"), account.Account20);
            //driver.FindElement(By.Id("account20")).SendKeys(account.Account20);
            driver.FindElement(By.Id("export")).Click();
            driver.FindElement(By.Id("import")).Click();
            return(this);
        }
コード例 #4
0
        public void VatExceptionRemovalTest()
        {
            app.Navigation.GoToVATExceptionListPage();


            if (app.VatException.VatExceptionIsNotCreated())
            {
                VatAccountData newaccount = new VatAccountData("123456780");
                newaccount.Account20 = "123456710";
                app.VatException.Create(newaccount);
            }

            Assert.IsFalse(app.VatException.VatExceptionIsNotCreated());

            List <VatAccountData> oldAccount = app.VatException.GetAccountList();

            app.VatException.Remove();

            List <VatAccountData> newAccount = app.VatException.GetAccountList();

            oldAccount.RemoveAt(0);

            Assert.AreEqual(oldAccount, newAccount);
        }