/// <summary> /// Initialises a new instance of the <see cref="WebTestService"/> class. /// </summary> /// <param name="settings"><see cref="IWebTestSettingsElement"/> instance.</param> /// <param name="authenticationContext"><see cref="IAuthenticationContextWrapper"/> instance.</param> public WebTestService(IWebTestSettingsElement settings, IAuthenticationContextWrapper authenticationContext) { if (settings == null) { throw new ArgumentNullException(nameof(settings)); } this._auth = settings.Authentication.Clone(); this._appInsights = settings.ApplicationInsight.Clone(); this._webTests = settings.WebTests.Clone().OfType <WebTestElement>().ToList(); if (authenticationContext == null) { throw new ArgumentNullException(nameof(authenticationContext)); } this._authenticationContext = authenticationContext; }
/// <summary> /// Initialises a new instance of the <see cref="WebTestSettingsElementTest"/> class. /// </summary> /// <param name="fixture"><see cref="WebTestSettingsElementFixture"/> instance.</param> public WebTestSettingsElementTest(WebTestSettingsElementFixture fixture) { this._auth = fixture.WebTestSettingsElement.Authentication; this._insights = fixture.WebTestSettingsElement.ApplicationInsight; this._webTests = fixture.WebTestSettingsElement.WebTests.OfType <WebTestElement>().ToList(); }