public ProductAddHandToolController(IOptions <JwtIssuerOptions> jwtOptions, IOptions <AppSettings> appSettings)
 {
     _appSettings        = appSettings;
     _jwtOptions         = jwtOptions.Value;
     _serializerSettings = new JsonSerializerSettings
     {
         Formatting = Formatting.Indented
     };
     _productAddService = new ProductAddService(appSettings.Value);
 }
Exemple #2
0
        public void Test2_Add_Product()
        {
            MainPage        mainPage        = new MainPage(driver);
            AllProductsPage allProductsPage = new AllProductsPage(driver);

            LoginService.Autorization(loginValue, driver);                                               // Авторизация

            ProductAddService.AddNewProduct(product, driver);                                            // ЗАПОЛНЯЕМ КАРТОЧКУ ПРОДУКТА
            Assert.AreEqual(product.SendKeysProductName, allProductsPage.SearchNewProductName(product)); // Проверка того, что новый продукт есть в списке
        }
        public static int GetMaxID()
        {
            int     result = 0;
            DataSet ds     = new ProductAddService().ProductAddGetMaxID();

            if (ds != null && ds.Tables[0].Rows.Count > 0)
            {
                result = int.Parse(ds.Tables[0].Rows[0][0].ToString() == "" ? "0" : ds.Tables[0].Rows[0][0].ToString());
            }
            return(result);
        }