static void Main(string[] args) { Console.WriteLine("Пример шаблона проектирования \"Мост\""); var blogApplication = new BlogApplication(new DarkTheme()); var storeApplication = new StoreApplication(new LightTheme()); var webSite = new WebSite(new LightTheme(), new DarkTheme()); blogApplication.Init(); Console.WriteLine(); storeApplication.Init(); Console.WriteLine(); Console.WriteLine("Модифицируем реализацию "); storeApplication.Themes = new Theme[1] { new DarkTheme() }; storeApplication.Init(); Console.WriteLine(); webSite.Init(); Console.WriteLine(); Console.ReadKey(); }
public static void Init(TestContext context) { WebSettings.InitMsTestDefault(); JDISettings.Logger.Info("Init test run"); WinProcUtils.KillAllRunWebDrivers(); _timer = new Timer(); WebSite.Init(typeof(EpamSite)); EpamSite.HomePage.Open(); JDISettings.Logger.Info("Run Tests"); }
public void Init() { WebSettings.InitNUnitDefault(); JDISettings.Logger.Info("Init test run"); WinProcUtils.KillAllRunWebDrivers(); _timer = new Timer(); WebSite.Init(typeof(EpamSite)); WebSite.Open(); JDISettings.Logger.Info("Run Tests"); }
protected void SetUp() { WebSettings.InitNUnitDefault(); ILogger logger = WebSettings.Logger; logger.Info("Init test run..."); WinProcUtils.KillAllRunWebDrivers(); WebSite.Init(typeof(TestSite)); TestSite.HomePage.Open(); logger.Info("Run test..."); }
public void Init() { InitNUnitDefault(); Logger.Info("Init test run"); WinProcUtils.KillAllRunWebDrivers(); if (!DriverFactory.HasDrivers()) { UseDriver(DriverTypes.Chrome); } WebSite.Init(typeof(W3CSite)); Logger.Info("Run Tests"); }
protected void SetUp() { WebSettings.InitNUnitDefault(); var logger = JDISettings.Logger; logger.Info("Init test run..."); WinProcUtils.KillAllRunWebDrivers(); WebSite.Init(typeof(TestSite)); TestSite.HomePage.Open(); TestSite.LoginForm.Submit(User.DefaultUser); logger.Info("Run test..."); logger.Info("Navigating to Metals and Colors page."); MetalsColorsPage.Open(); MetalsColorsPage.CheckTitle(); MetalsColorsPage.IsOpened(); }
public void Init() { InitFromProperties(); Logger.Info("Init test run"); KillAllRunWebDrivers(); if (!DriverFactory.HasDrivers()) { UseDriver(Chrome); } Timer = new Timer(); WebSite.Init(typeof(EpamSite)); EpamSite.HomePage.Open(); Logger.Info("Run Tests"); }
public void TableTestShortInfo() { WebSite.Init(typeof(W3CSite)); W3CSite.TablePage.IsOpened(); var headers = W3CSite.TablePage.CompaniesShort.Columns.AllHeaders; CheckHeaders(headers); var companies = W3CSite.TablePage.CompaniesShort.Entities(); Assert.AreEqual(companies.Select(c => c.ToString()).Print(";"), "Alfreds Futterkiste, Germany;" + "Centro comercial Moctezuma, Mexico;" + "Ernst Handel, Austria;" + "Island Trading, UK;" + "Laughing Bacchus Winecellars, Canada;" + "Magazzini Alimentari Riuniti, Italy" ); }
public void TableTest() { WebSite.Init(typeof(W3CSite)); W3CSite.TablePage.IsOpened(); var headers = W3CSite.TablePage.Companies.Columns.AllHeaders; CheckHeaders(headers); var companies = W3CSite.TablePage.Companies.Entities(); Assert.AreEqual(companies.Select(c => c.ToString()).Print(";"), "Alfreds Futterkiste, Maria Anders, Germany;" + "Centro comercial Moctezuma, Francisco Chang, Mexico;" + "Ernst Handel, Roland Mendel, Austria;" + "Island Trading, Helen Bennett, UK;" + "Laughing Bacchus Winecellars, Yoshi Tannamuri, Canada;" + "Magazzini Alimentari Riuniti, Giovanni Rovelli, Italy" ); }
public static void Setup() { Timer _timer = new Timer(); WebSettings.InitNUnitDefault(); WinProcUtils.KillAllRunWebDrivers(); if (!JDISettings.DriverFactory.HasDrivers()) { WebSettings.UseDriver(DriverTypes.Chrome); } _timer = new Timer(); WebDriver.Manage().Timeouts().ImplicitlyWait(TimeSpan.FromSeconds(5)); WebDriver.Manage().Timeouts().SetPageLoadTimeout(TimeSpan.FromSeconds(5)); WebDriver.Manage().Timeouts().SetScriptTimeout(TimeSpan.FromSeconds(5)); WebSite.Init(typeof(EbaySite)); }
public static void setUp() { WebSite.Init(typeof(EpamSite)); EpamSite.homePage.Open(); JDISettings.Logger.Info("Run Tests"); }