Created
October 2, 2016 16:29
-
-
Save angelovstanton/c7dfc7a86bbcd20dea24b921e77a51a3 to your computer and use it in GitHub Desktop.
This file contains 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
public class TestExecutionEngine : | |
BaseTestExecutionEngine<WebDriverExecutionEngineAttribute> | |
{ | |
public TestExecutionEngine(IUnityContainer container) : base(container) | |
{ | |
} | |
public override void RegisterDependencies(Browsers executionBrowserType) | |
{ | |
var browserSettings = new BrowserSettings(executionBrowserType); | |
this.driver = new SeleniumDriver(this.container, browserSettings); | |
this.container.RegisterType<IButton, Button>(); | |
this.container.RegisterType<ITextBox, TextBox>(); | |
this.container.RegisterType<IDiv, Div>(); | |
this.container.RegisterType<ISearch, Search>(); | |
this.container.RegisterType<IInputSubmit, InputSubmit>(); | |
this.container.RegisterInstance<IDriver>(this.driver); | |
this.container.RegisterInstance<IBrowser>(this.driver); | |
this.container.RegisterInstance<ICookieService>(this.driver); | |
this.container.RegisterInstance<IDialogService>(this.driver); | |
this.container.RegisterInstance<IJavaScriptInvoker>(this.driver); | |
this.container.RegisterInstance<INavigationService>(this.driver); | |
this.container.RegisterInstance<IElementFinder>(this.driver); | |
# region 11. Failed Tests Аnalysis - Decorator Design Pattern | |
this.container.RegisterType<IEnumerable< | |
IExceptionAnalysationHandler>, IExceptionAnalysationHandler[]>(); | |
this.container.RegisterType<IUiExceptionAnalyser, UiExceptionAnalyser>(); | |
this.container.RegisterType<IElementFinder, ExceptionAnalyzedElementFinder>( | |
new InjectionFactory(x => new ExceptionAnalyzedElementFinder( | |
this.driver, this.container.Resolve<IUiExceptionAnalyser>()))); | |
this.container.RegisterType<INavigationService, ExceptionAnalyzedNavigationService>( | |
new InjectionFactory(x => new ExceptionAnalyzedNavigationService( | |
this.driver, this.container.Resolve<IUiExceptionAnalyser>()))); | |
#endregion | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment