Skip to content

Commit

Permalink
register ActionRetrier in container (#74)
Browse files Browse the repository at this point in the history
  • Loading branch information
knysh authored May 19, 2020
1 parent 1fc4060 commit 8ed1367
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ public virtual IServiceCollection ConfigureServices(IServiceCollection services,
services.AddSingleton<IRetryConfiguration, RetryConfiguration>();
services.AddSingleton<ILocalizationManager, LocalizationManager>();
services.AddSingleton<ILocalizedLogger, LocalizedLogger>();
services.AddSingleton<IActionRetrier, ActionRetrier>();
services.AddSingleton<IElementActionRetrier, ElementActionRetrier>();

services.AddTransient<IConditionalWait, ConditionalWait>();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
using Aquality.Selenium.Core.Utilities;
using Aquality.Selenium.Core.Tests.Applications.Browser;
using Aquality.Selenium.Core.Utilities;
using Microsoft.Extensions.DependencyInjection;
using NUnit.Framework;
using System;
using System.Collections.Generic;
Expand All @@ -11,6 +13,12 @@ public class ActionRetrierTests : RetrierTests

private IActionRetrier ActionRetrier => new ActionRetrier(RetryConfiguration);

[Test]
public void Retrier_ShouldBePossible_ToGetFromAqualitySrvices()
{
Assert.DoesNotThrow(() => AqualityServices.ServiceProvider.GetRequiredService<IActionRetrier>());
}

[Test]
public void Retrier_ShouldWork_OnceIfMethodSucceeded()
{
Expand Down

0 comments on commit 8ed1367

Please sign in to comment.