Ejemplo n.º 1
0
    public void CanResolveWorkerStatusById()
    {
      //Arrange
      var stack = new BrowserStack(ConfigurationManager.AppSettings["username"],
                                   ConfigurationManager.AppSettings["password"]);
      var browsers = stack.Browsers();
      var browser = browsers.First();
      var worker = stack.CreateWorker(browser, "http://www.google.com");

      //Act
      var workers = stack.Workers();

      //Assert
      Assert.IsTrue(workers.Any(status => status.Id == worker.Id));
    }
Ejemplo n.º 2
0
    public void CanCreateWorker()
    {
      //Arrange
      var stack = new BrowserStack(ConfigurationManager.AppSettings["username"],
                                   ConfigurationManager.AppSettings["password"]);
      var browsers = stack.Browsers();

      //Act
      var worker = stack.CreateWorker(browsers.First(), "http://www.google.com");

      //Assert
      Assert.IsNotNull(worker);
      Assert.IsNotNull(worker.Id);

      //Kill the worker
      worker.Terminate();
    }
Ejemplo n.º 3
0
    public void NewlyCreatedWorkerShouldTheRequestedBrowser()
    {
      //Arrange
      var stack = new BrowserStack(ConfigurationManager.AppSettings["username"],
                                   ConfigurationManager.AppSettings["password"]);
      var browsers = stack.Browsers();
      var browser = browsers.First();
      var worker = stack.CreateWorker(browser, "http://www.google.com");

      //Act
      var status = worker.Status();

      //Assert
      Assert.IsNotNull(status.Browser);
      Assert.AreEqual(browser.BrowserName, status.Browser.BrowserName);
      Assert.AreEqual(browser.BrowserVersion, status.Browser.BrowserVersion);

      //Kill the worker
      worker.Terminate();
    }
Ejemplo n.º 4
0
    public void NewlyCreatedWorkerShouldHaveAValidStatus()
    {
      //Arrange
      //Arrange
      var stack = new BrowserStack(ConfigurationManager.AppSettings["username"],
                                   ConfigurationManager.AppSettings["password"]);
      var browsers = stack.Browsers();

      var worker = stack.CreateWorker(browsers.First(), "http://www.google.com");

      //Act
      var status = worker.Status();

      //Assert
      Assert.IsNotNull(status);
      Assert.IsNotNull(status.Status);

      //Kill the worker
      worker.Terminate();
    }