Created
October 2, 2016 16:33
-
-
Save angelovstanton/61fb13ae1597074b1cc66cac36126450 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [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