From 42b705978b73af56fec4471e96791a467fa917e9 Mon Sep 17 00:00:00 2001 From: Adiv <asifadiv@gmail.com> Date: Mon, 8 May 2023 08:24:47 +0100 Subject: [PATCH] Added testing project, and moved solution file --- .gitignore | 2 +- .../AuthServiceTests.cs | 81 +++++++++++++++++++ .../AuthenticationMicroservice.Tests.csproj | 25 ++++++ .../Helpers/AutoMapperHelper.cs | 13 +++ .../Helpers/DbContextHelper.cs | 15 ++++ AuthenticationMicroservice.Tests/Usings.cs | 1 + AuthenticationMicroservice.sln | 8 +- .../.dockerignore | 0 .../AuthenticationMicroservice.csproj | 7 +- .../AutoMapperProfile.cs | 0 .../Constants.cs | 0 .../Controllers}/AuthenticationController.cs | 0 .../Controllers}/AuthorizeRolesAttribute.cs | 0 .../BaseAuthenticationController.cs | 0 .../Controllers}/BaseController.cs | 0 .../Dockerfile | 0 .../Exceptions}/AuthenticationException.cs | 0 .../Helpers}/EmailHelper.cs | 0 .../Helpers}/ResponseOperationFilter.cs | 0 .../Helpers}/SecurityHelper.cs | 0 .../Helpers}/TaskExtensions.cs | 0 .../Middleware}/ExceptionMiddleware.cs | 0 .../Middleware}/SwaggerAuthMiddleware.cs | 0 .../Middleware}/SwaggerAuthorizeExtensions.cs | 0 ...0230325232645_InitialMigration.Designer.cs | 0 .../20230325232645_InitialMigration.cs | 0 ...5160442_RemovedProfilePictures.Designer.cs | 0 .../20230505160442_RemovedProfilePictures.cs | 0 .../AuthenticationDbContextModelSnapshot.cs | 0 .../Models}/AuthenticationDbContext.cs | 0 .../Models}/BaseObjects/BaseDTO.cs | 0 .../Models}/BaseObjects/BaseEntity.cs | 0 .../Models}/DTOs/EmailDTO.cs | 0 .../Models}/DTOs/UserDTO.cs | 0 .../Models}/Entities/RefreshToken.cs | 0 .../Models}/Entities/User.cs | 0 .../Program.cs | 0 .../Properties}/launchSettings.json | 0 .../Repositories}/BaseRepository.cs | 0 .../Services}/AuthService.cs | 0 .../Services}/EmailService.cs | 0 .../Services}/RefreshTokenService.cs | 0 .../Services}/UserService.cs | 0 .../Settings}/ConnectionStrings.cs | 0 .../Settings}/EmailConfig.cs | 0 .../Settings}/FrontendStrings.cs | 0 .../Settings}/TokenSettings.cs | 0 .../appsettings.json | 0 .../azure-pipelines.yml | 0 49 files changed, 149 insertions(+), 3 deletions(-) create mode 100644 AuthenticationMicroservice.Tests/AuthServiceTests.cs create mode 100644 AuthenticationMicroservice.Tests/AuthenticationMicroservice.Tests.csproj create mode 100644 AuthenticationMicroservice.Tests/Helpers/AutoMapperHelper.cs create mode 100644 AuthenticationMicroservice.Tests/Helpers/DbContextHelper.cs create mode 100644 AuthenticationMicroservice.Tests/Usings.cs rename .dockerignore => AuthenticationMicroservice/.dockerignore (100%) rename AuthenticationMicroservice.csproj => AuthenticationMicroservice/AuthenticationMicroservice.csproj (88%) rename AutoMapperProfile.cs => AuthenticationMicroservice/AutoMapperProfile.cs (100%) rename Constants.cs => AuthenticationMicroservice/Constants.cs (100%) rename {Controllers => AuthenticationMicroservice/Controllers}/AuthenticationController.cs (100%) rename {Controllers => AuthenticationMicroservice/Controllers}/AuthorizeRolesAttribute.cs (100%) rename {Controllers => AuthenticationMicroservice/Controllers}/BaseAuthenticationController.cs (100%) rename {Controllers => AuthenticationMicroservice/Controllers}/BaseController.cs (100%) rename Dockerfile => AuthenticationMicroservice/Dockerfile (100%) rename {Exceptions => AuthenticationMicroservice/Exceptions}/AuthenticationException.cs (100%) rename {Helpers => AuthenticationMicroservice/Helpers}/EmailHelper.cs (100%) rename {Helpers => AuthenticationMicroservice/Helpers}/ResponseOperationFilter.cs (100%) rename {Helpers => AuthenticationMicroservice/Helpers}/SecurityHelper.cs (100%) rename {Helpers => AuthenticationMicroservice/Helpers}/TaskExtensions.cs (100%) rename {Middleware => AuthenticationMicroservice/Middleware}/ExceptionMiddleware.cs (100%) rename {Middleware => AuthenticationMicroservice/Middleware}/SwaggerAuthMiddleware.cs (100%) rename {Middleware => AuthenticationMicroservice/Middleware}/SwaggerAuthorizeExtensions.cs (100%) rename {Migrations => AuthenticationMicroservice/Migrations}/20230325232645_InitialMigration.Designer.cs (100%) rename {Migrations => AuthenticationMicroservice/Migrations}/20230325232645_InitialMigration.cs (100%) rename {Migrations => AuthenticationMicroservice/Migrations}/20230505160442_RemovedProfilePictures.Designer.cs (100%) rename {Migrations => AuthenticationMicroservice/Migrations}/20230505160442_RemovedProfilePictures.cs (100%) rename {Migrations => AuthenticationMicroservice/Migrations}/AuthenticationDbContextModelSnapshot.cs (100%) rename {Models => AuthenticationMicroservice/Models}/AuthenticationDbContext.cs (100%) rename {Models => AuthenticationMicroservice/Models}/BaseObjects/BaseDTO.cs (100%) rename {Models => AuthenticationMicroservice/Models}/BaseObjects/BaseEntity.cs (100%) rename {Models => AuthenticationMicroservice/Models}/DTOs/EmailDTO.cs (100%) rename {Models => AuthenticationMicroservice/Models}/DTOs/UserDTO.cs (100%) rename {Models => AuthenticationMicroservice/Models}/Entities/RefreshToken.cs (100%) rename {Models => AuthenticationMicroservice/Models}/Entities/User.cs (100%) rename Program.cs => AuthenticationMicroservice/Program.cs (100%) rename {Properties => AuthenticationMicroservice/Properties}/launchSettings.json (100%) rename {Repositories => AuthenticationMicroservice/Repositories}/BaseRepository.cs (100%) rename {Services => AuthenticationMicroservice/Services}/AuthService.cs (100%) rename {Services => AuthenticationMicroservice/Services}/EmailService.cs (100%) rename {Services => AuthenticationMicroservice/Services}/RefreshTokenService.cs (100%) rename {Services => AuthenticationMicroservice/Services}/UserService.cs (100%) rename {Settings => AuthenticationMicroservice/Settings}/ConnectionStrings.cs (100%) rename {Settings => AuthenticationMicroservice/Settings}/EmailConfig.cs (100%) rename {Settings => AuthenticationMicroservice/Settings}/FrontendStrings.cs (100%) rename {Settings => AuthenticationMicroservice/Settings}/TokenSettings.cs (100%) rename appsettings.json => AuthenticationMicroservice/appsettings.json (100%) rename azure-pipelines.yml => AuthenticationMicroservice/azure-pipelines.yml (100%) diff --git a/.gitignore b/.gitignore index 155c719..fdef719 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,4 @@ -appsettings.Development.json +AuthenticationMicroservice/appsettings.Development.json # Created by https://www.toptal.com/developers/gitignore/api/aspnetcore # Edit at https://www.toptal.com/developers/gitignore?templates=aspnetcore diff --git a/AuthenticationMicroservice.Tests/AuthServiceTests.cs b/AuthenticationMicroservice.Tests/AuthServiceTests.cs new file mode 100644 index 0000000..840fbe5 --- /dev/null +++ b/AuthenticationMicroservice.Tests/AuthServiceTests.cs @@ -0,0 +1,81 @@ +namespace AuthenticationMicroservice.Tests; + +using AutoMapper; +using Helpers; +using Microsoft.Extensions.Options; +using Models.DTOs; +using Models.Entities; +using Moq; +using Repositories; +using Services; +using Settings; + +public class AuthServiceTests +{ + private readonly IMapper _mapper; + + public AuthServiceTests() + { + _mapper = AutoMapperHelper.CreateTestMapper(); + } + + [Fact] + public async Task TestRegisterUser() + { + var registerRequest = new UserRegisterRequestDTO + { + EmailAddress = "aa03980@surrey.ac.uk", + Password = "Testtest1.", + ConfirmPassword = "Testtest1.", + FirstName = "Adiv", + Surname = "Asif" + }; + + await using var context = DbContextHelper.CreateInMemoryDbContext(); + var userRepo = new BaseRepository<User>(context); + + var userService = new UserService(_mapper, userRepo); + var createdUser = await userService.CreateUser(registerRequest); + Assert.True(createdUser.EmailAddress == "aa03980@surrey.ac.uk"); + } + + [Fact] + public async Task TestRegisterAndLoginUser() + { + var registerRequest = new UserRegisterRequestDTO + { + EmailAddress = "aa03980@surrey.ac.uk", + Password = "Testtest1.", + ConfirmPassword = "Testtest1.", + FirstName = "Adiv", + Surname = "Asif" + }; + + var loginRequest = new UserLoginRequestDTO + { + EmailAddress = "aa03980@surrey.ac.uk", + Password = "Testtest1." + }; + + await using var context = DbContextHelper.CreateInMemoryDbContext(); + var userRepo = new BaseRepository<User>(context); + + var userService = new UserService(_mapper, userRepo); + var createdUser = await userService.CreateUser(registerRequest); + + var mockEmailService = new Mock<IEmailService>(); + var mockRefreshTokenService = new Mock<IRefreshTokenService>(); + mockRefreshTokenService.Setup(r => r.CreateNewTokenForUser(It.IsAny<int>())).ReturnsAsync(new AccessToken{Token = "test"}); + mockRefreshTokenService.Setup(r => r.CreateNewTokenForUser(It.IsAny<User>())).Returns(new AccessToken{Token = "test"}); + mockRefreshTokenService.Setup(r => r.GenerateRefreshToken(It.IsAny<int>())).ReturnsAsync(new RefreshToken{Token = "test"}); + + var frontendString = new FrontendStrings {BaseUrl = "test"}; + var mockOptions = new Mock<IOptions<FrontendStrings>>(); + mockOptions.Setup(s => s.Value).Returns(frontendString); + + var authService = new AuthService(context, mockEmailService.Object, mockRefreshTokenService.Object, mockOptions.Object); + var login = await authService.Authenticate(loginRequest); + + Assert.True(login.UserId == createdUser.Id); + } +} \ No newline at end of file diff --git a/AuthenticationMicroservice.Tests/AuthenticationMicroservice.Tests.csproj b/AuthenticationMicroservice.Tests/AuthenticationMicroservice.Tests.csproj new file mode 100644 index 0000000..8982fe3 --- /dev/null +++ b/AuthenticationMicroservice.Tests/AuthenticationMicroservice.Tests.csproj @@ -0,0 +1,25 @@ +<Project Sdk="Microsoft.NET.Sdk"> + + <PropertyGroup> + <TargetFramework>net8.0</TargetFramework> + <ImplicitUsings>enable</ImplicitUsings> + <Nullable>enable</Nullable> + + <IsPackable>false</IsPackable> + <IsTestProject>true</IsTestProject> + </PropertyGroup> + + <ItemGroup> + <PackageReference Include="xunit" Version="2.4.1"/> + <PackageReference Include="xunit.runner.visualstudio" Version="2.4.3"> + <PrivateAssets>all</PrivateAssets> + <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets> + </PackageReference> + <PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.0.0"/> + </ItemGroup> + + <ItemGroup> + <ProjectReference Include="..\AuthenticationMicroservice\AuthenticationMicroservice.csproj"/> + </ItemGroup> + +</Project> diff --git a/AuthenticationMicroservice.Tests/Helpers/AutoMapperHelper.cs b/AuthenticationMicroservice.Tests/Helpers/AutoMapperHelper.cs new file mode 100644 index 0000000..1bb0b4d --- /dev/null +++ b/AuthenticationMicroservice.Tests/Helpers/AutoMapperHelper.cs @@ -0,0 +1,13 @@ +namespace AuthenticationMicroservice.Tests.Helpers; + +using AutoMapper; + +public class AutoMapperHelper +{ + public static IMapper CreateTestMapper() + { + var configuration = new MapperConfiguration(cfg => { cfg.AddProfile<AutoMapperProfile>(); }); + + return configuration.CreateMapper(); + } +} \ No newline at end of file diff --git a/AuthenticationMicroservice.Tests/Helpers/DbContextHelper.cs b/AuthenticationMicroservice.Tests/Helpers/DbContextHelper.cs new file mode 100644 index 0000000..b9dd553 --- /dev/null +++ b/AuthenticationMicroservice.Tests/Helpers/DbContextHelper.cs @@ -0,0 +1,15 @@ +namespace AuthenticationMicroservice.Tests.Helpers; + +using Microsoft.EntityFrameworkCore; +using Models; + +public class DbContextHelper +{ + public static AuthenticationDbContext CreateInMemoryDbContext() + { + var options = new DbContextOptionsBuilder<AuthenticationDbContext>() + .UseInMemoryDatabase(Guid.NewGuid().ToString()).Options; + var context = new AuthenticationDbContext(options); + return context; + } +} \ No newline at end of file diff --git a/AuthenticationMicroservice.Tests/Usings.cs b/AuthenticationMicroservice.Tests/Usings.cs new file mode 100644 index 0000000..8c927eb --- /dev/null +++ b/AuthenticationMicroservice.Tests/Usings.cs @@ -0,0 +1 @@ +global using Xunit; \ No newline at end of file diff --git a/AuthenticationMicroservice.sln b/AuthenticationMicroservice.sln index 4f32aea..faa1d39 100644 --- a/AuthenticationMicroservice.sln +++ b/AuthenticationMicroservice.sln @@ -3,7 +3,9 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio Version 17 VisualStudioVersion = 17.6.33513.286 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AuthenticationMicroservice", "AuthenticationMicroservice.csproj", "{EFB5174F-F711-4272-A765-8147AF59AF34}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AuthenticationMicroservice", "AuthenticationMicroservice\AuthenticationMicroservice.csproj", "{EFB5174F-F711-4272-A765-8147AF59AF34}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AuthenticationMicroservice.Tests", "AuthenticationMicroservice.Tests\AuthenticationMicroservice.Tests.csproj", "{93DC4F65-3B37-466A-BFE0-B96ABCD6CCBD}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -15,6 +17,10 @@ Global {EFB5174F-F711-4272-A765-8147AF59AF34}.Debug|Any CPU.Build.0 = Debug|Any CPU {EFB5174F-F711-4272-A765-8147AF59AF34}.Release|Any CPU.ActiveCfg = Release|Any CPU {EFB5174F-F711-4272-A765-8147AF59AF34}.Release|Any CPU.Build.0 = Release|Any CPU + {93DC4F65-3B37-466A-BFE0-B96ABCD6CCBD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {93DC4F65-3B37-466A-BFE0-B96ABCD6CCBD}.Debug|Any CPU.Build.0 = Debug|Any CPU + {93DC4F65-3B37-466A-BFE0-B96ABCD6CCBD}.Release|Any CPU.ActiveCfg = Release|Any CPU + {93DC4F65-3B37-466A-BFE0-B96ABCD6CCBD}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/.dockerignore b/AuthenticationMicroservice/.dockerignore similarity index 100% rename from .dockerignore rename to AuthenticationMicroservice/.dockerignore diff --git a/AuthenticationMicroservice.csproj b/AuthenticationMicroservice/AuthenticationMicroservice.csproj similarity index 88% rename from AuthenticationMicroservice.csproj rename to AuthenticationMicroservice/AuthenticationMicroservice.csproj index 8c6b137..fba275b 100644 --- a/AuthenticationMicroservice.csproj +++ b/AuthenticationMicroservice/AuthenticationMicroservice.csproj @@ -11,10 +11,14 @@ <ItemGroup> <PackageReference Include="AutoMapper" Version="12.0.1"/> - <PackageReference Include="AutoMapper.Extensions.Microsoft.DependencyInjection" Version="12.0.0"/> + <PackageReference Include="AutoMapper.Extensions.Microsoft.DependencyInjection" Version="12.0.1"/> <PackageReference Include="Azure.Storage.Blobs" Version="12.16.0-beta.1"/> <PackageReference Include="Azure.Storage.Common" Version="12.15.0-beta.1"/> <PackageReference Include="BenchmarkDotNet" Version="0.13.5"/> + <PackageReference Include="coverlet.collector" Version="3.2.0"> + <PrivateAssets>all</PrivateAssets> + <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets> + </PackageReference> <PackageReference Include="LazyCache" Version="2.4.0"/> <PackageReference Include="LazyCache.AspNetCore" Version="2.4.0"/> <PackageReference Include="MailKit" Version="3.6.0"/> @@ -33,6 +37,7 @@ <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets> </PackageReference> <PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.18.1"/> + <PackageReference Include="Moq" Version="4.18.4"/> <PackageReference Include="Newtonsoft.Json" Version="13.0.3"/> <PackageReference Include="Polly" Version="7.2.3"/> <PackageReference Include="SixLabors.ImageSharp" Version="3.0.1"/> diff --git a/AutoMapperProfile.cs b/AuthenticationMicroservice/AutoMapperProfile.cs similarity index 100% rename from AutoMapperProfile.cs rename to AuthenticationMicroservice/AutoMapperProfile.cs diff --git a/Constants.cs b/AuthenticationMicroservice/Constants.cs similarity index 100% rename from Constants.cs rename to AuthenticationMicroservice/Constants.cs diff --git a/Controllers/AuthenticationController.cs b/AuthenticationMicroservice/Controllers/AuthenticationController.cs similarity index 100% rename from Controllers/AuthenticationController.cs rename to AuthenticationMicroservice/Controllers/AuthenticationController.cs diff --git a/Controllers/AuthorizeRolesAttribute.cs b/AuthenticationMicroservice/Controllers/AuthorizeRolesAttribute.cs similarity index 100% rename from Controllers/AuthorizeRolesAttribute.cs rename to AuthenticationMicroservice/Controllers/AuthorizeRolesAttribute.cs diff --git a/Controllers/BaseAuthenticationController.cs b/AuthenticationMicroservice/Controllers/BaseAuthenticationController.cs similarity index 100% rename from Controllers/BaseAuthenticationController.cs rename to AuthenticationMicroservice/Controllers/BaseAuthenticationController.cs diff --git a/Controllers/BaseController.cs b/AuthenticationMicroservice/Controllers/BaseController.cs similarity index 100% rename from Controllers/BaseController.cs rename to AuthenticationMicroservice/Controllers/BaseController.cs diff --git a/Dockerfile b/AuthenticationMicroservice/Dockerfile similarity index 100% rename from Dockerfile rename to AuthenticationMicroservice/Dockerfile diff --git a/Exceptions/AuthenticationException.cs b/AuthenticationMicroservice/Exceptions/AuthenticationException.cs similarity index 100% rename from Exceptions/AuthenticationException.cs rename to AuthenticationMicroservice/Exceptions/AuthenticationException.cs diff --git a/Helpers/EmailHelper.cs b/AuthenticationMicroservice/Helpers/EmailHelper.cs similarity index 100% rename from Helpers/EmailHelper.cs rename to AuthenticationMicroservice/Helpers/EmailHelper.cs diff --git a/Helpers/ResponseOperationFilter.cs b/AuthenticationMicroservice/Helpers/ResponseOperationFilter.cs similarity index 100% rename from Helpers/ResponseOperationFilter.cs rename to AuthenticationMicroservice/Helpers/ResponseOperationFilter.cs diff --git a/Helpers/SecurityHelper.cs b/AuthenticationMicroservice/Helpers/SecurityHelper.cs similarity index 100% rename from Helpers/SecurityHelper.cs rename to AuthenticationMicroservice/Helpers/SecurityHelper.cs diff --git a/Helpers/TaskExtensions.cs b/AuthenticationMicroservice/Helpers/TaskExtensions.cs similarity index 100% rename from Helpers/TaskExtensions.cs rename to AuthenticationMicroservice/Helpers/TaskExtensions.cs diff --git a/Middleware/ExceptionMiddleware.cs b/AuthenticationMicroservice/Middleware/ExceptionMiddleware.cs similarity index 100% rename from Middleware/ExceptionMiddleware.cs rename to AuthenticationMicroservice/Middleware/ExceptionMiddleware.cs diff --git a/Middleware/SwaggerAuthMiddleware.cs b/AuthenticationMicroservice/Middleware/SwaggerAuthMiddleware.cs similarity index 100% rename from Middleware/SwaggerAuthMiddleware.cs rename to AuthenticationMicroservice/Middleware/SwaggerAuthMiddleware.cs diff --git a/Middleware/SwaggerAuthorizeExtensions.cs b/AuthenticationMicroservice/Middleware/SwaggerAuthorizeExtensions.cs similarity index 100% rename from Middleware/SwaggerAuthorizeExtensions.cs rename to AuthenticationMicroservice/Middleware/SwaggerAuthorizeExtensions.cs diff --git a/Migrations/20230325232645_InitialMigration.Designer.cs b/AuthenticationMicroservice/Migrations/20230325232645_InitialMigration.Designer.cs similarity index 100% rename from Migrations/20230325232645_InitialMigration.Designer.cs rename to AuthenticationMicroservice/Migrations/20230325232645_InitialMigration.Designer.cs diff --git a/Migrations/20230325232645_InitialMigration.cs b/AuthenticationMicroservice/Migrations/20230325232645_InitialMigration.cs similarity index 100% rename from Migrations/20230325232645_InitialMigration.cs rename to AuthenticationMicroservice/Migrations/20230325232645_InitialMigration.cs diff --git a/Migrations/20230505160442_RemovedProfilePictures.Designer.cs b/AuthenticationMicroservice/Migrations/20230505160442_RemovedProfilePictures.Designer.cs similarity index 100% rename from Migrations/20230505160442_RemovedProfilePictures.Designer.cs rename to AuthenticationMicroservice/Migrations/20230505160442_RemovedProfilePictures.Designer.cs diff --git a/Migrations/20230505160442_RemovedProfilePictures.cs b/AuthenticationMicroservice/Migrations/20230505160442_RemovedProfilePictures.cs similarity index 100% rename from Migrations/20230505160442_RemovedProfilePictures.cs rename to AuthenticationMicroservice/Migrations/20230505160442_RemovedProfilePictures.cs diff --git a/Migrations/AuthenticationDbContextModelSnapshot.cs b/AuthenticationMicroservice/Migrations/AuthenticationDbContextModelSnapshot.cs similarity index 100% rename from Migrations/AuthenticationDbContextModelSnapshot.cs rename to AuthenticationMicroservice/Migrations/AuthenticationDbContextModelSnapshot.cs diff --git a/Models/AuthenticationDbContext.cs b/AuthenticationMicroservice/Models/AuthenticationDbContext.cs similarity index 100% rename from Models/AuthenticationDbContext.cs rename to AuthenticationMicroservice/Models/AuthenticationDbContext.cs diff --git a/Models/BaseObjects/BaseDTO.cs b/AuthenticationMicroservice/Models/BaseObjects/BaseDTO.cs similarity index 100% rename from Models/BaseObjects/BaseDTO.cs rename to AuthenticationMicroservice/Models/BaseObjects/BaseDTO.cs diff --git a/Models/BaseObjects/BaseEntity.cs b/AuthenticationMicroservice/Models/BaseObjects/BaseEntity.cs similarity index 100% rename from Models/BaseObjects/BaseEntity.cs rename to AuthenticationMicroservice/Models/BaseObjects/BaseEntity.cs diff --git a/Models/DTOs/EmailDTO.cs b/AuthenticationMicroservice/Models/DTOs/EmailDTO.cs similarity index 100% rename from Models/DTOs/EmailDTO.cs rename to AuthenticationMicroservice/Models/DTOs/EmailDTO.cs diff --git a/Models/DTOs/UserDTO.cs b/AuthenticationMicroservice/Models/DTOs/UserDTO.cs similarity index 100% rename from Models/DTOs/UserDTO.cs rename to AuthenticationMicroservice/Models/DTOs/UserDTO.cs diff --git a/Models/Entities/RefreshToken.cs b/AuthenticationMicroservice/Models/Entities/RefreshToken.cs similarity index 100% rename from Models/Entities/RefreshToken.cs rename to AuthenticationMicroservice/Models/Entities/RefreshToken.cs diff --git a/Models/Entities/User.cs b/AuthenticationMicroservice/Models/Entities/User.cs similarity index 100% rename from Models/Entities/User.cs rename to AuthenticationMicroservice/Models/Entities/User.cs diff --git a/Program.cs b/AuthenticationMicroservice/Program.cs similarity index 100% rename from Program.cs rename to AuthenticationMicroservice/Program.cs diff --git a/Properties/launchSettings.json b/AuthenticationMicroservice/Properties/launchSettings.json similarity index 100% rename from Properties/launchSettings.json rename to AuthenticationMicroservice/Properties/launchSettings.json diff --git a/Repositories/BaseRepository.cs b/AuthenticationMicroservice/Repositories/BaseRepository.cs similarity index 100% rename from Repositories/BaseRepository.cs rename to AuthenticationMicroservice/Repositories/BaseRepository.cs diff --git a/Services/AuthService.cs b/AuthenticationMicroservice/Services/AuthService.cs similarity index 100% rename from Services/AuthService.cs rename to AuthenticationMicroservice/Services/AuthService.cs diff --git a/Services/EmailService.cs b/AuthenticationMicroservice/Services/EmailService.cs similarity index 100% rename from Services/EmailService.cs rename to AuthenticationMicroservice/Services/EmailService.cs diff --git a/Services/RefreshTokenService.cs b/AuthenticationMicroservice/Services/RefreshTokenService.cs similarity index 100% rename from Services/RefreshTokenService.cs rename to AuthenticationMicroservice/Services/RefreshTokenService.cs diff --git a/Services/UserService.cs b/AuthenticationMicroservice/Services/UserService.cs similarity index 100% rename from Services/UserService.cs rename to AuthenticationMicroservice/Services/UserService.cs diff --git a/Settings/ConnectionStrings.cs b/AuthenticationMicroservice/Settings/ConnectionStrings.cs similarity index 100% rename from Settings/ConnectionStrings.cs rename to AuthenticationMicroservice/Settings/ConnectionStrings.cs diff --git a/Settings/EmailConfig.cs b/AuthenticationMicroservice/Settings/EmailConfig.cs similarity index 100% rename from Settings/EmailConfig.cs rename to AuthenticationMicroservice/Settings/EmailConfig.cs diff --git a/Settings/FrontendStrings.cs b/AuthenticationMicroservice/Settings/FrontendStrings.cs similarity index 100% rename from Settings/FrontendStrings.cs rename to AuthenticationMicroservice/Settings/FrontendStrings.cs diff --git a/Settings/TokenSettings.cs b/AuthenticationMicroservice/Settings/TokenSettings.cs similarity index 100% rename from Settings/TokenSettings.cs rename to AuthenticationMicroservice/Settings/TokenSettings.cs diff --git a/appsettings.json b/AuthenticationMicroservice/appsettings.json similarity index 100% rename from appsettings.json rename to AuthenticationMicroservice/appsettings.json diff --git a/azure-pipelines.yml b/AuthenticationMicroservice/azure-pipelines.yml similarity index 100% rename from azure-pipelines.yml rename to AuthenticationMicroservice/azure-pipelines.yml -- GitLab