Skip to content

Commit

Permalink
refactor: remove unused timer provider
Browse files Browse the repository at this point in the history
  • Loading branch information
denis-maiorov-brightsec committed Aug 8, 2024
1 parent 2b9e7a7 commit c820824
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 38 deletions.
11 changes: 0 additions & 11 deletions src/SecTester.Core/Utils/ITimerProvider.cs

This file was deleted.

14 changes: 0 additions & 14 deletions src/SecTester.Core/Utils/SystemTimerProvider.cs

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ public static IServiceCollection AddSecTesterRepeater(this IServiceCollection co
.AddSingleton<IRepeaterBusFactory, DefaultRepeaterBusFactory>()
.AddScoped<IRepeaterFactory, DefaultRepeaterFactory>()
.AddScoped<IRepeaters, DefaultRepeaters>()
.AddScoped<ITimerProvider, SystemTimerProvider>()
.AddScoped<IRequestRunner, HttpRequestRunner>()
.AddScoped<RequestRunnerResolver>(sp =>
protocol => sp.GetServices<IRequestRunner>().FirstOrDefault(x => x.Protocol == protocol)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,9 @@ public class DefaultRepeaterBusFactoryTests : IDisposable
private const string Token = "0zmcwpe.nexr.0vlon8mp7lvxzjuvgjy88olrhadhiukk";

private readonly ILoggerFactory _loggerFactory = Substitute.For<ILoggerFactory>();
private readonly ITimerProvider _timerProvider = Substitute.For<ITimerProvider>();

public void Dispose()
{
_timerProvider.ClearSubstitute();
_loggerFactory.ClearSubstitute();
GC.SuppressFinalize(this);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,6 @@ public void AddSecTesterRepeater_RegistersRepeaters()
_sut.Received().AddScoped<IRepeaters, DefaultRepeaters>();
}

[Fact]
public void AddSecTesterRepeater_RegistersTimerProvider()
{
// act
_sut.AddSecTesterRepeater();

// assert
_sut.Received().AddScoped<ITimerProvider, SystemTimerProvider>();
}

[Fact]
public void AddSecTesterRepeater_WithTimeout_RegistersHttpClient()
{
Expand Down

0 comments on commit c820824

Please sign in to comment.