From 32054fea3c8fac4b4d0ce0a20f0652ad9e8f6419 Mon Sep 17 00:00:00 2001 From: Denis Nutiu Date: Sun, 27 Jun 2021 16:51:45 +0300 Subject: [PATCH] Rename TokensService.cs to TokenService.cs --- .../Services/{TokensService.cs => TokenService.cs} | 4 ++-- .../Retroactiune.Core/Services/TestTokensService.cs | 6 +++--- Retroactiune.WebAPI/Startup.cs | 2 +- Retroactiune.WebAPI/TestingStartup.cs | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) rename Retroactiune.Core/Services/{TokensService.cs => TokenService.cs} (96%) 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>();