diff --git a/Retroactiune.Core/Services/TokensService.cs b/Retroactiune.Core/Services/TokenService.cs similarity index 96% rename from Retroactiune.Core/Services/TokensService.cs rename to Retroactiune.Core/Services/TokenService.cs index 005792e..47cffc9 100644 --- a/Retroactiune.Core/Services/TokensService.cs +++ b/Retroactiune.Core/Services/TokenService.cs @@ -8,11 +8,11 @@ using Retroactiune.Core.Interfaces; namespace Retroactiune.Core.Services { - public class TokensService : ITokensService + public class TokenService : ITokensService { private readonly IMongoCollection _collection; - public TokensService(IMongoClient client, IDatabaseSettings settings) + public TokenService(IMongoClient client, IDatabaseSettings settings) { var database = client.GetDatabase(settings.DatabaseName); _collection = database.GetCollection(settings.TokensCollectionName); diff --git a/Retroactiune.UnitTests/Retroactiune.Core/Services/TestTokensService.cs b/Retroactiune.UnitTests/Retroactiune.Core/Services/TestTokensService.cs index cce6a2b..8ea2952 100644 --- a/Retroactiune.UnitTests/Retroactiune.Core/Services/TestTokensService.cs +++ b/Retroactiune.UnitTests/Retroactiune.Core/Services/TestTokensService.cs @@ -35,7 +35,7 @@ namespace Retroactiune.Tests.Retroactiune.Core.Services .Returns(mongoCollectionMock.Object); // Test & Assert - var service = new TokensService(mongoClientMock.Object, mongoSettingsMock.Object); + var service = new TokenService(mongoClientMock.Object, mongoSettingsMock.Object); await Assert.ThrowsAsync(async () => { await service.GenerateTokensAsync(-1, ""); }); } @@ -63,7 +63,7 @@ namespace Retroactiune.Tests.Retroactiune.Core.Services // Test var expiryTime = DateTime.UtcNow; - var service = new TokensService(mongoClientMock.Object, mongoSettingsMock.Object); + var service = new TokenService(mongoClientMock.Object, mongoSettingsMock.Object); await service.GenerateTokensAsync(3, "Hello", expiryTime); // Assert @@ -104,7 +104,7 @@ namespace Retroactiune.Tests.Retroactiune.Core.Services .Returns(mongoCollectionMock.Object); // Test - var service = new TokensService(mongoClientMock.Object, mongoSettingsMock.Object); + var service = new TokenService(mongoClientMock.Object, mongoSettingsMock.Object); await service.DeleteTokens(new[] {"test_id"}); // Assert diff --git a/Retroactiune.WebAPI/Startup.cs b/Retroactiune.WebAPI/Startup.cs index e5b341b..d126034 100644 --- a/Retroactiune.WebAPI/Startup.cs +++ b/Retroactiune.WebAPI/Startup.cs @@ -39,7 +39,7 @@ namespace Retroactiune // Services services.AddSingleton(); - services.AddSingleton(); + services.AddSingleton(); services.AddSingleton(i => { var settings = i.GetService>(); diff --git a/Retroactiune.WebAPI/TestingStartup.cs b/Retroactiune.WebAPI/TestingStartup.cs index fe53dd3..ef6cc97 100644 --- a/Retroactiune.WebAPI/TestingStartup.cs +++ b/Retroactiune.WebAPI/TestingStartup.cs @@ -35,7 +35,7 @@ namespace Retroactiune // Services services.AddSingleton(); - services.AddSingleton(); + services.AddSingleton(); services.AddSingleton(i => { var settings = i.GetService>();