Refactor to introduce Govor.Application and Govor.Contracts layers

Moved service implementations and interfaces from Govor.API and Govor.Core to new Govor.Application and Govor.Contracts projects. Updated namespaces and references throughout the solution. Added custom exception classes for authentication and invite services. Adjusted dependency injection and project references to use the new structure. This refactor improves separation of concerns and prepares the codebase for better maintainability and scalability.
This commit is contained in:
Artemy
2025-06-25 15:16:14 +07:00
parent 5693190b1c
commit 4f3f4ec066
41 changed files with 126 additions and 75 deletions
@@ -1,6 +1,6 @@
using AutoFixture;
using Govor.API.Services.AdminsStuff;
using Govor.API.Services.AdminsStuff.Interfaces;
using Govor.Application.Interfaces.AdminsStuff;
using Govor.Core.Models;
using Govor.Core.Repositories.Invaites;
using Moq;
@@ -1,11 +1,12 @@
using AutoFixture;
using Govor.API.Services.Authentication;
using Govor.Core.Infrastructure.Extensions;
using Govor.Core.Models;
using Govor.Core.Repositories.Users;
using Govor.API.Services.Authentication.Interfaces;
using Govor.Application.Exceptions.AuthService;
using Govor.Application.Interfaces.Authentication;
using Govor.Application.Services;
using Govor.Core.Repositories.Admins;
using Govor.Core.Repositories.Invaites;
using Moq;
namespace Govor.API.Tests.UnitTests.Services.Authentication;
@@ -1,7 +1,7 @@
using System.IdentityModel.Tokens.Jwt;
using AutoFixture;
using Govor.API.Services.Authentication;
using Govor.API.Services.Authentication.Interfaces;
using Govor.Application.Services;
using Govor.Core.Models;
using Microsoft.Extensions.Options;
using Moq;
@@ -1,5 +1,6 @@
using AutoFixture;
using Govor.API.Services;
using Govor.Application.Interfaces;
using Govor.Application.Services;
using Microsoft.AspNetCore.Hosting;
using Moq;
@@ -24,7 +25,7 @@ public class LocalStorageServiceTests
_webHostEnvironmentMock.Setup(w => w.ContentRootPath).Returns(_tempDirectory);
_service = new LocalStorageService(_webHostEnvironmentMock.Object);
_service = new LocalStorageService(_webHostEnvironmentMock.Object.ContentRootPath);
}
[TearDown]
@@ -1,5 +1,5 @@
using AutoFixture;
using Govor.API.Services;
using Govor.Application.Services;
using Govor.Core.Infrastructure.Extensions;
namespace Govor.API.Tests.UnitTests.Services;