Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save angelovstanton/61fb13ae1597074b1cc66cac36126450 to your computer and use it in GitHub Desktop.

Select an option

Save angelovstanton/61fb13ae1597074b1cc66cac36126450 to your computer and use it in GitHub Desktop.
[TestClass,
TestingFrameworkExecutionEngine(Browser = Browsers.Chrome)]
public class BingTests : BaseTest
{
private static TestExecutionEngine testingFrameworkTestExecutionEngine;
[AssemblyInitialize]
public static void AssemblyInit(TestContext context)
{
var container = UnityContainerFactory.GetContainer();
UnityContainerFactory.GetContainer().RegisterType<
ITestExecutionEngine, TestExecutionEngine>(Guid.NewGuid().ToString());
UnityContainerFactory.GetContainer().RegisterInstance<IUnityContainer>(container);
testingFrameworkTestExecutionEngine = new TestExecutionEngine(container);
testingFrameworkTestExecutionEngine.RegisterDependencies(Browsers.Chrome);
}
[AssemblyCleanup]
public static void AssemblyCleanup()
{
testingFrameworkTestExecutionEngine.Dispose();
}
[TestMethod]
public void SearchForAutomateThePlanet()
{
var bingMainPage = this.Container.Resolve<BingMainPage>();
bingMainPage.Navigate();
bingMainPage.Search("Automate The Planet");
bingMainPage.AssertResultsCountIsAsExpected("422,000 results");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment