Exemplo n.º 1
0
        public BasicResponse InsertPatrimonio(MarcaInsert marca)
        {
            BasicResponse r     = new BasicResponse();
            var           login = new BasicLogin(User.Identity);

            if (!login.isAtutenticated)
            {
                r.Status     = RequisitionStatus.ProcessedWithError;
                r.CodeStatus = CodeStatus.InvalidToken;
                r.Messages.Add("User not authnticated");
            }
            else
            {
                r = Marca.insertMarca(marca);
            }
            return(r);
        }
Exemplo n.º 2
0
        public BasicResponse GetUsuario()
        {
            BasicResponse r     = new BasicResponse();
            var           login = new BasicLogin(User.Identity);

            if (!login.isAtutenticated)
            {
                r.Status     = RequisitionStatus.ProcessedWithError;
                r.CodeStatus = CodeStatus.InvalidToken;
                r.Messages.Add("User not authnticated");
            }
            else
            {
                r = Usuario.getUsuario();
            }
            return(r);
        }
Exemplo n.º 3
0
        public void CheckRecurringPayment()
        {
            List <dynamic> sites  = ReadCSV.GetSites("Cases/RecurringPayment/CheckRecurringPaymentTestData.csv");
            IWebDriver     driver = StartUp();

            try
            {
                for (int j = 0; j < sites.Count; j++)
                {
                    try
                    {
                        BasicLogin.Execute(sites[j], driver);
                        RecurringPayment.Execute(sites[j], driver);
                    }

                    catch (System.Exception ex)
                    {
                        throw ex;
                    }
                    finally
                    {
                        foreach (KeyValuePair <string, object> entry in sites[j])
                        {
                            TestContext.WriteLine(entry.Key + ": " + entry.Value);
                        }
                    }
                }
            }
            catch (System.Exception ex)
            {
                throw ex;
            }
            finally
            {
                driver.Close();
                driver.Dispose();
            }
        }
Exemplo n.º 4
0
        public void CheckBasicLogin()
        {
            List <dynamic> sites     = ReadCSV.GetSites(TestContext.Properties["BasicLoginTestDataPath"].ToString());
            int            siteCount = sites.Count;
            IWebDriver     driver    = StartUp();

            try
            {
                for (int j = 0; j < siteCount; j++)
                {
                    try
                    {
                        BasicLogin.Execute(sites[j], driver);
                    }
                    catch (System.Exception ex)
                    {
                        throw ex;
                    }
                    finally
                    {
                        foreach (KeyValuePair <string, object> entry in sites[j])
                        {
                            TestContext.WriteLine(entry.Key + ": " + entry.Value);
                        }
                    }
                }
            }
            catch (System.Exception ex)
            {
                throw ex;
            }
            finally
            {
                driver.Close();
                driver.Dispose();
            }
        }
Exemplo n.º 5
0
 public Login_API(BasicLogin userData)
 {
     this.userData = userData;
 }