From 5b4f7a2caf43a821f5c023403dd18b8f34f90cc6 Mon Sep 17 00:00:00 2001 From: dev-javid Date: Sat, 21 Sep 2024 09:09:07 +0530 Subject: [PATCH 1/7] Removed company id from user --- .../Auth/Commands/ForgotPasswordCommand.cs | 2 - .../Common/Abstract/IIdentityService.cs | 2 +- .../Users/Commands/AddUserCommand.cs | 3 +- .../Users/Events/UserCreatedEvent.cs | 2 +- src/Database/Scripts/20240407.sql | 4 +- src/Domain/Identity/User.cs | 8 +- .../BackgroundJobs/SeedDataJob.cs | 5 +- .../Configuration/IdentityConfig.cs | 4 - .../Services/CustomClaimsTransformation.cs | 31 ---- .../Services/IdentityService.cs | 4 +- src/Infrastructure/Services/JwtService.cs | 2 +- src/presentation.client/react.client.esproj | 24 ++-- tests/Tests.Integration/Fixture/Setup.sql | 6 +- .../ClockOut.Should_Add_Data.received.json | 1 + ..._Return_Data_For_Date_Filter.received.json | 1 + ...Return_Data_For_Month_Filter.received.json | 1 + ...ta_When_Clock_Out_Is_Missing.received.json | 1 + ...r_Employee_For_Company_Admin.received.json | 6 + ...n_Employee_Data_For_Employee.received.json | 6 + ...r_Employee_For_Company_Admin.received.json | 1 + ..._Return_Data_Of_Own_Employee.received.json | 1 + ...Deparment.Should_Return_Data.received.json | 1 + ...eparments.Should_Return_Data.received.json | 6 + ...epartment.Should_Return_Data.received.json | 1 + ...yeeLeaves.Should_Return_Data.received.json | 6 + ...dEmployee.Should_Return_Data.received.json | 1 + ...Employees.Should_Return_Data.received.json | 6 + ...eDocumnet.Should_Return_Data.received.json | 1 + ...enses.Should_return_expenses.received.json | 6 + ...ddHoliday.Should_Return_Data.received.json | 1 + ...tHolidays.Should_Return_Data.received.json | 6 + ...teHoliday.Should_Return_Data.received.json | 1 + ...Should_Return_Income_Sources.received.json | 6 + ...etIncomes.Should_return_data.received.json | 6 + ...dJobTitle.Should_Return_Data.received.json | 1 + ...JobTitles.Should_Return_Data.received.json | 6 + ...eJobTitle.Should_Return_Data.received.json | 1 + ...avePolicy.Should_Return_Data.received.json | 1 + ...icReports.Should_Return_Data.received.json | 6 + ...Return_Data_For_Month_Filter.received.json | 135 ++++++++++++++++++ ...r_Employee_For_Company_Admin.received.json | 135 ++++++++++++++++++ ...Return_Data_Of_Own_Employee_.received.json | 135 ++++++++++++++++++ ...lied_Month_If_Month_Supplied.received.json | 6 + ..._Month_If_Month_Not_Supplied.received.json | 6 + .../Tests.Integration/Tests/Users/GetUser.sql | 6 +- .../Auth/Commands/RefreshTokenCommandTests.cs | 2 +- .../Commands/AddEmployeeCommandTests.cs | 8 +- 47 files changed, 533 insertions(+), 78 deletions(-) delete mode 100644 src/Infrastructure/Services/CustomClaimsTransformation.cs create mode 100644 tests/Tests.Integration/Tests/Attendance/ClockOut.Should_Add_Data.received.json create mode 100644 tests/Tests.Integration/Tests/Attendance/GetAttendance.Should_Return_Data_For_Date_Filter.received.json create mode 100644 tests/Tests.Integration/Tests/Attendance/GetAttendance.Should_Return_Data_For_Month_Filter.received.json create mode 100644 tests/Tests.Integration/Tests/AttendanceRegularizations/ApproveAttendanceRegularization.Should_Set_Data_When_Clock_Out_Is_Missing.received.json create mode 100644 tests/Tests.Integration/Tests/AttendanceRegularizations/GetRegularizations.Should_Return_Data_Of_Other_Employee_For_Company_Admin.received.json create mode 100644 tests/Tests.Integration/Tests/AttendanceRegularizations/GetRegularizations.Should_Return_Own_Employee_Data_For_Employee.received.json create mode 100644 tests/Tests.Integration/Tests/Compensations/GetCompensations.Should_Return_Data_Of_Other_Employee_For_Company_Admin.received.json create mode 100644 tests/Tests.Integration/Tests/Compensations/GetCompensations.Should_Return_Data_Of_Own_Employee.received.json create mode 100644 tests/Tests.Integration/Tests/Departments/AddDeparment.Should_Return_Data.received.json create mode 100644 tests/Tests.Integration/Tests/Departments/GetDeparments.Should_Return_Data.received.json create mode 100644 tests/Tests.Integration/Tests/Departments/UpdateDepartment.Should_Return_Data.received.json create mode 100644 tests/Tests.Integration/Tests/EmployeeLeaves/GetAllEmployeeLeaves.Should_Return_Data.received.json create mode 100644 tests/Tests.Integration/Tests/Employees/AddEmployee.Should_Return_Data.received.json create mode 100644 tests/Tests.Integration/Tests/Employees/GetEmployees.Should_Return_Data.received.json create mode 100644 tests/Tests.Integration/Tests/Employees/UpdateEmployeeDocumnet.Should_Return_Data.received.json create mode 100644 tests/Tests.Integration/Tests/Expenses/GetExpenses.Should_return_expenses.received.json create mode 100644 tests/Tests.Integration/Tests/Holidays/AddHoliday.Should_Return_Data.received.json create mode 100644 tests/Tests.Integration/Tests/Holidays/GetHolidays.Should_Return_Data.received.json create mode 100644 tests/Tests.Integration/Tests/Holidays/UpdateHoliday.Should_Return_Data.received.json create mode 100644 tests/Tests.Integration/Tests/IncomeSources/GetIncomeSources.Should_Return_Income_Sources.received.json create mode 100644 tests/Tests.Integration/Tests/Incomes/GetIncomes.Should_return_data.received.json create mode 100644 tests/Tests.Integration/Tests/JobTitles/AddJobTitle.Should_Return_Data.received.json create mode 100644 tests/Tests.Integration/Tests/JobTitles/GetJobTitles.Should_Return_Data.received.json create mode 100644 tests/Tests.Integration/Tests/JobTitles/UpdateJobTitle.Should_Return_Data.received.json create mode 100644 tests/Tests.Integration/Tests/LeavePolicy/UpdateLeavePolicy.Should_Return_Data.received.json create mode 100644 tests/Tests.Integration/Tests/Reports/GetAdminBasicReports.Should_Return_Data.received.json create mode 100644 tests/Tests.Integration/Tests/Salaries/GetEstimatedSalary.Should_Return_Data_For_Month_Filter.received.json create mode 100644 tests/Tests.Integration/Tests/Salaries/GetEstimatedSalary.Should_Return_Data_Of_Other_Employee_For_Company_Admin.received.json create mode 100644 tests/Tests.Integration/Tests/Salaries/GetEstimatedSalary.Should_Return_Data_Of_Own_Employee_.received.json create mode 100644 tests/Tests.Integration/Tests/Salaries/GetSalaries.Should_Return_Data_For_Supplied_Month_If_Month_Supplied.received.json create mode 100644 tests/Tests.Integration/Tests/Salaries/GetSalaries.Should_Return_Date_For_Current_Month_If_Month_Not_Supplied.received.json diff --git a/src/Application/Auth/Commands/ForgotPasswordCommand.cs b/src/Application/Auth/Commands/ForgotPasswordCommand.cs index f11ce06..600f747 100644 --- a/src/Application/Auth/Commands/ForgotPasswordCommand.cs +++ b/src/Application/Auth/Commands/ForgotPasswordCommand.cs @@ -33,7 +33,6 @@ public async Task Handle(ForgotPasswordCommand request, CancellationToken { x.Id, x.Email, - CompanyName = x.Company.Name, Name = x.Employee != null ? x.Employee.FullName : "there", }) .FirstAsync(cancellationToken); @@ -43,7 +42,6 @@ public async Task Handle(ForgotPasswordCommand request, CancellationToken var emailText = await staticContentReader.ReadContentAsync("email-templates/forgot-password.html"); emailText = emailText.Replace("[User Name]", user.Name); - emailText = emailText.Replace("[Company Name]", user.CompanyName); emailText = emailText.Replace("[Year]", DateTime.Now.Year.ToString()); emailText = emailText.Replace("[Reset Password Link]", link); emailService.Send(user.Email!.ToValueObject(), "Reset Your Password", emailText); diff --git a/src/Application/Common/Abstract/IIdentityService.cs b/src/Application/Common/Abstract/IIdentityService.cs index f3fb96d..aa1c5d0 100644 --- a/src/Application/Common/Abstract/IIdentityService.cs +++ b/src/Application/Common/Abstract/IIdentityService.cs @@ -35,5 +35,5 @@ public interface IIdentityService Task IsEmailConfirmedAsync(int userId); - Task AddSeedDataAsync(Company company); + Task AddSeedDataAsync(); } diff --git a/src/Application/Users/Commands/AddUserCommand.cs b/src/Application/Users/Commands/AddUserCommand.cs index 1c396ec..e46a639 100644 --- a/src/Application/Users/Commands/AddUserCommand.cs +++ b/src/Application/Users/Commands/AddUserCommand.cs @@ -57,7 +57,7 @@ private async Task CreateUserAsync(AddUserCommand request, CancellationToke private async Task CreateIdentity(Company company, AddUserCommand request) { var role = await identityService.GetRoleAsync(request.Role.AsEnum()); - var user = User.Create(request.Email.ToValueObject(), request.PhoneNumber.ToValueObject(), company.Id); + var user = User.Create(request.Email.ToValueObject(), request.PhoneNumber.ToValueObject()); var claims = new Dictionary { @@ -71,6 +71,7 @@ private async Task CreateIdentity(Company company, AddUserCommand request) { UserId = user.Id, }); + return user; } } diff --git a/src/Application/Users/Events/UserCreatedEvent.cs b/src/Application/Users/Events/UserCreatedEvent.cs index 2597ab1..a76b2fd 100644 --- a/src/Application/Users/Events/UserCreatedEvent.cs +++ b/src/Application/Users/Events/UserCreatedEvent.cs @@ -24,7 +24,7 @@ public async Task Handle(UserCreatedEvent notification, CancellationToken cancel { x.Id, x.Email, - CompanyName = x.Company.Name, + CompanyName = x.Employee != null ? x.Employee.Company.Name : "", Name = x.Employee != null ? x.Employee.FullName : "there", }) .FirstAsync(cancellationToken); diff --git a/src/Database/Scripts/20240407.sql b/src/Database/Scripts/20240407.sql index 81b99be..19e8797 100644 --- a/src/Database/Scripts/20240407.sql +++ b/src/Database/Scripts/20240407.sql @@ -30,7 +30,6 @@ CREATE TABLE domain_events ( -- users CREATE TABLE public.users ( id int4 GENERATED BY DEFAULT AS IDENTITY( INCREMENT BY 1 MINVALUE 1 MAXVALUE 2147483647 START 1 CACHE 1 NO CYCLE) NOT NULL, - company_id int NOT NULL, user_name text NULL, normalized_user_name text NULL, email text NULL, @@ -49,8 +48,7 @@ CREATE TABLE public.users ( created_on timestamptz NOT NULL, modified_by int NULL, modified_on timestamptz NULL, - CONSTRAINT pk_users PRIMARY KEY (id), - CONSTRAINT fk_users_company_id FOREIGN KEY (company_id) REFERENCES companies (id) MATCH SIMPLE + CONSTRAINT pk_users PRIMARY KEY (id) ); CREATE UNIQUE INDEX uk_users_email ON public.users USING btree (email); CREATE UNIQUE INDEX uk_users_phone_number ON public.users USING btree (phone_number); diff --git a/src/Domain/Identity/User.cs b/src/Domain/Identity/User.cs index 10a90e0..63caaaa 100644 --- a/src/Domain/Identity/User.cs +++ b/src/Domain/Identity/User.cs @@ -1,4 +1,3 @@ -using Domain.Companies; using Domain.Employees; using Microsoft.AspNetCore.Identity; @@ -11,22 +10,17 @@ private User() Claims = []; } - public int CompanyId { get; private set; } - - public Company Company { get; private set; } = null!; - public Employee? Employee { get; private set; } = null!; public ICollection> Claims { get; private set; } - public static User Create(Email email, PhoneNumber phoneNumber, int companyId) + public static User Create(Email email, PhoneNumber phoneNumber) { var user = new User { UserName = email.Value, Email = email.Value, PhoneNumber = phoneNumber.Value, - CompanyId = companyId }; return user; diff --git a/src/Infrastructure/BackgroundJobs/SeedDataJob.cs b/src/Infrastructure/BackgroundJobs/SeedDataJob.cs index edf9098..a5ccf4c 100644 --- a/src/Infrastructure/BackgroundJobs/SeedDataJob.cs +++ b/src/Infrastructure/BackgroundJobs/SeedDataJob.cs @@ -8,7 +8,7 @@ public async Task Run() { if (!await dbContext.Companies.AnyAsync()) { - var company = Company.Create("Acme", "admin@example.com".ToValueObject(), "9876543210".ToValueObject(), "Acme Admin", 3.ToValueObject()); + var company = Company.Create("Example Company", "admin@example.com".ToValueObject(), "9876543210".ToValueObject(), "Super Admin", 3.ToValueObject()); await dbContext.Companies.AddAsync(company); await dbContext.SaveChangesAsync(default); } @@ -18,8 +18,7 @@ public async Task Run() using var transaction = await dbContext.Database.BeginTransactionAsync(); try { - var company = await dbContext.Companies.FirstAsync(); - await identityService.AddSeedDataAsync(company); + await identityService.AddSeedDataAsync(); await transaction.CommitAsync(); } catch (Exception) diff --git a/src/Infrastructure/EntityFramework/Configuration/IdentityConfig.cs b/src/Infrastructure/EntityFramework/Configuration/IdentityConfig.cs index cca794b..71d181e 100644 --- a/src/Infrastructure/EntityFramework/Configuration/IdentityConfig.cs +++ b/src/Infrastructure/EntityFramework/Configuration/IdentityConfig.cs @@ -70,10 +70,6 @@ public void Configure(EntityTypeBuilder builder) .WithOne() .HasForeignKey(uc => uc.UserId) .IsRequired(); - - builder - .Property(x => x.CompanyId) - .HasColumnName("company_id"); } } diff --git a/src/Infrastructure/Services/CustomClaimsTransformation.cs b/src/Infrastructure/Services/CustomClaimsTransformation.cs deleted file mode 100644 index e5dd336..0000000 --- a/src/Infrastructure/Services/CustomClaimsTransformation.cs +++ /dev/null @@ -1,31 +0,0 @@ -using System.Security.Claims; -using Microsoft.AspNetCore.Authentication; - -namespace Infrastructure.Services -{ - internal class CustomClaimsTransformation(IDbContext dbContext) : IClaimsTransformation - { - public const string CompanyClaim = "companyId"; - - public async Task TransformAsync(ClaimsPrincipal principal) - { - if (!principal.HasClaim(claim => claim.Type == CompanyClaim)) - { - var userId = int.Parse(principal.FindFirstValue(ClaimTypes.NameIdentifier) ?? "0"); - - if (userId > 0) - { - var user = await dbContext - .Users - .IgnoreQueryFilters() - .FirstAsync(x => x.Id == userId); - - ClaimsIdentity claimsIdentity = new(); - claimsIdentity.AddClaim(new Claim(CompanyClaim, user!.CompanyId.ToString())); - } - } - - return principal; - } - } -} diff --git a/src/Infrastructure/Services/IdentityService.cs b/src/Infrastructure/Services/IdentityService.cs index a680f26..b71a8e6 100644 --- a/src/Infrastructure/Services/IdentityService.cs +++ b/src/Infrastructure/Services/IdentityService.cs @@ -109,7 +109,7 @@ public async Task IsEmailConfirmedAsync(int userId) return await userManager.IsEmailConfirmedAsync(user!); } - public async Task AddSeedDataAsync(Company company) + public async Task AddSeedDataAsync() { foreach (var roleName in (RoleName[])Enum.GetValues(typeof(RoleName))) { @@ -118,7 +118,7 @@ public async Task AddSeedDataAsync(Company company) VerifyResult(result); } - User user = User.Create("admin@example.com".ToValueObject(), "9876543210".ToValueObject(), company.Id); + User user = User.Create("admin@example.com".ToValueObject(), "9876543210".ToValueObject()); var role = await GetRoleAsync(RoleName.SuperAdmin); await CreateUserAsync(user, role); var token = await GenerateAccountVerificationTokenAsync(user.Id); diff --git a/src/Infrastructure/Services/JwtService.cs b/src/Infrastructure/Services/JwtService.cs index 84f768b..a7dc91a 100644 --- a/src/Infrastructure/Services/JwtService.cs +++ b/src/Infrastructure/Services/JwtService.cs @@ -128,7 +128,7 @@ private async Task AddCustomClaimsAsync(List claims, CancellationToken ca .Select(x => new { x.Id, - x.CompanyId, + CompanyId = x.Employee != null ? x.Employee.CompanyId : 0, }) .FirstAsync(x => x.Id == userId); diff --git a/src/presentation.client/react.client.esproj b/src/presentation.client/react.client.esproj index b0a4ed1..822d70f 100644 --- a/src/presentation.client/react.client.esproj +++ b/src/presentation.client/react.client.esproj @@ -1,11 +1,15 @@ - - - npm run dev - src\ - Jest - - false - - $(MSBuildProjectDirectory)\dist - + + + npm run dev + src\ + Jest + + false + + $(MSBuildProjectDirectory)\dist + + + + win;linux;osx + \ No newline at end of file diff --git a/tests/Tests.Integration/Fixture/Setup.sql b/tests/Tests.Integration/Fixture/Setup.sql index 9641aa3..5744738 100644 --- a/tests/Tests.Integration/Fixture/Setup.sql +++ b/tests/Tests.Integration/Fixture/Setup.sql @@ -11,9 +11,9 @@ INSERT INTO public.roles VALUES (3, 'Employee', 'EMPLOYEE', NULL, 0, '20 INSERT INTO public.users VALUES -(100, 999, 'super-admin@example.com', 'SUPER-ADMIN@EXAMPLE.COM', 'super-admin@example.com', 'SUPER-ADMIN@EXAMPLE.COM', true, 'AQAAAAIAAYagAAAAEIDoeTRLrGQvn8FRF2EXGdQ5GtreAkKzZcbl1BTD6xNNzUXrGkn6BCPp05RxjIH2lQ==', '2XTX6Z5RVMLHRXNWIMW3UJ2USO524VVU', '283d4f58-3a75-47ad-bf9c-de04c9e9a80a', '9876543210', false, false, NULL, true, 0, 0, '2024-05-03 03:51:44.770234-07', NULL, NULL), -(200, 999, 'company-admin@example.com', 'COMPANY-ADMIN@EXAMPLE.COM', 'company-admin@example.com', 'COMPANY-ADMIN@EXAMPLE.COM', true, 'AQAAAAIAAYagAAAAEIDoeTRLrGQvn8FRF2EXGdQ5GtreAkKzZcbl1BTD6xNNzUXrGkn6BCPp05RxjIH2lQ==', '2XTX6Z5RVMLHRXNWIMW3UJ2USO524VVU', '283d4f58-3a75-47ad-bf9c-de04c9e9a80a', '9876543211', false, false, NULL, true, 0, 0, '2024-05-03 03:51:44.770234-07', NULL, NULL), -(300, 999, 'employee@example.com', 'EMPLOYEE@EXAMPLE.COM', 'employee@example.com', 'EMPLOYEE@EXAMPLE.COM', true, 'AQAAAAIAAYagAAAAEIDoeTRLrGQvn8FRF2EXGdQ5GtreAkKzZcbl1BTD6xNNzUXrGkn6BCPp05RxjIH2lQ==', '2XTX6Z5RVMLHRXNWIMW3UJ2USO524VVU', '283d4f58-3a75-47ad-bf9c-de04c9e9a80a', '9876543212', false, false, NULL, true, 0, 0, '2024-05-03 03:51:44.770234-07', NULL, NULL); +(100, 'super-admin@example.com', 'SUPER-ADMIN@EXAMPLE.COM', 'super-admin@example.com', 'SUPER-ADMIN@EXAMPLE.COM', true, 'AQAAAAIAAYagAAAAEIDoeTRLrGQvn8FRF2EXGdQ5GtreAkKzZcbl1BTD6xNNzUXrGkn6BCPp05RxjIH2lQ==', '2XTX6Z5RVMLHRXNWIMW3UJ2USO524VVU', '283d4f58-3a75-47ad-bf9c-de04c9e9a80a', '9876543210', false, false, NULL, true, 0, 0, '2024-05-03 03:51:44.770234-07', NULL, NULL), +(200, 'company-admin@example.com', 'COMPANY-ADMIN@EXAMPLE.COM', 'company-admin@example.com', 'COMPANY-ADMIN@EXAMPLE.COM', true, 'AQAAAAIAAYagAAAAEIDoeTRLrGQvn8FRF2EXGdQ5GtreAkKzZcbl1BTD6xNNzUXrGkn6BCPp05RxjIH2lQ==', '2XTX6Z5RVMLHRXNWIMW3UJ2USO524VVU', '283d4f58-3a75-47ad-bf9c-de04c9e9a80a', '9876543211', false, false, NULL, true, 0, 0, '2024-05-03 03:51:44.770234-07', NULL, NULL), +(300, 'employee@example.com', 'EMPLOYEE@EXAMPLE.COM', 'employee@example.com', 'EMPLOYEE@EXAMPLE.COM', true, 'AQAAAAIAAYagAAAAEIDoeTRLrGQvn8FRF2EXGdQ5GtreAkKzZcbl1BTD6xNNzUXrGkn6BCPp05RxjIH2lQ==', '2XTX6Z5RVMLHRXNWIMW3UJ2USO524VVU', '283d4f58-3a75-47ad-bf9c-de04c9e9a80a', '9876543212', false, false, NULL, true, 0, 0, '2024-05-03 03:51:44.770234-07', NULL, NULL); INSERT INTO public.user_roles VALUES (100, 1, 0, '2024-05-03 03:31:32.227954-07', NULL, NULL); diff --git a/tests/Tests.Integration/Tests/Attendance/ClockOut.Should_Add_Data.received.json b/tests/Tests.Integration/Tests/Attendance/ClockOut.Should_Add_Data.received.json new file mode 100644 index 0000000..15e8619 --- /dev/null +++ b/tests/Tests.Integration/Tests/Attendance/ClockOut.Should_Add_Data.received.json @@ -0,0 +1 @@ +false \ No newline at end of file diff --git a/tests/Tests.Integration/Tests/Attendance/GetAttendance.Should_Return_Data_For_Date_Filter.received.json b/tests/Tests.Integration/Tests/Attendance/GetAttendance.Should_Return_Data_For_Date_Filter.received.json new file mode 100644 index 0000000..ad47dbb --- /dev/null +++ b/tests/Tests.Integration/Tests/Attendance/GetAttendance.Should_Return_Data_For_Date_Filter.received.json @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/tests/Tests.Integration/Tests/Attendance/GetAttendance.Should_Return_Data_For_Month_Filter.received.json b/tests/Tests.Integration/Tests/Attendance/GetAttendance.Should_Return_Data_For_Month_Filter.received.json new file mode 100644 index 0000000..ad47dbb --- /dev/null +++ b/tests/Tests.Integration/Tests/Attendance/GetAttendance.Should_Return_Data_For_Month_Filter.received.json @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/tests/Tests.Integration/Tests/AttendanceRegularizations/ApproveAttendanceRegularization.Should_Set_Data_When_Clock_Out_Is_Missing.received.json b/tests/Tests.Integration/Tests/AttendanceRegularizations/ApproveAttendanceRegularization.Should_Set_Data_When_Clock_Out_Is_Missing.received.json new file mode 100644 index 0000000..15e8619 --- /dev/null +++ b/tests/Tests.Integration/Tests/AttendanceRegularizations/ApproveAttendanceRegularization.Should_Set_Data_When_Clock_Out_Is_Missing.received.json @@ -0,0 +1 @@ +false \ No newline at end of file diff --git a/tests/Tests.Integration/Tests/AttendanceRegularizations/GetRegularizations.Should_Return_Data_Of_Other_Employee_For_Company_Admin.received.json b/tests/Tests.Integration/Tests/AttendanceRegularizations/GetRegularizations.Should_Return_Data_Of_Other_Employee_For_Company_Admin.received.json new file mode 100644 index 0000000..d001279 --- /dev/null +++ b/tests/Tests.Integration/Tests/AttendanceRegularizations/GetRegularizations.Should_Return_Data_Of_Other_Employee_For_Company_Admin.received.json @@ -0,0 +1,6 @@ +{ + "page": 1, + "limit": 10, + "total": 0, + "items": [] +} \ No newline at end of file diff --git a/tests/Tests.Integration/Tests/AttendanceRegularizations/GetRegularizations.Should_Return_Own_Employee_Data_For_Employee.received.json b/tests/Tests.Integration/Tests/AttendanceRegularizations/GetRegularizations.Should_Return_Own_Employee_Data_For_Employee.received.json new file mode 100644 index 0000000..d001279 --- /dev/null +++ b/tests/Tests.Integration/Tests/AttendanceRegularizations/GetRegularizations.Should_Return_Own_Employee_Data_For_Employee.received.json @@ -0,0 +1,6 @@ +{ + "page": 1, + "limit": 10, + "total": 0, + "items": [] +} \ No newline at end of file diff --git a/tests/Tests.Integration/Tests/Compensations/GetCompensations.Should_Return_Data_Of_Other_Employee_For_Company_Admin.received.json b/tests/Tests.Integration/Tests/Compensations/GetCompensations.Should_Return_Data_Of_Other_Employee_For_Company_Admin.received.json new file mode 100644 index 0000000..ad47dbb --- /dev/null +++ b/tests/Tests.Integration/Tests/Compensations/GetCompensations.Should_Return_Data_Of_Other_Employee_For_Company_Admin.received.json @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/tests/Tests.Integration/Tests/Compensations/GetCompensations.Should_Return_Data_Of_Own_Employee.received.json b/tests/Tests.Integration/Tests/Compensations/GetCompensations.Should_Return_Data_Of_Own_Employee.received.json new file mode 100644 index 0000000..ad47dbb --- /dev/null +++ b/tests/Tests.Integration/Tests/Compensations/GetCompensations.Should_Return_Data_Of_Own_Employee.received.json @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/tests/Tests.Integration/Tests/Departments/AddDeparment.Should_Return_Data.received.json b/tests/Tests.Integration/Tests/Departments/AddDeparment.Should_Return_Data.received.json new file mode 100644 index 0000000..ca21c18 --- /dev/null +++ b/tests/Tests.Integration/Tests/Departments/AddDeparment.Should_Return_Data.received.json @@ -0,0 +1 @@ +"Sequence contains no elements.\r\n at Microsoft.EntityFrameworkCore.Query.ShapedQueryCompilingExpressionVisitor.SingleAsync[TSource](IAsyncEnumerable`1 asyncEnumerable, CancellationToken cancellationToken)\r\n at Microsoft.EntityFrameworkCore.Query.ShapedQueryCompilingExpressionVisitor.SingleAsync[TSource](IAsyncEnumerable`1 asyncEnumerable, CancellationToken cancellationToken)\r\n at Application.Departments.Commands.AddDepartmentCommand.Handler.Handle(AddDepartmentCommand request, CancellationToken cancellationToken) in D:\\personal\\bit-hrms\\src\\Application\\Departments\\Commands\\AddDepartmentCommand.cs:line 22\r\n at Application.Common.MediatRBehaviour.ValidationBehaviour`2.Handle(TRequest request, RequestHandlerDelegate`1 next, CancellationToken cancellationToken) in D:\\personal\\bit-hrms\\src\\Application\\Common\\MediatRBehaviour\\ValidationBehaviour.cs:line 28\r\n at Application.Common.MediatRBehaviour.TrimmingBehaviour`2.Handle(TRequest request, RequestHandlerDelegate`1 next, CancellationToken cancellationToken) in D:\\personal\\bit-hrms\\src\\Application\\Common\\MediatRBehaviour\\TrimmingBehaviour.cs:line 21\r\n at Application.Common.MediatRBehaviour.AuthorizationBehaviour`2.Handle(TRequest request, RequestHandlerDelegate`1 next, CancellationToken cancellationToken) in D:\\personal\\bit-hrms\\src\\Application\\Common\\MediatRBehaviour\\AuthorizationBehaviour.cs:line 17\r\n at Presentation.Controllers.DepartmentsController.AddAsync(AddDepartmentCommand command) in D:\\personal\\bit-hrms\\src\\Presentation.Server\\Controllers\\DepartmentsController.cs:line 18\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.TaskOfIActionResultExecutor.Execute(ActionContext actionContext, IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.g__Awaited|12_0(ControllerActionInvoker invoker, ValueTask`1 actionResultValueTask)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.g__Awaited|10_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.g__Awaited|13_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.g__Awaited|25_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Rethrow(ResourceExecutedContextSealed context)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.g__Awaited|20_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.g__Logged|17_1(ResourceInvoker invoker)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.g__Logged|17_1(ResourceInvoker invoker)\r\n at Microsoft.AspNetCore.Routing.EndpointMiddleware.g__AwaitRequestTask|7_0(Endpoint endpoint, Task requestTask, ILogger logger)\r\n at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context)\r\n at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)\r\n at Swashbuckle.AspNetCore.SwaggerUI.SwaggerUIMiddleware.Invoke(HttpContext httpContext)\r\n at Swashbuckle.AspNetCore.Swagger.SwaggerMiddleware.Invoke(HttpContext httpContext, ISwaggerProvider swaggerProvider)\r\n at Serilog.AspNetCore.RequestLoggingMiddleware.Invoke(HttpContext httpContext)\r\n at Presentation.Middleware.ExceptionHandlingMiddleware.InvokeAsync(HttpContext context) in D:\\personal\\bit-hrms\\src\\Presentation.Server\\Middleware\\ExceptionHandlingMiddleware.cs:line 17" \ No newline at end of file diff --git a/tests/Tests.Integration/Tests/Departments/GetDeparments.Should_Return_Data.received.json b/tests/Tests.Integration/Tests/Departments/GetDeparments.Should_Return_Data.received.json new file mode 100644 index 0000000..d001279 --- /dev/null +++ b/tests/Tests.Integration/Tests/Departments/GetDeparments.Should_Return_Data.received.json @@ -0,0 +1,6 @@ +{ + "page": 1, + "limit": 10, + "total": 0, + "items": [] +} \ No newline at end of file diff --git a/tests/Tests.Integration/Tests/Departments/UpdateDepartment.Should_Return_Data.received.json b/tests/Tests.Integration/Tests/Departments/UpdateDepartment.Should_Return_Data.received.json new file mode 100644 index 0000000..332c956 --- /dev/null +++ b/tests/Tests.Integration/Tests/Departments/UpdateDepartment.Should_Return_Data.received.json @@ -0,0 +1 @@ +"Sequence contains no elements.\r\n at Microsoft.EntityFrameworkCore.Query.ShapedQueryCompilingExpressionVisitor.SingleAsync[TSource](IAsyncEnumerable`1 asyncEnumerable, CancellationToken cancellationToken)\r\n at Microsoft.EntityFrameworkCore.Query.ShapedQueryCompilingExpressionVisitor.SingleAsync[TSource](IAsyncEnumerable`1 asyncEnumerable, CancellationToken cancellationToken)\r\n at Application.Departments.Commands.UpdateDepartmentCommand.Handler.Handle(UpdateDepartmentCommand request, CancellationToken cancellationToken) in D:\\personal\\bit-hrms\\src\\Application\\Departments\\Commands\\UpdateDepartmentCommand.cs:line 28\r\n at Application.Common.MediatRBehaviour.ValidationBehaviour`2.Handle(TRequest request, RequestHandlerDelegate`1 next, CancellationToken cancellationToken) in D:\\personal\\bit-hrms\\src\\Application\\Common\\MediatRBehaviour\\ValidationBehaviour.cs:line 28\r\n at Application.Common.MediatRBehaviour.TrimmingBehaviour`2.Handle(TRequest request, RequestHandlerDelegate`1 next, CancellationToken cancellationToken) in D:\\personal\\bit-hrms\\src\\Application\\Common\\MediatRBehaviour\\TrimmingBehaviour.cs:line 21\r\n at Application.Common.MediatRBehaviour.AuthorizationBehaviour`2.Handle(TRequest request, RequestHandlerDelegate`1 next, CancellationToken cancellationToken) in D:\\personal\\bit-hrms\\src\\Application\\Common\\MediatRBehaviour\\AuthorizationBehaviour.cs:line 17\r\n at Presentation.Controllers.DepartmentsController.UpdateAsync(Int32 departmentId, UpdateDepartmentCommand command) in D:\\personal\\bit-hrms\\src\\Presentation.Server\\Controllers\\DepartmentsController.cs:line 26\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.TaskOfIActionResultExecutor.Execute(ActionContext actionContext, IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.g__Awaited|12_0(ControllerActionInvoker invoker, ValueTask`1 actionResultValueTask)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.g__Awaited|10_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.g__Awaited|13_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.g__Awaited|25_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Rethrow(ResourceExecutedContextSealed context)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.g__Awaited|20_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.g__Logged|17_1(ResourceInvoker invoker)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.g__Logged|17_1(ResourceInvoker invoker)\r\n at Microsoft.AspNetCore.Routing.EndpointMiddleware.g__AwaitRequestTask|7_0(Endpoint endpoint, Task requestTask, ILogger logger)\r\n at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context)\r\n at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)\r\n at Swashbuckle.AspNetCore.SwaggerUI.SwaggerUIMiddleware.Invoke(HttpContext httpContext)\r\n at Swashbuckle.AspNetCore.Swagger.SwaggerMiddleware.Invoke(HttpContext httpContext, ISwaggerProvider swaggerProvider)\r\n at Serilog.AspNetCore.RequestLoggingMiddleware.Invoke(HttpContext httpContext)\r\n at Presentation.Middleware.ExceptionHandlingMiddleware.InvokeAsync(HttpContext context) in D:\\personal\\bit-hrms\\src\\Presentation.Server\\Middleware\\ExceptionHandlingMiddleware.cs:line 17" \ No newline at end of file diff --git a/tests/Tests.Integration/Tests/EmployeeLeaves/GetAllEmployeeLeaves.Should_Return_Data.received.json b/tests/Tests.Integration/Tests/EmployeeLeaves/GetAllEmployeeLeaves.Should_Return_Data.received.json new file mode 100644 index 0000000..d001279 --- /dev/null +++ b/tests/Tests.Integration/Tests/EmployeeLeaves/GetAllEmployeeLeaves.Should_Return_Data.received.json @@ -0,0 +1,6 @@ +{ + "page": 1, + "limit": 10, + "total": 0, + "items": [] +} \ No newline at end of file diff --git a/tests/Tests.Integration/Tests/Employees/AddEmployee.Should_Return_Data.received.json b/tests/Tests.Integration/Tests/Employees/AddEmployee.Should_Return_Data.received.json new file mode 100644 index 0000000..fa4c4e9 --- /dev/null +++ b/tests/Tests.Integration/Tests/Employees/AddEmployee.Should_Return_Data.received.json @@ -0,0 +1 @@ +"Sequence contains no elements.\r\n at Microsoft.EntityFrameworkCore.Query.ShapedQueryCompilingExpressionVisitor.SingleAsync[TSource](IAsyncEnumerable`1 asyncEnumerable, CancellationToken cancellationToken)\r\n at Microsoft.EntityFrameworkCore.Query.ShapedQueryCompilingExpressionVisitor.SingleAsync[TSource](IAsyncEnumerable`1 asyncEnumerable, CancellationToken cancellationToken)\r\n at Application.Users.Commands.AddUserCommand.Handler.CreateUserAsync(AddUserCommand request, CancellationToken cancellationToken) in D:\\personal\\bit-hrms\\src\\Application\\Users\\Commands\\AddUserCommand.cs:line 49\r\n at Application.Users.Commands.AddUserCommand.Handler.Handle(AddUserCommand request, CancellationToken cancellationToken) in D:\\personal\\bit-hrms\\src\\Application\\Users\\Commands\\AddUserCommand.cs:line 29\r\n at Application.Common.MediatRBehaviour.ValidationBehaviour`2.Handle(TRequest request, RequestHandlerDelegate`1 next, CancellationToken cancellationToken) in D:\\personal\\bit-hrms\\src\\Application\\Common\\MediatRBehaviour\\ValidationBehaviour.cs:line 28\r\n at Application.Common.MediatRBehaviour.TrimmingBehaviour`2.Handle(TRequest request, RequestHandlerDelegate`1 next, CancellationToken cancellationToken) in D:\\personal\\bit-hrms\\src\\Application\\Common\\MediatRBehaviour\\TrimmingBehaviour.cs:line 21\r\n at Application.Common.MediatRBehaviour.AuthorizationBehaviour`2.Handle(TRequest request, RequestHandlerDelegate`1 next, CancellationToken cancellationToken) in D:\\personal\\bit-hrms\\src\\Application\\Common\\MediatRBehaviour\\AuthorizationBehaviour.cs:line 17\r\n at Application.Employees.Commands.AddEmployeeCommand.Handler.Handle(AddEmployeeCommand request, CancellationToken cancellationToken) in D:\\personal\\bit-hrms\\src\\Application\\Employees\\Commands\\AddEmployeeCommand.cs:line 105\r\n at Application.Employees.Commands.AddEmployeeCommand.Handler.Handle(AddEmployeeCommand request, CancellationToken cancellationToken) in D:\\personal\\bit-hrms\\src\\Application\\Employees\\Commands\\AddEmployeeCommand.cs:line 134\r\n at Application.Common.MediatRBehaviour.ValidationBehaviour`2.Handle(TRequest request, RequestHandlerDelegate`1 next, CancellationToken cancellationToken) in D:\\personal\\bit-hrms\\src\\Application\\Common\\MediatRBehaviour\\ValidationBehaviour.cs:line 28\r\n at Application.Common.MediatRBehaviour.TrimmingBehaviour`2.Handle(TRequest request, RequestHandlerDelegate`1 next, CancellationToken cancellationToken) in D:\\personal\\bit-hrms\\src\\Application\\Common\\MediatRBehaviour\\TrimmingBehaviour.cs:line 21\r\n at Application.Common.MediatRBehaviour.AuthorizationBehaviour`2.Handle(TRequest request, RequestHandlerDelegate`1 next, CancellationToken cancellationToken) in D:\\personal\\bit-hrms\\src\\Application\\Common\\MediatRBehaviour\\AuthorizationBehaviour.cs:line 17\r\n at Presentation.Controllers.EmployeesController.AddAsync(AddEmployeeCommand command) in D:\\personal\\bit-hrms\\src\\Presentation.Server\\Controllers\\EmployeesController.cs:line 12\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.TaskOfIActionResultExecutor.Execute(ActionContext actionContext, IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.g__Awaited|12_0(ControllerActionInvoker invoker, ValueTask`1 actionResultValueTask)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.g__Awaited|10_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.g__Awaited|13_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.g__Awaited|25_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Rethrow(ResourceExecutedContextSealed context)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.g__Awaited|20_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.g__Logged|17_1(ResourceInvoker invoker)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.g__Logged|17_1(ResourceInvoker invoker)\r\n at Microsoft.AspNetCore.Routing.EndpointMiddleware.g__AwaitRequestTask|7_0(Endpoint endpoint, Task requestTask, ILogger logger)\r\n at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context)\r\n at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)\r\n at Swashbuckle.AspNetCore.SwaggerUI.SwaggerUIMiddleware.Invoke(HttpContext httpContext)\r\n at Swashbuckle.AspNetCore.Swagger.SwaggerMiddleware.Invoke(HttpContext httpContext, ISwaggerProvider swaggerProvider)\r\n at Serilog.AspNetCore.RequestLoggingMiddleware.Invoke(HttpContext httpContext)\r\n at Presentation.Middleware.ExceptionHandlingMiddleware.InvokeAsync(HttpContext context) in D:\\personal\\bit-hrms\\src\\Presentation.Server\\Middleware\\ExceptionHandlingMiddleware.cs:line 17" \ No newline at end of file diff --git a/tests/Tests.Integration/Tests/Employees/GetEmployees.Should_Return_Data.received.json b/tests/Tests.Integration/Tests/Employees/GetEmployees.Should_Return_Data.received.json new file mode 100644 index 0000000..d001279 --- /dev/null +++ b/tests/Tests.Integration/Tests/Employees/GetEmployees.Should_Return_Data.received.json @@ -0,0 +1,6 @@ +{ + "page": 1, + "limit": 10, + "total": 0, + "items": [] +} \ No newline at end of file diff --git a/tests/Tests.Integration/Tests/Employees/UpdateEmployeeDocumnet.Should_Return_Data.received.json b/tests/Tests.Integration/Tests/Employees/UpdateEmployeeDocumnet.Should_Return_Data.received.json new file mode 100644 index 0000000..b55761c --- /dev/null +++ b/tests/Tests.Integration/Tests/Employees/UpdateEmployeeDocumnet.Should_Return_Data.received.json @@ -0,0 +1 @@ +"Sequence contains no elements.\r\n at Microsoft.EntityFrameworkCore.Query.ShapedQueryCompilingExpressionVisitor.SingleAsync[TSource](IAsyncEnumerable`1 asyncEnumerable, CancellationToken cancellationToken)\r\n at Microsoft.EntityFrameworkCore.Query.ShapedQueryCompilingExpressionVisitor.SingleAsync[TSource](IAsyncEnumerable`1 asyncEnumerable, CancellationToken cancellationToken)\r\n at Application.Employees.Commands.SetEmployeeDocumentCommand.Handler.Handle(SetEmployeeDocumentCommand request, CancellationToken cancellationToken) in D:\\personal\\bit-hrms\\src\\Application\\Employees\\Commands\\SetEmployeeDocumentCommand.cs:line 33\r\n at Application.Common.MediatRBehaviour.ValidationBehaviour`2.Handle(TRequest request, RequestHandlerDelegate`1 next, CancellationToken cancellationToken) in D:\\personal\\bit-hrms\\src\\Application\\Common\\MediatRBehaviour\\ValidationBehaviour.cs:line 28\r\n at Application.Common.MediatRBehaviour.TrimmingBehaviour`2.Handle(TRequest request, RequestHandlerDelegate`1 next, CancellationToken cancellationToken) in D:\\personal\\bit-hrms\\src\\Application\\Common\\MediatRBehaviour\\TrimmingBehaviour.cs:line 21\r\n at Application.Common.MediatRBehaviour.AuthorizationBehaviour`2.Handle(TRequest request, RequestHandlerDelegate`1 next, CancellationToken cancellationToken) in D:\\personal\\bit-hrms\\src\\Application\\Common\\MediatRBehaviour\\AuthorizationBehaviour.cs:line 17\r\n at Presentation.Controllers.EmployeesController.UpdateAsync(Int32 employeeId, SetEmployeeDocumentCommand command) in D:\\personal\\bit-hrms\\src\\Presentation.Server\\Controllers\\EmployeesController.cs:line 38\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.TaskOfIActionResultExecutor.Execute(ActionContext actionContext, IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.g__Awaited|12_0(ControllerActionInvoker invoker, ValueTask`1 actionResultValueTask)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.g__Awaited|10_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.g__Awaited|13_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.g__Awaited|25_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Rethrow(ResourceExecutedContextSealed context)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.g__Awaited|20_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.g__Logged|17_1(ResourceInvoker invoker)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.g__Logged|17_1(ResourceInvoker invoker)\r\n at Microsoft.AspNetCore.Routing.EndpointMiddleware.g__AwaitRequestTask|7_0(Endpoint endpoint, Task requestTask, ILogger logger)\r\n at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context)\r\n at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)\r\n at Swashbuckle.AspNetCore.SwaggerUI.SwaggerUIMiddleware.Invoke(HttpContext httpContext)\r\n at Swashbuckle.AspNetCore.Swagger.SwaggerMiddleware.Invoke(HttpContext httpContext, ISwaggerProvider swaggerProvider)\r\n at Serilog.AspNetCore.RequestLoggingMiddleware.Invoke(HttpContext httpContext)\r\n at Presentation.Middleware.ExceptionHandlingMiddleware.InvokeAsync(HttpContext context) in D:\\personal\\bit-hrms\\src\\Presentation.Server\\Middleware\\ExceptionHandlingMiddleware.cs:line 17" \ No newline at end of file diff --git a/tests/Tests.Integration/Tests/Expenses/GetExpenses.Should_return_expenses.received.json b/tests/Tests.Integration/Tests/Expenses/GetExpenses.Should_return_expenses.received.json new file mode 100644 index 0000000..d001279 --- /dev/null +++ b/tests/Tests.Integration/Tests/Expenses/GetExpenses.Should_return_expenses.received.json @@ -0,0 +1,6 @@ +{ + "page": 1, + "limit": 10, + "total": 0, + "items": [] +} \ No newline at end of file diff --git a/tests/Tests.Integration/Tests/Holidays/AddHoliday.Should_Return_Data.received.json b/tests/Tests.Integration/Tests/Holidays/AddHoliday.Should_Return_Data.received.json new file mode 100644 index 0000000..b8075a0 --- /dev/null +++ b/tests/Tests.Integration/Tests/Holidays/AddHoliday.Should_Return_Data.received.json @@ -0,0 +1 @@ +"Sequence contains no elements.\r\n at Microsoft.EntityFrameworkCore.Query.ShapedQueryCompilingExpressionVisitor.SingleAsync[TSource](IAsyncEnumerable`1 asyncEnumerable, CancellationToken cancellationToken)\r\n at Microsoft.EntityFrameworkCore.Query.ShapedQueryCompilingExpressionVisitor.SingleAsync[TSource](IAsyncEnumerable`1 asyncEnumerable, CancellationToken cancellationToken)\r\n at Application.Holidays.Commands.AddHolidayCommand.Handler.Handle(AddHolidayCommand request, CancellationToken cancellationToken) in D:\\personal\\bit-hrms\\src\\Application\\Holidays\\Commands\\AddHolidayCommand.cs:line 25\r\n at Application.Common.MediatRBehaviour.ValidationBehaviour`2.Handle(TRequest request, RequestHandlerDelegate`1 next, CancellationToken cancellationToken) in D:\\personal\\bit-hrms\\src\\Application\\Common\\MediatRBehaviour\\ValidationBehaviour.cs:line 28\r\n at Application.Common.MediatRBehaviour.TrimmingBehaviour`2.Handle(TRequest request, RequestHandlerDelegate`1 next, CancellationToken cancellationToken) in D:\\personal\\bit-hrms\\src\\Application\\Common\\MediatRBehaviour\\TrimmingBehaviour.cs:line 21\r\n at Application.Common.MediatRBehaviour.AuthorizationBehaviour`2.Handle(TRequest request, RequestHandlerDelegate`1 next, CancellationToken cancellationToken) in D:\\personal\\bit-hrms\\src\\Application\\Common\\MediatRBehaviour\\AuthorizationBehaviour.cs:line 17\r\n at Presentation.Controllers.HolidaysController.AddAsync(AddHolidayCommand command) in D:\\personal\\bit-hrms\\src\\Presentation.Server\\Controllers\\HolidaysController.cs:line 19\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.TaskOfIActionResultExecutor.Execute(ActionContext actionContext, IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.g__Awaited|12_0(ControllerActionInvoker invoker, ValueTask`1 actionResultValueTask)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.g__Awaited|10_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.g__Awaited|13_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.g__Awaited|25_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Rethrow(ResourceExecutedContextSealed context)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.g__Awaited|20_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.g__Logged|17_1(ResourceInvoker invoker)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.g__Logged|17_1(ResourceInvoker invoker)\r\n at Microsoft.AspNetCore.Routing.EndpointMiddleware.g__AwaitRequestTask|7_0(Endpoint endpoint, Task requestTask, ILogger logger)\r\n at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context)\r\n at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)\r\n at Swashbuckle.AspNetCore.SwaggerUI.SwaggerUIMiddleware.Invoke(HttpContext httpContext)\r\n at Swashbuckle.AspNetCore.Swagger.SwaggerMiddleware.Invoke(HttpContext httpContext, ISwaggerProvider swaggerProvider)\r\n at Serilog.AspNetCore.RequestLoggingMiddleware.Invoke(HttpContext httpContext)\r\n at Presentation.Middleware.ExceptionHandlingMiddleware.InvokeAsync(HttpContext context) in D:\\personal\\bit-hrms\\src\\Presentation.Server\\Middleware\\ExceptionHandlingMiddleware.cs:line 17" \ No newline at end of file diff --git a/tests/Tests.Integration/Tests/Holidays/GetHolidays.Should_Return_Data.received.json b/tests/Tests.Integration/Tests/Holidays/GetHolidays.Should_Return_Data.received.json new file mode 100644 index 0000000..d001279 --- /dev/null +++ b/tests/Tests.Integration/Tests/Holidays/GetHolidays.Should_Return_Data.received.json @@ -0,0 +1,6 @@ +{ + "page": 1, + "limit": 10, + "total": 0, + "items": [] +} \ No newline at end of file diff --git a/tests/Tests.Integration/Tests/Holidays/UpdateHoliday.Should_Return_Data.received.json b/tests/Tests.Integration/Tests/Holidays/UpdateHoliday.Should_Return_Data.received.json new file mode 100644 index 0000000..0ac85b7 --- /dev/null +++ b/tests/Tests.Integration/Tests/Holidays/UpdateHoliday.Should_Return_Data.received.json @@ -0,0 +1 @@ +"Sequence contains no elements.\r\n at Microsoft.EntityFrameworkCore.Query.ShapedQueryCompilingExpressionVisitor.SingleAsync[TSource](IAsyncEnumerable\u00601 asyncEnumerable, CancellationToken cancellationToken)\r\n at Microsoft.EntityFrameworkCore.Query.ShapedQueryCompilingExpressionVisitor.SingleAsync[TSource](IAsyncEnumerable\u00601 asyncEnumerable, CancellationToken cancellationToken)\r\n at Application.Holidays.Commands.UpdateHolidayCommand.Handler.Handle(UpdateHolidayCommand request, CancellationToken cancellationToken) in D:\\personal\\bit-hrms\\src\\Application\\Holidays\\Commands\\UpdateHolidayCommand.cs:line 31\r\n at Application.Common.MediatRBehaviour.ValidationBehaviour\u00602.Handle(TRequest request, RequestHandlerDelegate\u00601 next, CancellationToken cancellationToken) in D:\\personal\\bit-hrms\\src\\Application\\Common\\MediatRBehaviour\\ValidationBehaviour.cs:line 28\r\n at Application.Common.MediatRBehaviour.TrimmingBehaviour\u00602.Handle(TRequest request, RequestHandlerDelegate\u00601 next, CancellationToken cancellationToken) in D:\\personal\\bit-hrms\\src\\Application\\Common\\MediatRBehaviour\\TrimmingBehaviour.cs:line 21\r\n at Application.Common.MediatRBehaviour.AuthorizationBehaviour\u00602.Handle(TRequest request, RequestHandlerDelegate\u00601 next, CancellationToken cancellationToken) in D:\\personal\\bit-hrms\\src\\Application\\Common\\MediatRBehaviour\\AuthorizationBehaviour.cs:line 17\r\n at Presentation.Controllers.HolidaysController.UpdateAsync(Int32 holidayId, UpdateHolidayCommand command) in D:\\personal\\bit-hrms\\src\\Presentation.Server\\Controllers\\HolidaysController.cs:line 31\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.TaskOfIActionResultExecutor.Execute(ActionContext actionContext, IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.\u003CInvokeActionMethodAsync\u003Eg__Awaited|12_0(ControllerActionInvoker invoker, ValueTask\u00601 actionResultValueTask)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.\u003CInvokeNextActionFilterAsync\u003Eg__Awaited|10_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State\u0026 next, Scope\u0026 scope, Object\u0026 state, Boolean\u0026 isCompleted)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.\u003CInvokeInnerFilterAsync\u003Eg__Awaited|13_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.\u003CInvokeNextResourceFilter\u003Eg__Awaited|25_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Rethrow(ResourceExecutedContextSealed context)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Next(State\u0026 next, Scope\u0026 scope, Object\u0026 state, Boolean\u0026 isCompleted)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.\u003CInvokeFilterPipelineAsync\u003Eg__Awaited|20_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.\u003CInvokeAsync\u003Eg__Logged|17_1(ResourceInvoker invoker)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.\u003CInvokeAsync\u003Eg__Logged|17_1(ResourceInvoker invoker)\r\n at Microsoft.AspNetCore.Routing.EndpointMiddleware.\u003CInvoke\u003Eg__AwaitRequestTask|7_0(Endpoint endpoint, Task requestTask, ILogger logger)\r\n at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context)\r\n at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)\r\n at Swashbuckle.AspNetCore.SwaggerUI.SwaggerUIMiddleware.Invoke(HttpContext httpContext)\r\n at Swashbuckle.AspNetCore.Swagger.SwaggerMiddleware.Invoke(HttpContext httpContext, ISwaggerProvider swaggerProvider)\r\n at Serilog.AspNetCore.RequestLoggingMiddleware.Invoke(HttpContext httpContext)\r\n at Presentation.Middleware.ExceptionHandlingMiddleware.InvokeAsync(HttpContext context) in D:\\personal\\bit-hrms\\src\\Presentation.Server\\Middleware\\ExceptionHandlingMiddleware.cs:line 17" \ No newline at end of file diff --git a/tests/Tests.Integration/Tests/IncomeSources/GetIncomeSources.Should_Return_Income_Sources.received.json b/tests/Tests.Integration/Tests/IncomeSources/GetIncomeSources.Should_Return_Income_Sources.received.json new file mode 100644 index 0000000..d001279 --- /dev/null +++ b/tests/Tests.Integration/Tests/IncomeSources/GetIncomeSources.Should_Return_Income_Sources.received.json @@ -0,0 +1,6 @@ +{ + "page": 1, + "limit": 10, + "total": 0, + "items": [] +} \ No newline at end of file diff --git a/tests/Tests.Integration/Tests/Incomes/GetIncomes.Should_return_data.received.json b/tests/Tests.Integration/Tests/Incomes/GetIncomes.Should_return_data.received.json new file mode 100644 index 0000000..d001279 --- /dev/null +++ b/tests/Tests.Integration/Tests/Incomes/GetIncomes.Should_return_data.received.json @@ -0,0 +1,6 @@ +{ + "page": 1, + "limit": 10, + "total": 0, + "items": [] +} \ No newline at end of file diff --git a/tests/Tests.Integration/Tests/JobTitles/AddJobTitle.Should_Return_Data.received.json b/tests/Tests.Integration/Tests/JobTitles/AddJobTitle.Should_Return_Data.received.json new file mode 100644 index 0000000..043c87f --- /dev/null +++ b/tests/Tests.Integration/Tests/JobTitles/AddJobTitle.Should_Return_Data.received.json @@ -0,0 +1 @@ +"Sequence contains no elements.\r\n at Microsoft.EntityFrameworkCore.Query.ShapedQueryCompilingExpressionVisitor.SingleAsync[TSource](IAsyncEnumerable`1 asyncEnumerable, CancellationToken cancellationToken)\r\n at Microsoft.EntityFrameworkCore.Query.ShapedQueryCompilingExpressionVisitor.SingleAsync[TSource](IAsyncEnumerable`1 asyncEnumerable, CancellationToken cancellationToken)\r\n at Application.JobTitles.Commands.AddJobTitleCommand.Handler.Handle(AddJobTitleCommand request, CancellationToken cancellationToken) in D:\\personal\\bit-hrms\\src\\Application\\JobTitles\\Commands\\AddJobTitleCommand.cs:line 26\r\n at Application.Common.MediatRBehaviour.ValidationBehaviour`2.Handle(TRequest request, RequestHandlerDelegate`1 next, CancellationToken cancellationToken) in D:\\personal\\bit-hrms\\src\\Application\\Common\\MediatRBehaviour\\ValidationBehaviour.cs:line 28\r\n at Application.Common.MediatRBehaviour.TrimmingBehaviour`2.Handle(TRequest request, RequestHandlerDelegate`1 next, CancellationToken cancellationToken) in D:\\personal\\bit-hrms\\src\\Application\\Common\\MediatRBehaviour\\TrimmingBehaviour.cs:line 21\r\n at Application.Common.MediatRBehaviour.AuthorizationBehaviour`2.Handle(TRequest request, RequestHandlerDelegate`1 next, CancellationToken cancellationToken) in D:\\personal\\bit-hrms\\src\\Application\\Common\\MediatRBehaviour\\AuthorizationBehaviour.cs:line 17\r\n at Presentation.Controllers.JobTitlesController.AddAsync(AddJobTitleCommand command) in D:\\personal\\bit-hrms\\src\\Presentation.Server\\Controllers\\JobTitlesController.cs:line 19\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.TaskOfIActionResultExecutor.Execute(ActionContext actionContext, IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.g__Awaited|12_0(ControllerActionInvoker invoker, ValueTask`1 actionResultValueTask)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.g__Awaited|10_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.g__Awaited|13_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.g__Awaited|25_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Rethrow(ResourceExecutedContextSealed context)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.g__Awaited|20_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.g__Logged|17_1(ResourceInvoker invoker)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.g__Logged|17_1(ResourceInvoker invoker)\r\n at Microsoft.AspNetCore.Routing.EndpointMiddleware.g__AwaitRequestTask|7_0(Endpoint endpoint, Task requestTask, ILogger logger)\r\n at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context)\r\n at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)\r\n at Swashbuckle.AspNetCore.SwaggerUI.SwaggerUIMiddleware.Invoke(HttpContext httpContext)\r\n at Swashbuckle.AspNetCore.Swagger.SwaggerMiddleware.Invoke(HttpContext httpContext, ISwaggerProvider swaggerProvider)\r\n at Serilog.AspNetCore.RequestLoggingMiddleware.Invoke(HttpContext httpContext)\r\n at Presentation.Middleware.ExceptionHandlingMiddleware.InvokeAsync(HttpContext context) in D:\\personal\\bit-hrms\\src\\Presentation.Server\\Middleware\\ExceptionHandlingMiddleware.cs:line 17" \ No newline at end of file diff --git a/tests/Tests.Integration/Tests/JobTitles/GetJobTitles.Should_Return_Data.received.json b/tests/Tests.Integration/Tests/JobTitles/GetJobTitles.Should_Return_Data.received.json new file mode 100644 index 0000000..d001279 --- /dev/null +++ b/tests/Tests.Integration/Tests/JobTitles/GetJobTitles.Should_Return_Data.received.json @@ -0,0 +1,6 @@ +{ + "page": 1, + "limit": 10, + "total": 0, + "items": [] +} \ No newline at end of file diff --git a/tests/Tests.Integration/Tests/JobTitles/UpdateJobTitle.Should_Return_Data.received.json b/tests/Tests.Integration/Tests/JobTitles/UpdateJobTitle.Should_Return_Data.received.json new file mode 100644 index 0000000..fd80137 --- /dev/null +++ b/tests/Tests.Integration/Tests/JobTitles/UpdateJobTitle.Should_Return_Data.received.json @@ -0,0 +1 @@ +"Sequence contains no elements.\r\n at Microsoft.EntityFrameworkCore.Query.ShapedQueryCompilingExpressionVisitor.SingleAsync[TSource](IAsyncEnumerable\u00601 asyncEnumerable, CancellationToken cancellationToken)\r\n at Microsoft.EntityFrameworkCore.Query.ShapedQueryCompilingExpressionVisitor.SingleAsync[TSource](IAsyncEnumerable\u00601 asyncEnumerable, CancellationToken cancellationToken)\r\n at Application.JobTitles.Commands.UpdateJobTitleCommand.Handler.Handle(UpdateJobTitleCommand request, CancellationToken cancellationToken) in D:\\personal\\bit-hrms\\src\\Application\\JobTitles\\Commands\\UpdateJobTitleCommand.cs:line 26\r\n at Application.Common.MediatRBehaviour.ValidationBehaviour\u00602.Handle(TRequest request, RequestHandlerDelegate\u00601 next, CancellationToken cancellationToken) in D:\\personal\\bit-hrms\\src\\Application\\Common\\MediatRBehaviour\\ValidationBehaviour.cs:line 28\r\n at Application.Common.MediatRBehaviour.TrimmingBehaviour\u00602.Handle(TRequest request, RequestHandlerDelegate\u00601 next, CancellationToken cancellationToken) in D:\\personal\\bit-hrms\\src\\Application\\Common\\MediatRBehaviour\\TrimmingBehaviour.cs:line 21\r\n at Application.Common.MediatRBehaviour.AuthorizationBehaviour\u00602.Handle(TRequest request, RequestHandlerDelegate\u00601 next, CancellationToken cancellationToken) in D:\\personal\\bit-hrms\\src\\Application\\Common\\MediatRBehaviour\\AuthorizationBehaviour.cs:line 17\r\n at Presentation.Controllers.JobTitlesController.UpdateAsync(Int32 jobTitleId, UpdateJobTitleCommand command) in D:\\personal\\bit-hrms\\src\\Presentation.Server\\Controllers\\JobTitlesController.cs:line 30\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.TaskOfIActionResultExecutor.Execute(ActionContext actionContext, IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.\u003CInvokeActionMethodAsync\u003Eg__Awaited|12_0(ControllerActionInvoker invoker, ValueTask\u00601 actionResultValueTask)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.\u003CInvokeNextActionFilterAsync\u003Eg__Awaited|10_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State\u0026 next, Scope\u0026 scope, Object\u0026 state, Boolean\u0026 isCompleted)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.\u003CInvokeInnerFilterAsync\u003Eg__Awaited|13_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.\u003CInvokeNextResourceFilter\u003Eg__Awaited|25_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Rethrow(ResourceExecutedContextSealed context)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Next(State\u0026 next, Scope\u0026 scope, Object\u0026 state, Boolean\u0026 isCompleted)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.\u003CInvokeFilterPipelineAsync\u003Eg__Awaited|20_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.\u003CInvokeAsync\u003Eg__Logged|17_1(ResourceInvoker invoker)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.\u003CInvokeAsync\u003Eg__Logged|17_1(ResourceInvoker invoker)\r\n at Microsoft.AspNetCore.Routing.EndpointMiddleware.\u003CInvoke\u003Eg__AwaitRequestTask|7_0(Endpoint endpoint, Task requestTask, ILogger logger)\r\n at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context)\r\n at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)\r\n at Swashbuckle.AspNetCore.SwaggerUI.SwaggerUIMiddleware.Invoke(HttpContext httpContext)\r\n at Swashbuckle.AspNetCore.Swagger.SwaggerMiddleware.Invoke(HttpContext httpContext, ISwaggerProvider swaggerProvider)\r\n at Serilog.AspNetCore.RequestLoggingMiddleware.Invoke(HttpContext httpContext)\r\n at Presentation.Middleware.ExceptionHandlingMiddleware.InvokeAsync(HttpContext context) in D:\\personal\\bit-hrms\\src\\Presentation.Server\\Middleware\\ExceptionHandlingMiddleware.cs:line 17" \ No newline at end of file diff --git a/tests/Tests.Integration/Tests/LeavePolicy/UpdateLeavePolicy.Should_Return_Data.received.json b/tests/Tests.Integration/Tests/LeavePolicy/UpdateLeavePolicy.Should_Return_Data.received.json new file mode 100644 index 0000000..9ef5964 --- /dev/null +++ b/tests/Tests.Integration/Tests/LeavePolicy/UpdateLeavePolicy.Should_Return_Data.received.json @@ -0,0 +1 @@ +"Sequence contains no elements.\r\n at Microsoft.EntityFrameworkCore.Query.ShapedQueryCompilingExpressionVisitor.SingleAsync[TSource](IAsyncEnumerable\u00601 asyncEnumerable, CancellationToken cancellationToken)\r\n at Microsoft.EntityFrameworkCore.Query.ShapedQueryCompilingExpressionVisitor.SingleAsync[TSource](IAsyncEnumerable\u00601 asyncEnumerable, CancellationToken cancellationToken)\r\n at Application.LeavePolicies.Commands.SetLeavePolicy.SetLeavePolicyCommand.Handler.Handle(SetLeavePolicyCommand request, CancellationToken cancellationToken) in D:\\personal\\bit-hrms\\src\\Application\\LeavePolicies\\Commands\\SetLeavePolicy\\SetLeavePolicyCommand.cs:line 30\r\n at Application.Common.MediatRBehaviour.ValidationBehaviour\u00602.Handle(TRequest request, RequestHandlerDelegate\u00601 next, CancellationToken cancellationToken) in D:\\personal\\bit-hrms\\src\\Application\\Common\\MediatRBehaviour\\ValidationBehaviour.cs:line 28\r\n at Application.Common.MediatRBehaviour.TrimmingBehaviour\u00602.Handle(TRequest request, RequestHandlerDelegate\u00601 next, CancellationToken cancellationToken) in D:\\personal\\bit-hrms\\src\\Application\\Common\\MediatRBehaviour\\TrimmingBehaviour.cs:line 21\r\n at Application.Common.MediatRBehaviour.AuthorizationBehaviour\u00602.Handle(TRequest request, RequestHandlerDelegate\u00601 next, CancellationToken cancellationToken) in D:\\personal\\bit-hrms\\src\\Application\\Common\\MediatRBehaviour\\AuthorizationBehaviour.cs:line 17\r\n at Presentation.Controllers.LeavePolicyController.SetAsync(SetLeavePolicyCommand command) in D:\\personal\\bit-hrms\\src\\Presentation.Server\\Controllers\\LeavePolicyController.cs:line 20\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.TaskOfIActionResultExecutor.Execute(ActionContext actionContext, IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.\u003CInvokeActionMethodAsync\u003Eg__Awaited|12_0(ControllerActionInvoker invoker, ValueTask\u00601 actionResultValueTask)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.\u003CInvokeNextActionFilterAsync\u003Eg__Awaited|10_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State\u0026 next, Scope\u0026 scope, Object\u0026 state, Boolean\u0026 isCompleted)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.\u003CInvokeInnerFilterAsync\u003Eg__Awaited|13_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.\u003CInvokeNextResourceFilter\u003Eg__Awaited|25_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Rethrow(ResourceExecutedContextSealed context)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Next(State\u0026 next, Scope\u0026 scope, Object\u0026 state, Boolean\u0026 isCompleted)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.\u003CInvokeFilterPipelineAsync\u003Eg__Awaited|20_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.\u003CInvokeAsync\u003Eg__Logged|17_1(ResourceInvoker invoker)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.\u003CInvokeAsync\u003Eg__Logged|17_1(ResourceInvoker invoker)\r\n at Microsoft.AspNetCore.Routing.EndpointMiddleware.\u003CInvoke\u003Eg__AwaitRequestTask|7_0(Endpoint endpoint, Task requestTask, ILogger logger)\r\n at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context)\r\n at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)\r\n at Swashbuckle.AspNetCore.SwaggerUI.SwaggerUIMiddleware.Invoke(HttpContext httpContext)\r\n at Swashbuckle.AspNetCore.Swagger.SwaggerMiddleware.Invoke(HttpContext httpContext, ISwaggerProvider swaggerProvider)\r\n at Serilog.AspNetCore.RequestLoggingMiddleware.Invoke(HttpContext httpContext)\r\n at Presentation.Middleware.ExceptionHandlingMiddleware.InvokeAsync(HttpContext context) in D:\\personal\\bit-hrms\\src\\Presentation.Server\\Middleware\\ExceptionHandlingMiddleware.cs:line 17" \ No newline at end of file diff --git a/tests/Tests.Integration/Tests/Reports/GetAdminBasicReports.Should_Return_Data.received.json b/tests/Tests.Integration/Tests/Reports/GetAdminBasicReports.Should_Return_Data.received.json new file mode 100644 index 0000000..9213768 --- /dev/null +++ b/tests/Tests.Integration/Tests/Reports/GetAdminBasicReports.Should_Return_Data.received.json @@ -0,0 +1,6 @@ +{ + "departments": 0, + "companies": 0, + "employees": 0, + "holidays": 0 +} \ No newline at end of file diff --git a/tests/Tests.Integration/Tests/Salaries/GetEstimatedSalary.Should_Return_Data_For_Month_Filter.received.json b/tests/Tests.Integration/Tests/Salaries/GetEstimatedSalary.Should_Return_Data_For_Month_Filter.received.json new file mode 100644 index 0000000..92d542d --- /dev/null +++ b/tests/Tests.Integration/Tests/Salaries/GetEstimatedSalary.Should_Return_Data_For_Month_Filter.received.json @@ -0,0 +1,135 @@ +{ + "employeeId": 1, + "compensation": 0, + "deductions": [ + { + "deductionType": "Absent", + "deductionDate": "2024-05-01", + "amount": 0 + }, + { + "deductionType": "Absent", + "deductionDate": "2024-05-02", + "amount": 0 + }, + { + "deductionType": "Absent", + "deductionDate": "2024-05-03", + "amount": 0 + }, + { + "deductionType": "Absent", + "deductionDate": "2024-05-06", + "amount": 0 + }, + { + "deductionType": "Absent", + "deductionDate": "2024-05-07", + "amount": 0 + }, + { + "deductionType": "Absent", + "deductionDate": "2024-05-08", + "amount": 0 + }, + { + "deductionType": "Absent", + "deductionDate": "2024-05-09", + "amount": 0 + }, + { + "deductionType": "Absent", + "deductionDate": "2024-05-10", + "amount": 0 + }, + { + "deductionType": "Absent", + "deductionDate": "2024-05-11", + "amount": 0 + }, + { + "deductionType": "Absent", + "deductionDate": "2024-05-13", + "amount": 0 + }, + { + "deductionType": "Absent", + "deductionDate": "2024-05-14", + "amount": 0 + }, + { + "deductionType": "Absent", + "deductionDate": "2024-05-15", + "amount": 0 + }, + { + "deductionType": "Absent", + "deductionDate": "2024-05-16", + "amount": 0 + }, + { + "deductionType": "Absent", + "deductionDate": "2024-05-17", + "amount": 0 + }, + { + "deductionType": "Absent", + "deductionDate": "2024-05-20", + "amount": 0 + }, + { + "deductionType": "Absent", + "deductionDate": "2024-05-21", + "amount": 0 + }, + { + "deductionType": "Absent", + "deductionDate": "2024-05-22", + "amount": 0 + }, + { + "deductionType": "Absent", + "deductionDate": "2024-05-23", + "amount": 0 + }, + { + "deductionType": "Absent", + "deductionDate": "2024-05-24", + "amount": 0 + }, + { + "deductionType": "Absent", + "deductionDate": "2024-05-25", + "amount": 0 + }, + { + "deductionType": "Absent", + "deductionDate": "2024-05-27", + "amount": 0 + }, + { + "deductionType": "Absent", + "deductionDate": "2024-05-28", + "amount": 0 + }, + { + "deductionType": "Absent", + "deductionDate": "2024-05-29", + "amount": 0 + }, + { + "deductionType": "Absent", + "deductionDate": "2024-05-30", + "amount": 0 + }, + { + "deductionType": "Absent", + "deductionDate": "2024-05-31", + "amount": 0 + } + ], + "amountDeducted": 0, + "netAmount": 0, + "month": 5, + "year": 2024 +} \ No newline at end of file diff --git a/tests/Tests.Integration/Tests/Salaries/GetEstimatedSalary.Should_Return_Data_Of_Other_Employee_For_Company_Admin.received.json b/tests/Tests.Integration/Tests/Salaries/GetEstimatedSalary.Should_Return_Data_Of_Other_Employee_For_Company_Admin.received.json new file mode 100644 index 0000000..92d542d --- /dev/null +++ b/tests/Tests.Integration/Tests/Salaries/GetEstimatedSalary.Should_Return_Data_Of_Other_Employee_For_Company_Admin.received.json @@ -0,0 +1,135 @@ +{ + "employeeId": 1, + "compensation": 0, + "deductions": [ + { + "deductionType": "Absent", + "deductionDate": "2024-05-01", + "amount": 0 + }, + { + "deductionType": "Absent", + "deductionDate": "2024-05-02", + "amount": 0 + }, + { + "deductionType": "Absent", + "deductionDate": "2024-05-03", + "amount": 0 + }, + { + "deductionType": "Absent", + "deductionDate": "2024-05-06", + "amount": 0 + }, + { + "deductionType": "Absent", + "deductionDate": "2024-05-07", + "amount": 0 + }, + { + "deductionType": "Absent", + "deductionDate": "2024-05-08", + "amount": 0 + }, + { + "deductionType": "Absent", + "deductionDate": "2024-05-09", + "amount": 0 + }, + { + "deductionType": "Absent", + "deductionDate": "2024-05-10", + "amount": 0 + }, + { + "deductionType": "Absent", + "deductionDate": "2024-05-11", + "amount": 0 + }, + { + "deductionType": "Absent", + "deductionDate": "2024-05-13", + "amount": 0 + }, + { + "deductionType": "Absent", + "deductionDate": "2024-05-14", + "amount": 0 + }, + { + "deductionType": "Absent", + "deductionDate": "2024-05-15", + "amount": 0 + }, + { + "deductionType": "Absent", + "deductionDate": "2024-05-16", + "amount": 0 + }, + { + "deductionType": "Absent", + "deductionDate": "2024-05-17", + "amount": 0 + }, + { + "deductionType": "Absent", + "deductionDate": "2024-05-20", + "amount": 0 + }, + { + "deductionType": "Absent", + "deductionDate": "2024-05-21", + "amount": 0 + }, + { + "deductionType": "Absent", + "deductionDate": "2024-05-22", + "amount": 0 + }, + { + "deductionType": "Absent", + "deductionDate": "2024-05-23", + "amount": 0 + }, + { + "deductionType": "Absent", + "deductionDate": "2024-05-24", + "amount": 0 + }, + { + "deductionType": "Absent", + "deductionDate": "2024-05-25", + "amount": 0 + }, + { + "deductionType": "Absent", + "deductionDate": "2024-05-27", + "amount": 0 + }, + { + "deductionType": "Absent", + "deductionDate": "2024-05-28", + "amount": 0 + }, + { + "deductionType": "Absent", + "deductionDate": "2024-05-29", + "amount": 0 + }, + { + "deductionType": "Absent", + "deductionDate": "2024-05-30", + "amount": 0 + }, + { + "deductionType": "Absent", + "deductionDate": "2024-05-31", + "amount": 0 + } + ], + "amountDeducted": 0, + "netAmount": 0, + "month": 5, + "year": 2024 +} \ No newline at end of file diff --git a/tests/Tests.Integration/Tests/Salaries/GetEstimatedSalary.Should_Return_Data_Of_Own_Employee_.received.json b/tests/Tests.Integration/Tests/Salaries/GetEstimatedSalary.Should_Return_Data_Of_Own_Employee_.received.json new file mode 100644 index 0000000..da6c3d0 --- /dev/null +++ b/tests/Tests.Integration/Tests/Salaries/GetEstimatedSalary.Should_Return_Data_Of_Own_Employee_.received.json @@ -0,0 +1,135 @@ +{ + "employeeId": 0, + "compensation": 0, + "deductions": [ + { + "deductionType": "Absent", + "deductionDate": "2024-05-01", + "amount": 0 + }, + { + "deductionType": "Absent", + "deductionDate": "2024-05-02", + "amount": 0 + }, + { + "deductionType": "Absent", + "deductionDate": "2024-05-03", + "amount": 0 + }, + { + "deductionType": "Absent", + "deductionDate": "2024-05-06", + "amount": 0 + }, + { + "deductionType": "Absent", + "deductionDate": "2024-05-07", + "amount": 0 + }, + { + "deductionType": "Absent", + "deductionDate": "2024-05-08", + "amount": 0 + }, + { + "deductionType": "Absent", + "deductionDate": "2024-05-09", + "amount": 0 + }, + { + "deductionType": "Absent", + "deductionDate": "2024-05-10", + "amount": 0 + }, + { + "deductionType": "Absent", + "deductionDate": "2024-05-11", + "amount": 0 + }, + { + "deductionType": "Absent", + "deductionDate": "2024-05-13", + "amount": 0 + }, + { + "deductionType": "Absent", + "deductionDate": "2024-05-14", + "amount": 0 + }, + { + "deductionType": "Absent", + "deductionDate": "2024-05-15", + "amount": 0 + }, + { + "deductionType": "Absent", + "deductionDate": "2024-05-16", + "amount": 0 + }, + { + "deductionType": "Absent", + "deductionDate": "2024-05-17", + "amount": 0 + }, + { + "deductionType": "Absent", + "deductionDate": "2024-05-20", + "amount": 0 + }, + { + "deductionType": "Absent", + "deductionDate": "2024-05-21", + "amount": 0 + }, + { + "deductionType": "Absent", + "deductionDate": "2024-05-22", + "amount": 0 + }, + { + "deductionType": "Absent", + "deductionDate": "2024-05-23", + "amount": 0 + }, + { + "deductionType": "Absent", + "deductionDate": "2024-05-24", + "amount": 0 + }, + { + "deductionType": "Absent", + "deductionDate": "2024-05-25", + "amount": 0 + }, + { + "deductionType": "Absent", + "deductionDate": "2024-05-27", + "amount": 0 + }, + { + "deductionType": "Absent", + "deductionDate": "2024-05-28", + "amount": 0 + }, + { + "deductionType": "Absent", + "deductionDate": "2024-05-29", + "amount": 0 + }, + { + "deductionType": "Absent", + "deductionDate": "2024-05-30", + "amount": 0 + }, + { + "deductionType": "Absent", + "deductionDate": "2024-05-31", + "amount": 0 + } + ], + "amountDeducted": 0, + "netAmount": 0, + "month": 5, + "year": 2024 +} \ No newline at end of file diff --git a/tests/Tests.Integration/Tests/Salaries/GetSalaries.Should_Return_Data_For_Supplied_Month_If_Month_Supplied.received.json b/tests/Tests.Integration/Tests/Salaries/GetSalaries.Should_Return_Data_For_Supplied_Month_If_Month_Supplied.received.json new file mode 100644 index 0000000..d001279 --- /dev/null +++ b/tests/Tests.Integration/Tests/Salaries/GetSalaries.Should_Return_Data_For_Supplied_Month_If_Month_Supplied.received.json @@ -0,0 +1,6 @@ +{ + "page": 1, + "limit": 10, + "total": 0, + "items": [] +} \ No newline at end of file diff --git a/tests/Tests.Integration/Tests/Salaries/GetSalaries.Should_Return_Date_For_Current_Month_If_Month_Not_Supplied.received.json b/tests/Tests.Integration/Tests/Salaries/GetSalaries.Should_Return_Date_For_Current_Month_If_Month_Not_Supplied.received.json new file mode 100644 index 0000000..d001279 --- /dev/null +++ b/tests/Tests.Integration/Tests/Salaries/GetSalaries.Should_Return_Date_For_Current_Month_If_Month_Not_Supplied.received.json @@ -0,0 +1,6 @@ +{ + "page": 1, + "limit": 10, + "total": 0, + "items": [] +} \ No newline at end of file diff --git a/tests/Tests.Integration/Tests/Users/GetUser.sql b/tests/Tests.Integration/Tests/Users/GetUser.sql index e57411c..f91b3d0 100644 --- a/tests/Tests.Integration/Tests/Users/GetUser.sql +++ b/tests/Tests.Integration/Tests/Users/GetUser.sql @@ -1,4 +1,4 @@ INSERT INTO public.users VALUES -(101, 999, 'super-admin1@example.com', 'SUPER-ADMIN1@EXAMPLE.COM', 'super-admin1@example.com', 'SUPER-ADMIN1@EXAMPLE.COM', true, 'AQAAAAIAAYagAAAAEIDoeTRLrGQvn8FRF2EXGdQ5GtreAkKzZcbl1BTD6xNNzUXrGkn6BCPp05RxjIH2lQ==', '2XTX6Z5RVMLHRXNWIMW3UJ2USO524VVU', '283d4f58-3a75-47ad-bf9c-de04c9e9a80a', '7876543210', false, false, NULL, true, 0, 0, '2024-05-03 03:51:44.770234-07', NULL, NULL), -(201, 999, 'company-admin1@example.com', 'COMPANY-ADMIN1@EXAMPLE.COM', 'company-admin1@example.com', 'COMPANY-ADMIN1@EXAMPLE.COM', true, 'AQAAAAIAAYagAAAAEIDoeTRLrGQvn8FRF2EXGdQ5GtreAkKzZcbl1BTD6xNNzUXrGkn6BCPp05RxjIH2lQ==', '2XTX6Z5RVMLHRXNWIMW3UJ2USO524VVU', '283d4f58-3a75-47ad-bf9c-de04c9e9a80a', '7876543211', false, false, NULL, true, 0, 0, '2024-05-03 03:51:44.770234-07', NULL, NULL), -(301, 999, 'employee1@example.com', 'EMPLOYEE1@EXAMPLE.COM', 'employee1@example.com', 'EMPLOYEE1@EXAMPLE.COM', true, 'AQAAAAIAAYagAAAAEIDoeTRLrGQvn8FRF2EXGdQ5GtreAkKzZcbl1BTD6xNNzUXrGkn6BCPp05RxjIH2lQ==', '2XTX6Z5RVMLHRXNWIMW3UJ2USO524VVU', '283d4f58-3a75-47ad-bf9c-de04c9e9a80a', '7876543212', false, false, NULL, true, 0, 0, '2024-05-03 03:51:44.770234-07', NULL, NULL); \ No newline at end of file +(101, 'super-admin1@example.com', 'SUPER-ADMIN1@EXAMPLE.COM', 'super-admin1@example.com', 'SUPER-ADMIN1@EXAMPLE.COM', true, 'AQAAAAIAAYagAAAAEIDoeTRLrGQvn8FRF2EXGdQ5GtreAkKzZcbl1BTD6xNNzUXrGkn6BCPp05RxjIH2lQ==', '2XTX6Z5RVMLHRXNWIMW3UJ2USO524VVU', '283d4f58-3a75-47ad-bf9c-de04c9e9a80a', '7876543210', false, false, NULL, true, 0, 0, '2024-05-03 03:51:44.770234-07', NULL, NULL), +(201, 'company-admin1@example.com', 'COMPANY-ADMIN1@EXAMPLE.COM', 'company-admin1@example.com', 'COMPANY-ADMIN1@EXAMPLE.COM', true, 'AQAAAAIAAYagAAAAEIDoeTRLrGQvn8FRF2EXGdQ5GtreAkKzZcbl1BTD6xNNzUXrGkn6BCPp05RxjIH2lQ==', '2XTX6Z5RVMLHRXNWIMW3UJ2USO524VVU', '283d4f58-3a75-47ad-bf9c-de04c9e9a80a', '7876543211', false, false, NULL, true, 0, 0, '2024-05-03 03:51:44.770234-07', NULL, NULL), +(301, 'employee1@example.com', 'EMPLOYEE1@EXAMPLE.COM', 'employee1@example.com', 'EMPLOYEE1@EXAMPLE.COM', true, 'AQAAAAIAAYagAAAAEIDoeTRLrGQvn8FRF2EXGdQ5GtreAkKzZcbl1BTD6xNNzUXrGkn6BCPp05RxjIH2lQ==', '2XTX6Z5RVMLHRXNWIMW3UJ2USO524VVU', '283d4f58-3a75-47ad-bf9c-de04c9e9a80a', '7876543212', false, false, NULL, true, 0, 0, '2024-05-03 03:51:44.770234-07', NULL, NULL); \ No newline at end of file diff --git a/tests/Tests.Unit.Application/Auth/Commands/RefreshTokenCommandTests.cs b/tests/Tests.Unit.Application/Auth/Commands/RefreshTokenCommandTests.cs index f047a9d..9ad70db 100644 --- a/tests/Tests.Unit.Application/Auth/Commands/RefreshTokenCommandTests.cs +++ b/tests/Tests.Unit.Application/Auth/Commands/RefreshTokenCommandTests.cs @@ -16,7 +16,7 @@ public RefreshTokenCommandTests() var email = new Faker().Person.Email.ToValueObject(); jwtService.ExtractEmailFromToken(Arg.Any()).Returns(email); - identityService.GetUserAsync(Arg.Any()).Returns(User.Create(email, "9876543210".ToValueObject(), new Faker().Random.Int(0))); + identityService.GetUserAsync(Arg.Any()).Returns(User.Create(email, "9876543210".ToValueObject())); jwtService.ValidateRefreshTokenAsync(Arg.Any(), Arg.Any(), Arg.Any()).Returns(true); } diff --git a/tests/Tests.Unit.Application/Employees/Commands/AddEmployeeCommandTests.cs b/tests/Tests.Unit.Application/Employees/Commands/AddEmployeeCommandTests.cs index 34d588b..d96a956 100644 --- a/tests/Tests.Unit.Application/Employees/Commands/AddEmployeeCommandTests.cs +++ b/tests/Tests.Unit.Application/Employees/Commands/AddEmployeeCommandTests.cs @@ -1,9 +1,7 @@ -using System.Threading.Channels; using Application.Common.Abstract; using Application.Employees.Commands; using Domain.Common.ValueObjects; using Domain.Identity; -using Microsoft.EntityFrameworkCore; using MockQueryable.NSubstitute; using NSubstitute; @@ -384,9 +382,9 @@ public async Task Should_Not_Have_Error_When_Request_Is_Valid() private void SetupUserData() { var user = new List - { - User.Create(Email.From("Test@example.com"), PhoneNumber.From("9906121212"), 1) - }.AsQueryable(); + { + User.Create(Email.From("Test@example.com"), PhoneNumber.From("9906121212")) + }.AsQueryable(); var dbSetData = user.BuildMockDbSet(); dbContext.Users.Returns(dbSetData); From 0f91647f2b29cbef83450a44fb0cb42008607025 Mon Sep 17 00:00:00 2001 From: dev-javid Date: Sun, 22 Sep 2024 08:56:58 +0530 Subject: [PATCH 2/7] Received JSON file cleanup --- src/Infrastructure/Services/JwtService.cs | 16 +-- .../ClockOut.Should_Add_Data.received.json | 1 - ..._Return_Data_For_Date_Filter.received.json | 1 - ...Return_Data_For_Month_Filter.received.json | 1 - ...ta_When_Clock_Out_Is_Missing.received.json | 1 - ...r_Employee_For_Company_Admin.received.json | 6 - ...n_Employee_Data_For_Employee.received.json | 6 - ...r_Employee_For_Company_Admin.received.json | 1 - ..._Return_Data_Of_Own_Employee.received.json | 1 - ...Deparment.Should_Return_Data.received.json | 1 - ...eparments.Should_Return_Data.received.json | 6 - ...epartment.Should_Return_Data.received.json | 1 - ...yeeLeaves.Should_Return_Data.received.json | 6 - ...dEmployee.Should_Return_Data.received.json | 1 - ...Employees.Should_Return_Data.received.json | 6 - ...eDocumnet.Should_Return_Data.received.json | 1 - ...enses.Should_return_expenses.received.json | 6 - ...ddHoliday.Should_Return_Data.received.json | 1 - ...tHolidays.Should_Return_Data.received.json | 6 - ...teHoliday.Should_Return_Data.received.json | 1 - ...Should_Return_Income_Sources.received.json | 6 - ...etIncomes.Should_return_data.received.json | 6 - ...dJobTitle.Should_Return_Data.received.json | 1 - ...JobTitles.Should_Return_Data.received.json | 6 - ...eJobTitle.Should_Return_Data.received.json | 1 - ...avePolicy.Should_Return_Data.received.json | 1 - ...icReports.Should_Return_Data.received.json | 6 - ...Return_Data_For_Month_Filter.received.json | 135 ------------------ ...r_Employee_For_Company_Admin.received.json | 135 ------------------ ...Return_Data_Of_Own_Employee_.received.json | 135 ------------------ ...lied_Month_If_Month_Supplied.received.json | 6 - ..._Month_If_Month_Not_Supplied.received.json | 6 - 32 files changed, 5 insertions(+), 509 deletions(-) delete mode 100644 tests/Tests.Integration/Tests/Attendance/ClockOut.Should_Add_Data.received.json delete mode 100644 tests/Tests.Integration/Tests/Attendance/GetAttendance.Should_Return_Data_For_Date_Filter.received.json delete mode 100644 tests/Tests.Integration/Tests/Attendance/GetAttendance.Should_Return_Data_For_Month_Filter.received.json delete mode 100644 tests/Tests.Integration/Tests/AttendanceRegularizations/ApproveAttendanceRegularization.Should_Set_Data_When_Clock_Out_Is_Missing.received.json delete mode 100644 tests/Tests.Integration/Tests/AttendanceRegularizations/GetRegularizations.Should_Return_Data_Of_Other_Employee_For_Company_Admin.received.json delete mode 100644 tests/Tests.Integration/Tests/AttendanceRegularizations/GetRegularizations.Should_Return_Own_Employee_Data_For_Employee.received.json delete mode 100644 tests/Tests.Integration/Tests/Compensations/GetCompensations.Should_Return_Data_Of_Other_Employee_For_Company_Admin.received.json delete mode 100644 tests/Tests.Integration/Tests/Compensations/GetCompensations.Should_Return_Data_Of_Own_Employee.received.json delete mode 100644 tests/Tests.Integration/Tests/Departments/AddDeparment.Should_Return_Data.received.json delete mode 100644 tests/Tests.Integration/Tests/Departments/GetDeparments.Should_Return_Data.received.json delete mode 100644 tests/Tests.Integration/Tests/Departments/UpdateDepartment.Should_Return_Data.received.json delete mode 100644 tests/Tests.Integration/Tests/EmployeeLeaves/GetAllEmployeeLeaves.Should_Return_Data.received.json delete mode 100644 tests/Tests.Integration/Tests/Employees/AddEmployee.Should_Return_Data.received.json delete mode 100644 tests/Tests.Integration/Tests/Employees/GetEmployees.Should_Return_Data.received.json delete mode 100644 tests/Tests.Integration/Tests/Employees/UpdateEmployeeDocumnet.Should_Return_Data.received.json delete mode 100644 tests/Tests.Integration/Tests/Expenses/GetExpenses.Should_return_expenses.received.json delete mode 100644 tests/Tests.Integration/Tests/Holidays/AddHoliday.Should_Return_Data.received.json delete mode 100644 tests/Tests.Integration/Tests/Holidays/GetHolidays.Should_Return_Data.received.json delete mode 100644 tests/Tests.Integration/Tests/Holidays/UpdateHoliday.Should_Return_Data.received.json delete mode 100644 tests/Tests.Integration/Tests/IncomeSources/GetIncomeSources.Should_Return_Income_Sources.received.json delete mode 100644 tests/Tests.Integration/Tests/Incomes/GetIncomes.Should_return_data.received.json delete mode 100644 tests/Tests.Integration/Tests/JobTitles/AddJobTitle.Should_Return_Data.received.json delete mode 100644 tests/Tests.Integration/Tests/JobTitles/GetJobTitles.Should_Return_Data.received.json delete mode 100644 tests/Tests.Integration/Tests/JobTitles/UpdateJobTitle.Should_Return_Data.received.json delete mode 100644 tests/Tests.Integration/Tests/LeavePolicy/UpdateLeavePolicy.Should_Return_Data.received.json delete mode 100644 tests/Tests.Integration/Tests/Reports/GetAdminBasicReports.Should_Return_Data.received.json delete mode 100644 tests/Tests.Integration/Tests/Salaries/GetEstimatedSalary.Should_Return_Data_For_Month_Filter.received.json delete mode 100644 tests/Tests.Integration/Tests/Salaries/GetEstimatedSalary.Should_Return_Data_Of_Other_Employee_For_Company_Admin.received.json delete mode 100644 tests/Tests.Integration/Tests/Salaries/GetEstimatedSalary.Should_Return_Data_Of_Own_Employee_.received.json delete mode 100644 tests/Tests.Integration/Tests/Salaries/GetSalaries.Should_Return_Data_For_Supplied_Month_If_Month_Supplied.received.json delete mode 100644 tests/Tests.Integration/Tests/Salaries/GetSalaries.Should_Return_Date_For_Current_Month_If_Month_Not_Supplied.received.json diff --git a/src/Infrastructure/Services/JwtService.cs b/src/Infrastructure/Services/JwtService.cs index a7dc91a..d2c5f3e 100644 --- a/src/Infrastructure/Services/JwtService.cs +++ b/src/Infrastructure/Services/JwtService.cs @@ -3,6 +3,7 @@ using System.Security.Cryptography; using System.Text; using Application.Auth.Commands; +using Domain.Identity; using Microsoft.AspNetCore.Http; using Microsoft.IdentityModel.Tokens; @@ -123,31 +124,24 @@ private async Task GenerateRefreshTokenAsync(User user, CancellationToke private async Task AddCustomClaimsAsync(List claims, CancellationToken cancellationToken) { var userId = int.Parse(claims.Find(x => x.Type == ClaimTypes.NameIdentifier)!.Value); - var user = await dbContext - .Users - .Select(x => new - { - x.Id, - CompanyId = x.Employee != null ? x.Employee.CompanyId : 0, - }) - .FirstAsync(x => x.Id == userId); var employee = await dbContext .Employees .IgnoreQueryFilters() - .Where(x => x.UserId == userId && x.CompanyId == user.CompanyId) + .Where(x => x.UserId == userId) .Select(x => new { x.Id, - x.FullName + x.FullName, + x.CompanyId }) .FirstOrDefaultAsync(cancellationToken); - claims.Add(new Claim("companyId", user.CompanyId.ToString())); if (employee != null) { claims.Add(new Claim("employeeId", employee.Id.ToString()!)); claims.Add(new Claim("name", employee.FullName.ToString()!)); + claims.Add(new Claim("companyId", employee.CompanyId.ToString())); } } } diff --git a/tests/Tests.Integration/Tests/Attendance/ClockOut.Should_Add_Data.received.json b/tests/Tests.Integration/Tests/Attendance/ClockOut.Should_Add_Data.received.json deleted file mode 100644 index 15e8619..0000000 --- a/tests/Tests.Integration/Tests/Attendance/ClockOut.Should_Add_Data.received.json +++ /dev/null @@ -1 +0,0 @@ -false \ No newline at end of file diff --git a/tests/Tests.Integration/Tests/Attendance/GetAttendance.Should_Return_Data_For_Date_Filter.received.json b/tests/Tests.Integration/Tests/Attendance/GetAttendance.Should_Return_Data_For_Date_Filter.received.json deleted file mode 100644 index ad47dbb..0000000 --- a/tests/Tests.Integration/Tests/Attendance/GetAttendance.Should_Return_Data_For_Date_Filter.received.json +++ /dev/null @@ -1 +0,0 @@ -[] \ No newline at end of file diff --git a/tests/Tests.Integration/Tests/Attendance/GetAttendance.Should_Return_Data_For_Month_Filter.received.json b/tests/Tests.Integration/Tests/Attendance/GetAttendance.Should_Return_Data_For_Month_Filter.received.json deleted file mode 100644 index ad47dbb..0000000 --- a/tests/Tests.Integration/Tests/Attendance/GetAttendance.Should_Return_Data_For_Month_Filter.received.json +++ /dev/null @@ -1 +0,0 @@ -[] \ No newline at end of file diff --git a/tests/Tests.Integration/Tests/AttendanceRegularizations/ApproveAttendanceRegularization.Should_Set_Data_When_Clock_Out_Is_Missing.received.json b/tests/Tests.Integration/Tests/AttendanceRegularizations/ApproveAttendanceRegularization.Should_Set_Data_When_Clock_Out_Is_Missing.received.json deleted file mode 100644 index 15e8619..0000000 --- a/tests/Tests.Integration/Tests/AttendanceRegularizations/ApproveAttendanceRegularization.Should_Set_Data_When_Clock_Out_Is_Missing.received.json +++ /dev/null @@ -1 +0,0 @@ -false \ No newline at end of file diff --git a/tests/Tests.Integration/Tests/AttendanceRegularizations/GetRegularizations.Should_Return_Data_Of_Other_Employee_For_Company_Admin.received.json b/tests/Tests.Integration/Tests/AttendanceRegularizations/GetRegularizations.Should_Return_Data_Of_Other_Employee_For_Company_Admin.received.json deleted file mode 100644 index d001279..0000000 --- a/tests/Tests.Integration/Tests/AttendanceRegularizations/GetRegularizations.Should_Return_Data_Of_Other_Employee_For_Company_Admin.received.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "page": 1, - "limit": 10, - "total": 0, - "items": [] -} \ No newline at end of file diff --git a/tests/Tests.Integration/Tests/AttendanceRegularizations/GetRegularizations.Should_Return_Own_Employee_Data_For_Employee.received.json b/tests/Tests.Integration/Tests/AttendanceRegularizations/GetRegularizations.Should_Return_Own_Employee_Data_For_Employee.received.json deleted file mode 100644 index d001279..0000000 --- a/tests/Tests.Integration/Tests/AttendanceRegularizations/GetRegularizations.Should_Return_Own_Employee_Data_For_Employee.received.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "page": 1, - "limit": 10, - "total": 0, - "items": [] -} \ No newline at end of file diff --git a/tests/Tests.Integration/Tests/Compensations/GetCompensations.Should_Return_Data_Of_Other_Employee_For_Company_Admin.received.json b/tests/Tests.Integration/Tests/Compensations/GetCompensations.Should_Return_Data_Of_Other_Employee_For_Company_Admin.received.json deleted file mode 100644 index ad47dbb..0000000 --- a/tests/Tests.Integration/Tests/Compensations/GetCompensations.Should_Return_Data_Of_Other_Employee_For_Company_Admin.received.json +++ /dev/null @@ -1 +0,0 @@ -[] \ No newline at end of file diff --git a/tests/Tests.Integration/Tests/Compensations/GetCompensations.Should_Return_Data_Of_Own_Employee.received.json b/tests/Tests.Integration/Tests/Compensations/GetCompensations.Should_Return_Data_Of_Own_Employee.received.json deleted file mode 100644 index ad47dbb..0000000 --- a/tests/Tests.Integration/Tests/Compensations/GetCompensations.Should_Return_Data_Of_Own_Employee.received.json +++ /dev/null @@ -1 +0,0 @@ -[] \ No newline at end of file diff --git a/tests/Tests.Integration/Tests/Departments/AddDeparment.Should_Return_Data.received.json b/tests/Tests.Integration/Tests/Departments/AddDeparment.Should_Return_Data.received.json deleted file mode 100644 index ca21c18..0000000 --- a/tests/Tests.Integration/Tests/Departments/AddDeparment.Should_Return_Data.received.json +++ /dev/null @@ -1 +0,0 @@ -"Sequence contains no elements.\r\n at Microsoft.EntityFrameworkCore.Query.ShapedQueryCompilingExpressionVisitor.SingleAsync[TSource](IAsyncEnumerable`1 asyncEnumerable, CancellationToken cancellationToken)\r\n at Microsoft.EntityFrameworkCore.Query.ShapedQueryCompilingExpressionVisitor.SingleAsync[TSource](IAsyncEnumerable`1 asyncEnumerable, CancellationToken cancellationToken)\r\n at Application.Departments.Commands.AddDepartmentCommand.Handler.Handle(AddDepartmentCommand request, CancellationToken cancellationToken) in D:\\personal\\bit-hrms\\src\\Application\\Departments\\Commands\\AddDepartmentCommand.cs:line 22\r\n at Application.Common.MediatRBehaviour.ValidationBehaviour`2.Handle(TRequest request, RequestHandlerDelegate`1 next, CancellationToken cancellationToken) in D:\\personal\\bit-hrms\\src\\Application\\Common\\MediatRBehaviour\\ValidationBehaviour.cs:line 28\r\n at Application.Common.MediatRBehaviour.TrimmingBehaviour`2.Handle(TRequest request, RequestHandlerDelegate`1 next, CancellationToken cancellationToken) in D:\\personal\\bit-hrms\\src\\Application\\Common\\MediatRBehaviour\\TrimmingBehaviour.cs:line 21\r\n at Application.Common.MediatRBehaviour.AuthorizationBehaviour`2.Handle(TRequest request, RequestHandlerDelegate`1 next, CancellationToken cancellationToken) in D:\\personal\\bit-hrms\\src\\Application\\Common\\MediatRBehaviour\\AuthorizationBehaviour.cs:line 17\r\n at Presentation.Controllers.DepartmentsController.AddAsync(AddDepartmentCommand command) in D:\\personal\\bit-hrms\\src\\Presentation.Server\\Controllers\\DepartmentsController.cs:line 18\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.TaskOfIActionResultExecutor.Execute(ActionContext actionContext, IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.g__Awaited|12_0(ControllerActionInvoker invoker, ValueTask`1 actionResultValueTask)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.g__Awaited|10_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.g__Awaited|13_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.g__Awaited|25_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Rethrow(ResourceExecutedContextSealed context)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.g__Awaited|20_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.g__Logged|17_1(ResourceInvoker invoker)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.g__Logged|17_1(ResourceInvoker invoker)\r\n at Microsoft.AspNetCore.Routing.EndpointMiddleware.g__AwaitRequestTask|7_0(Endpoint endpoint, Task requestTask, ILogger logger)\r\n at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context)\r\n at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)\r\n at Swashbuckle.AspNetCore.SwaggerUI.SwaggerUIMiddleware.Invoke(HttpContext httpContext)\r\n at Swashbuckle.AspNetCore.Swagger.SwaggerMiddleware.Invoke(HttpContext httpContext, ISwaggerProvider swaggerProvider)\r\n at Serilog.AspNetCore.RequestLoggingMiddleware.Invoke(HttpContext httpContext)\r\n at Presentation.Middleware.ExceptionHandlingMiddleware.InvokeAsync(HttpContext context) in D:\\personal\\bit-hrms\\src\\Presentation.Server\\Middleware\\ExceptionHandlingMiddleware.cs:line 17" \ No newline at end of file diff --git a/tests/Tests.Integration/Tests/Departments/GetDeparments.Should_Return_Data.received.json b/tests/Tests.Integration/Tests/Departments/GetDeparments.Should_Return_Data.received.json deleted file mode 100644 index d001279..0000000 --- a/tests/Tests.Integration/Tests/Departments/GetDeparments.Should_Return_Data.received.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "page": 1, - "limit": 10, - "total": 0, - "items": [] -} \ No newline at end of file diff --git a/tests/Tests.Integration/Tests/Departments/UpdateDepartment.Should_Return_Data.received.json b/tests/Tests.Integration/Tests/Departments/UpdateDepartment.Should_Return_Data.received.json deleted file mode 100644 index 332c956..0000000 --- a/tests/Tests.Integration/Tests/Departments/UpdateDepartment.Should_Return_Data.received.json +++ /dev/null @@ -1 +0,0 @@ -"Sequence contains no elements.\r\n at Microsoft.EntityFrameworkCore.Query.ShapedQueryCompilingExpressionVisitor.SingleAsync[TSource](IAsyncEnumerable`1 asyncEnumerable, CancellationToken cancellationToken)\r\n at Microsoft.EntityFrameworkCore.Query.ShapedQueryCompilingExpressionVisitor.SingleAsync[TSource](IAsyncEnumerable`1 asyncEnumerable, CancellationToken cancellationToken)\r\n at Application.Departments.Commands.UpdateDepartmentCommand.Handler.Handle(UpdateDepartmentCommand request, CancellationToken cancellationToken) in D:\\personal\\bit-hrms\\src\\Application\\Departments\\Commands\\UpdateDepartmentCommand.cs:line 28\r\n at Application.Common.MediatRBehaviour.ValidationBehaviour`2.Handle(TRequest request, RequestHandlerDelegate`1 next, CancellationToken cancellationToken) in D:\\personal\\bit-hrms\\src\\Application\\Common\\MediatRBehaviour\\ValidationBehaviour.cs:line 28\r\n at Application.Common.MediatRBehaviour.TrimmingBehaviour`2.Handle(TRequest request, RequestHandlerDelegate`1 next, CancellationToken cancellationToken) in D:\\personal\\bit-hrms\\src\\Application\\Common\\MediatRBehaviour\\TrimmingBehaviour.cs:line 21\r\n at Application.Common.MediatRBehaviour.AuthorizationBehaviour`2.Handle(TRequest request, RequestHandlerDelegate`1 next, CancellationToken cancellationToken) in D:\\personal\\bit-hrms\\src\\Application\\Common\\MediatRBehaviour\\AuthorizationBehaviour.cs:line 17\r\n at Presentation.Controllers.DepartmentsController.UpdateAsync(Int32 departmentId, UpdateDepartmentCommand command) in D:\\personal\\bit-hrms\\src\\Presentation.Server\\Controllers\\DepartmentsController.cs:line 26\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.TaskOfIActionResultExecutor.Execute(ActionContext actionContext, IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.g__Awaited|12_0(ControllerActionInvoker invoker, ValueTask`1 actionResultValueTask)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.g__Awaited|10_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.g__Awaited|13_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.g__Awaited|25_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Rethrow(ResourceExecutedContextSealed context)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.g__Awaited|20_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.g__Logged|17_1(ResourceInvoker invoker)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.g__Logged|17_1(ResourceInvoker invoker)\r\n at Microsoft.AspNetCore.Routing.EndpointMiddleware.g__AwaitRequestTask|7_0(Endpoint endpoint, Task requestTask, ILogger logger)\r\n at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context)\r\n at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)\r\n at Swashbuckle.AspNetCore.SwaggerUI.SwaggerUIMiddleware.Invoke(HttpContext httpContext)\r\n at Swashbuckle.AspNetCore.Swagger.SwaggerMiddleware.Invoke(HttpContext httpContext, ISwaggerProvider swaggerProvider)\r\n at Serilog.AspNetCore.RequestLoggingMiddleware.Invoke(HttpContext httpContext)\r\n at Presentation.Middleware.ExceptionHandlingMiddleware.InvokeAsync(HttpContext context) in D:\\personal\\bit-hrms\\src\\Presentation.Server\\Middleware\\ExceptionHandlingMiddleware.cs:line 17" \ No newline at end of file diff --git a/tests/Tests.Integration/Tests/EmployeeLeaves/GetAllEmployeeLeaves.Should_Return_Data.received.json b/tests/Tests.Integration/Tests/EmployeeLeaves/GetAllEmployeeLeaves.Should_Return_Data.received.json deleted file mode 100644 index d001279..0000000 --- a/tests/Tests.Integration/Tests/EmployeeLeaves/GetAllEmployeeLeaves.Should_Return_Data.received.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "page": 1, - "limit": 10, - "total": 0, - "items": [] -} \ No newline at end of file diff --git a/tests/Tests.Integration/Tests/Employees/AddEmployee.Should_Return_Data.received.json b/tests/Tests.Integration/Tests/Employees/AddEmployee.Should_Return_Data.received.json deleted file mode 100644 index fa4c4e9..0000000 --- a/tests/Tests.Integration/Tests/Employees/AddEmployee.Should_Return_Data.received.json +++ /dev/null @@ -1 +0,0 @@ -"Sequence contains no elements.\r\n at Microsoft.EntityFrameworkCore.Query.ShapedQueryCompilingExpressionVisitor.SingleAsync[TSource](IAsyncEnumerable`1 asyncEnumerable, CancellationToken cancellationToken)\r\n at Microsoft.EntityFrameworkCore.Query.ShapedQueryCompilingExpressionVisitor.SingleAsync[TSource](IAsyncEnumerable`1 asyncEnumerable, CancellationToken cancellationToken)\r\n at Application.Users.Commands.AddUserCommand.Handler.CreateUserAsync(AddUserCommand request, CancellationToken cancellationToken) in D:\\personal\\bit-hrms\\src\\Application\\Users\\Commands\\AddUserCommand.cs:line 49\r\n at Application.Users.Commands.AddUserCommand.Handler.Handle(AddUserCommand request, CancellationToken cancellationToken) in D:\\personal\\bit-hrms\\src\\Application\\Users\\Commands\\AddUserCommand.cs:line 29\r\n at Application.Common.MediatRBehaviour.ValidationBehaviour`2.Handle(TRequest request, RequestHandlerDelegate`1 next, CancellationToken cancellationToken) in D:\\personal\\bit-hrms\\src\\Application\\Common\\MediatRBehaviour\\ValidationBehaviour.cs:line 28\r\n at Application.Common.MediatRBehaviour.TrimmingBehaviour`2.Handle(TRequest request, RequestHandlerDelegate`1 next, CancellationToken cancellationToken) in D:\\personal\\bit-hrms\\src\\Application\\Common\\MediatRBehaviour\\TrimmingBehaviour.cs:line 21\r\n at Application.Common.MediatRBehaviour.AuthorizationBehaviour`2.Handle(TRequest request, RequestHandlerDelegate`1 next, CancellationToken cancellationToken) in D:\\personal\\bit-hrms\\src\\Application\\Common\\MediatRBehaviour\\AuthorizationBehaviour.cs:line 17\r\n at Application.Employees.Commands.AddEmployeeCommand.Handler.Handle(AddEmployeeCommand request, CancellationToken cancellationToken) in D:\\personal\\bit-hrms\\src\\Application\\Employees\\Commands\\AddEmployeeCommand.cs:line 105\r\n at Application.Employees.Commands.AddEmployeeCommand.Handler.Handle(AddEmployeeCommand request, CancellationToken cancellationToken) in D:\\personal\\bit-hrms\\src\\Application\\Employees\\Commands\\AddEmployeeCommand.cs:line 134\r\n at Application.Common.MediatRBehaviour.ValidationBehaviour`2.Handle(TRequest request, RequestHandlerDelegate`1 next, CancellationToken cancellationToken) in D:\\personal\\bit-hrms\\src\\Application\\Common\\MediatRBehaviour\\ValidationBehaviour.cs:line 28\r\n at Application.Common.MediatRBehaviour.TrimmingBehaviour`2.Handle(TRequest request, RequestHandlerDelegate`1 next, CancellationToken cancellationToken) in D:\\personal\\bit-hrms\\src\\Application\\Common\\MediatRBehaviour\\TrimmingBehaviour.cs:line 21\r\n at Application.Common.MediatRBehaviour.AuthorizationBehaviour`2.Handle(TRequest request, RequestHandlerDelegate`1 next, CancellationToken cancellationToken) in D:\\personal\\bit-hrms\\src\\Application\\Common\\MediatRBehaviour\\AuthorizationBehaviour.cs:line 17\r\n at Presentation.Controllers.EmployeesController.AddAsync(AddEmployeeCommand command) in D:\\personal\\bit-hrms\\src\\Presentation.Server\\Controllers\\EmployeesController.cs:line 12\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.TaskOfIActionResultExecutor.Execute(ActionContext actionContext, IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.g__Awaited|12_0(ControllerActionInvoker invoker, ValueTask`1 actionResultValueTask)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.g__Awaited|10_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.g__Awaited|13_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.g__Awaited|25_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Rethrow(ResourceExecutedContextSealed context)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.g__Awaited|20_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.g__Logged|17_1(ResourceInvoker invoker)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.g__Logged|17_1(ResourceInvoker invoker)\r\n at Microsoft.AspNetCore.Routing.EndpointMiddleware.g__AwaitRequestTask|7_0(Endpoint endpoint, Task requestTask, ILogger logger)\r\n at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context)\r\n at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)\r\n at Swashbuckle.AspNetCore.SwaggerUI.SwaggerUIMiddleware.Invoke(HttpContext httpContext)\r\n at Swashbuckle.AspNetCore.Swagger.SwaggerMiddleware.Invoke(HttpContext httpContext, ISwaggerProvider swaggerProvider)\r\n at Serilog.AspNetCore.RequestLoggingMiddleware.Invoke(HttpContext httpContext)\r\n at Presentation.Middleware.ExceptionHandlingMiddleware.InvokeAsync(HttpContext context) in D:\\personal\\bit-hrms\\src\\Presentation.Server\\Middleware\\ExceptionHandlingMiddleware.cs:line 17" \ No newline at end of file diff --git a/tests/Tests.Integration/Tests/Employees/GetEmployees.Should_Return_Data.received.json b/tests/Tests.Integration/Tests/Employees/GetEmployees.Should_Return_Data.received.json deleted file mode 100644 index d001279..0000000 --- a/tests/Tests.Integration/Tests/Employees/GetEmployees.Should_Return_Data.received.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "page": 1, - "limit": 10, - "total": 0, - "items": [] -} \ No newline at end of file diff --git a/tests/Tests.Integration/Tests/Employees/UpdateEmployeeDocumnet.Should_Return_Data.received.json b/tests/Tests.Integration/Tests/Employees/UpdateEmployeeDocumnet.Should_Return_Data.received.json deleted file mode 100644 index b55761c..0000000 --- a/tests/Tests.Integration/Tests/Employees/UpdateEmployeeDocumnet.Should_Return_Data.received.json +++ /dev/null @@ -1 +0,0 @@ -"Sequence contains no elements.\r\n at Microsoft.EntityFrameworkCore.Query.ShapedQueryCompilingExpressionVisitor.SingleAsync[TSource](IAsyncEnumerable`1 asyncEnumerable, CancellationToken cancellationToken)\r\n at Microsoft.EntityFrameworkCore.Query.ShapedQueryCompilingExpressionVisitor.SingleAsync[TSource](IAsyncEnumerable`1 asyncEnumerable, CancellationToken cancellationToken)\r\n at Application.Employees.Commands.SetEmployeeDocumentCommand.Handler.Handle(SetEmployeeDocumentCommand request, CancellationToken cancellationToken) in D:\\personal\\bit-hrms\\src\\Application\\Employees\\Commands\\SetEmployeeDocumentCommand.cs:line 33\r\n at Application.Common.MediatRBehaviour.ValidationBehaviour`2.Handle(TRequest request, RequestHandlerDelegate`1 next, CancellationToken cancellationToken) in D:\\personal\\bit-hrms\\src\\Application\\Common\\MediatRBehaviour\\ValidationBehaviour.cs:line 28\r\n at Application.Common.MediatRBehaviour.TrimmingBehaviour`2.Handle(TRequest request, RequestHandlerDelegate`1 next, CancellationToken cancellationToken) in D:\\personal\\bit-hrms\\src\\Application\\Common\\MediatRBehaviour\\TrimmingBehaviour.cs:line 21\r\n at Application.Common.MediatRBehaviour.AuthorizationBehaviour`2.Handle(TRequest request, RequestHandlerDelegate`1 next, CancellationToken cancellationToken) in D:\\personal\\bit-hrms\\src\\Application\\Common\\MediatRBehaviour\\AuthorizationBehaviour.cs:line 17\r\n at Presentation.Controllers.EmployeesController.UpdateAsync(Int32 employeeId, SetEmployeeDocumentCommand command) in D:\\personal\\bit-hrms\\src\\Presentation.Server\\Controllers\\EmployeesController.cs:line 38\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.TaskOfIActionResultExecutor.Execute(ActionContext actionContext, IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.g__Awaited|12_0(ControllerActionInvoker invoker, ValueTask`1 actionResultValueTask)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.g__Awaited|10_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.g__Awaited|13_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.g__Awaited|25_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Rethrow(ResourceExecutedContextSealed context)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.g__Awaited|20_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.g__Logged|17_1(ResourceInvoker invoker)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.g__Logged|17_1(ResourceInvoker invoker)\r\n at Microsoft.AspNetCore.Routing.EndpointMiddleware.g__AwaitRequestTask|7_0(Endpoint endpoint, Task requestTask, ILogger logger)\r\n at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context)\r\n at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)\r\n at Swashbuckle.AspNetCore.SwaggerUI.SwaggerUIMiddleware.Invoke(HttpContext httpContext)\r\n at Swashbuckle.AspNetCore.Swagger.SwaggerMiddleware.Invoke(HttpContext httpContext, ISwaggerProvider swaggerProvider)\r\n at Serilog.AspNetCore.RequestLoggingMiddleware.Invoke(HttpContext httpContext)\r\n at Presentation.Middleware.ExceptionHandlingMiddleware.InvokeAsync(HttpContext context) in D:\\personal\\bit-hrms\\src\\Presentation.Server\\Middleware\\ExceptionHandlingMiddleware.cs:line 17" \ No newline at end of file diff --git a/tests/Tests.Integration/Tests/Expenses/GetExpenses.Should_return_expenses.received.json b/tests/Tests.Integration/Tests/Expenses/GetExpenses.Should_return_expenses.received.json deleted file mode 100644 index d001279..0000000 --- a/tests/Tests.Integration/Tests/Expenses/GetExpenses.Should_return_expenses.received.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "page": 1, - "limit": 10, - "total": 0, - "items": [] -} \ No newline at end of file diff --git a/tests/Tests.Integration/Tests/Holidays/AddHoliday.Should_Return_Data.received.json b/tests/Tests.Integration/Tests/Holidays/AddHoliday.Should_Return_Data.received.json deleted file mode 100644 index b8075a0..0000000 --- a/tests/Tests.Integration/Tests/Holidays/AddHoliday.Should_Return_Data.received.json +++ /dev/null @@ -1 +0,0 @@ -"Sequence contains no elements.\r\n at Microsoft.EntityFrameworkCore.Query.ShapedQueryCompilingExpressionVisitor.SingleAsync[TSource](IAsyncEnumerable`1 asyncEnumerable, CancellationToken cancellationToken)\r\n at Microsoft.EntityFrameworkCore.Query.ShapedQueryCompilingExpressionVisitor.SingleAsync[TSource](IAsyncEnumerable`1 asyncEnumerable, CancellationToken cancellationToken)\r\n at Application.Holidays.Commands.AddHolidayCommand.Handler.Handle(AddHolidayCommand request, CancellationToken cancellationToken) in D:\\personal\\bit-hrms\\src\\Application\\Holidays\\Commands\\AddHolidayCommand.cs:line 25\r\n at Application.Common.MediatRBehaviour.ValidationBehaviour`2.Handle(TRequest request, RequestHandlerDelegate`1 next, CancellationToken cancellationToken) in D:\\personal\\bit-hrms\\src\\Application\\Common\\MediatRBehaviour\\ValidationBehaviour.cs:line 28\r\n at Application.Common.MediatRBehaviour.TrimmingBehaviour`2.Handle(TRequest request, RequestHandlerDelegate`1 next, CancellationToken cancellationToken) in D:\\personal\\bit-hrms\\src\\Application\\Common\\MediatRBehaviour\\TrimmingBehaviour.cs:line 21\r\n at Application.Common.MediatRBehaviour.AuthorizationBehaviour`2.Handle(TRequest request, RequestHandlerDelegate`1 next, CancellationToken cancellationToken) in D:\\personal\\bit-hrms\\src\\Application\\Common\\MediatRBehaviour\\AuthorizationBehaviour.cs:line 17\r\n at Presentation.Controllers.HolidaysController.AddAsync(AddHolidayCommand command) in D:\\personal\\bit-hrms\\src\\Presentation.Server\\Controllers\\HolidaysController.cs:line 19\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.TaskOfIActionResultExecutor.Execute(ActionContext actionContext, IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.g__Awaited|12_0(ControllerActionInvoker invoker, ValueTask`1 actionResultValueTask)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.g__Awaited|10_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.g__Awaited|13_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.g__Awaited|25_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Rethrow(ResourceExecutedContextSealed context)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.g__Awaited|20_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.g__Logged|17_1(ResourceInvoker invoker)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.g__Logged|17_1(ResourceInvoker invoker)\r\n at Microsoft.AspNetCore.Routing.EndpointMiddleware.g__AwaitRequestTask|7_0(Endpoint endpoint, Task requestTask, ILogger logger)\r\n at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context)\r\n at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)\r\n at Swashbuckle.AspNetCore.SwaggerUI.SwaggerUIMiddleware.Invoke(HttpContext httpContext)\r\n at Swashbuckle.AspNetCore.Swagger.SwaggerMiddleware.Invoke(HttpContext httpContext, ISwaggerProvider swaggerProvider)\r\n at Serilog.AspNetCore.RequestLoggingMiddleware.Invoke(HttpContext httpContext)\r\n at Presentation.Middleware.ExceptionHandlingMiddleware.InvokeAsync(HttpContext context) in D:\\personal\\bit-hrms\\src\\Presentation.Server\\Middleware\\ExceptionHandlingMiddleware.cs:line 17" \ No newline at end of file diff --git a/tests/Tests.Integration/Tests/Holidays/GetHolidays.Should_Return_Data.received.json b/tests/Tests.Integration/Tests/Holidays/GetHolidays.Should_Return_Data.received.json deleted file mode 100644 index d001279..0000000 --- a/tests/Tests.Integration/Tests/Holidays/GetHolidays.Should_Return_Data.received.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "page": 1, - "limit": 10, - "total": 0, - "items": [] -} \ No newline at end of file diff --git a/tests/Tests.Integration/Tests/Holidays/UpdateHoliday.Should_Return_Data.received.json b/tests/Tests.Integration/Tests/Holidays/UpdateHoliday.Should_Return_Data.received.json deleted file mode 100644 index 0ac85b7..0000000 --- a/tests/Tests.Integration/Tests/Holidays/UpdateHoliday.Should_Return_Data.received.json +++ /dev/null @@ -1 +0,0 @@ -"Sequence contains no elements.\r\n at Microsoft.EntityFrameworkCore.Query.ShapedQueryCompilingExpressionVisitor.SingleAsync[TSource](IAsyncEnumerable\u00601 asyncEnumerable, CancellationToken cancellationToken)\r\n at Microsoft.EntityFrameworkCore.Query.ShapedQueryCompilingExpressionVisitor.SingleAsync[TSource](IAsyncEnumerable\u00601 asyncEnumerable, CancellationToken cancellationToken)\r\n at Application.Holidays.Commands.UpdateHolidayCommand.Handler.Handle(UpdateHolidayCommand request, CancellationToken cancellationToken) in D:\\personal\\bit-hrms\\src\\Application\\Holidays\\Commands\\UpdateHolidayCommand.cs:line 31\r\n at Application.Common.MediatRBehaviour.ValidationBehaviour\u00602.Handle(TRequest request, RequestHandlerDelegate\u00601 next, CancellationToken cancellationToken) in D:\\personal\\bit-hrms\\src\\Application\\Common\\MediatRBehaviour\\ValidationBehaviour.cs:line 28\r\n at Application.Common.MediatRBehaviour.TrimmingBehaviour\u00602.Handle(TRequest request, RequestHandlerDelegate\u00601 next, CancellationToken cancellationToken) in D:\\personal\\bit-hrms\\src\\Application\\Common\\MediatRBehaviour\\TrimmingBehaviour.cs:line 21\r\n at Application.Common.MediatRBehaviour.AuthorizationBehaviour\u00602.Handle(TRequest request, RequestHandlerDelegate\u00601 next, CancellationToken cancellationToken) in D:\\personal\\bit-hrms\\src\\Application\\Common\\MediatRBehaviour\\AuthorizationBehaviour.cs:line 17\r\n at Presentation.Controllers.HolidaysController.UpdateAsync(Int32 holidayId, UpdateHolidayCommand command) in D:\\personal\\bit-hrms\\src\\Presentation.Server\\Controllers\\HolidaysController.cs:line 31\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.TaskOfIActionResultExecutor.Execute(ActionContext actionContext, IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.\u003CInvokeActionMethodAsync\u003Eg__Awaited|12_0(ControllerActionInvoker invoker, ValueTask\u00601 actionResultValueTask)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.\u003CInvokeNextActionFilterAsync\u003Eg__Awaited|10_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State\u0026 next, Scope\u0026 scope, Object\u0026 state, Boolean\u0026 isCompleted)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.\u003CInvokeInnerFilterAsync\u003Eg__Awaited|13_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.\u003CInvokeNextResourceFilter\u003Eg__Awaited|25_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Rethrow(ResourceExecutedContextSealed context)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Next(State\u0026 next, Scope\u0026 scope, Object\u0026 state, Boolean\u0026 isCompleted)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.\u003CInvokeFilterPipelineAsync\u003Eg__Awaited|20_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.\u003CInvokeAsync\u003Eg__Logged|17_1(ResourceInvoker invoker)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.\u003CInvokeAsync\u003Eg__Logged|17_1(ResourceInvoker invoker)\r\n at Microsoft.AspNetCore.Routing.EndpointMiddleware.\u003CInvoke\u003Eg__AwaitRequestTask|7_0(Endpoint endpoint, Task requestTask, ILogger logger)\r\n at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context)\r\n at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)\r\n at Swashbuckle.AspNetCore.SwaggerUI.SwaggerUIMiddleware.Invoke(HttpContext httpContext)\r\n at Swashbuckle.AspNetCore.Swagger.SwaggerMiddleware.Invoke(HttpContext httpContext, ISwaggerProvider swaggerProvider)\r\n at Serilog.AspNetCore.RequestLoggingMiddleware.Invoke(HttpContext httpContext)\r\n at Presentation.Middleware.ExceptionHandlingMiddleware.InvokeAsync(HttpContext context) in D:\\personal\\bit-hrms\\src\\Presentation.Server\\Middleware\\ExceptionHandlingMiddleware.cs:line 17" \ No newline at end of file diff --git a/tests/Tests.Integration/Tests/IncomeSources/GetIncomeSources.Should_Return_Income_Sources.received.json b/tests/Tests.Integration/Tests/IncomeSources/GetIncomeSources.Should_Return_Income_Sources.received.json deleted file mode 100644 index d001279..0000000 --- a/tests/Tests.Integration/Tests/IncomeSources/GetIncomeSources.Should_Return_Income_Sources.received.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "page": 1, - "limit": 10, - "total": 0, - "items": [] -} \ No newline at end of file diff --git a/tests/Tests.Integration/Tests/Incomes/GetIncomes.Should_return_data.received.json b/tests/Tests.Integration/Tests/Incomes/GetIncomes.Should_return_data.received.json deleted file mode 100644 index d001279..0000000 --- a/tests/Tests.Integration/Tests/Incomes/GetIncomes.Should_return_data.received.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "page": 1, - "limit": 10, - "total": 0, - "items": [] -} \ No newline at end of file diff --git a/tests/Tests.Integration/Tests/JobTitles/AddJobTitle.Should_Return_Data.received.json b/tests/Tests.Integration/Tests/JobTitles/AddJobTitle.Should_Return_Data.received.json deleted file mode 100644 index 043c87f..0000000 --- a/tests/Tests.Integration/Tests/JobTitles/AddJobTitle.Should_Return_Data.received.json +++ /dev/null @@ -1 +0,0 @@ -"Sequence contains no elements.\r\n at Microsoft.EntityFrameworkCore.Query.ShapedQueryCompilingExpressionVisitor.SingleAsync[TSource](IAsyncEnumerable`1 asyncEnumerable, CancellationToken cancellationToken)\r\n at Microsoft.EntityFrameworkCore.Query.ShapedQueryCompilingExpressionVisitor.SingleAsync[TSource](IAsyncEnumerable`1 asyncEnumerable, CancellationToken cancellationToken)\r\n at Application.JobTitles.Commands.AddJobTitleCommand.Handler.Handle(AddJobTitleCommand request, CancellationToken cancellationToken) in D:\\personal\\bit-hrms\\src\\Application\\JobTitles\\Commands\\AddJobTitleCommand.cs:line 26\r\n at Application.Common.MediatRBehaviour.ValidationBehaviour`2.Handle(TRequest request, RequestHandlerDelegate`1 next, CancellationToken cancellationToken) in D:\\personal\\bit-hrms\\src\\Application\\Common\\MediatRBehaviour\\ValidationBehaviour.cs:line 28\r\n at Application.Common.MediatRBehaviour.TrimmingBehaviour`2.Handle(TRequest request, RequestHandlerDelegate`1 next, CancellationToken cancellationToken) in D:\\personal\\bit-hrms\\src\\Application\\Common\\MediatRBehaviour\\TrimmingBehaviour.cs:line 21\r\n at Application.Common.MediatRBehaviour.AuthorizationBehaviour`2.Handle(TRequest request, RequestHandlerDelegate`1 next, CancellationToken cancellationToken) in D:\\personal\\bit-hrms\\src\\Application\\Common\\MediatRBehaviour\\AuthorizationBehaviour.cs:line 17\r\n at Presentation.Controllers.JobTitlesController.AddAsync(AddJobTitleCommand command) in D:\\personal\\bit-hrms\\src\\Presentation.Server\\Controllers\\JobTitlesController.cs:line 19\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.TaskOfIActionResultExecutor.Execute(ActionContext actionContext, IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.g__Awaited|12_0(ControllerActionInvoker invoker, ValueTask`1 actionResultValueTask)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.g__Awaited|10_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.g__Awaited|13_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.g__Awaited|25_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Rethrow(ResourceExecutedContextSealed context)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.g__Awaited|20_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.g__Logged|17_1(ResourceInvoker invoker)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.g__Logged|17_1(ResourceInvoker invoker)\r\n at Microsoft.AspNetCore.Routing.EndpointMiddleware.g__AwaitRequestTask|7_0(Endpoint endpoint, Task requestTask, ILogger logger)\r\n at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context)\r\n at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)\r\n at Swashbuckle.AspNetCore.SwaggerUI.SwaggerUIMiddleware.Invoke(HttpContext httpContext)\r\n at Swashbuckle.AspNetCore.Swagger.SwaggerMiddleware.Invoke(HttpContext httpContext, ISwaggerProvider swaggerProvider)\r\n at Serilog.AspNetCore.RequestLoggingMiddleware.Invoke(HttpContext httpContext)\r\n at Presentation.Middleware.ExceptionHandlingMiddleware.InvokeAsync(HttpContext context) in D:\\personal\\bit-hrms\\src\\Presentation.Server\\Middleware\\ExceptionHandlingMiddleware.cs:line 17" \ No newline at end of file diff --git a/tests/Tests.Integration/Tests/JobTitles/GetJobTitles.Should_Return_Data.received.json b/tests/Tests.Integration/Tests/JobTitles/GetJobTitles.Should_Return_Data.received.json deleted file mode 100644 index d001279..0000000 --- a/tests/Tests.Integration/Tests/JobTitles/GetJobTitles.Should_Return_Data.received.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "page": 1, - "limit": 10, - "total": 0, - "items": [] -} \ No newline at end of file diff --git a/tests/Tests.Integration/Tests/JobTitles/UpdateJobTitle.Should_Return_Data.received.json b/tests/Tests.Integration/Tests/JobTitles/UpdateJobTitle.Should_Return_Data.received.json deleted file mode 100644 index fd80137..0000000 --- a/tests/Tests.Integration/Tests/JobTitles/UpdateJobTitle.Should_Return_Data.received.json +++ /dev/null @@ -1 +0,0 @@ -"Sequence contains no elements.\r\n at Microsoft.EntityFrameworkCore.Query.ShapedQueryCompilingExpressionVisitor.SingleAsync[TSource](IAsyncEnumerable\u00601 asyncEnumerable, CancellationToken cancellationToken)\r\n at Microsoft.EntityFrameworkCore.Query.ShapedQueryCompilingExpressionVisitor.SingleAsync[TSource](IAsyncEnumerable\u00601 asyncEnumerable, CancellationToken cancellationToken)\r\n at Application.JobTitles.Commands.UpdateJobTitleCommand.Handler.Handle(UpdateJobTitleCommand request, CancellationToken cancellationToken) in D:\\personal\\bit-hrms\\src\\Application\\JobTitles\\Commands\\UpdateJobTitleCommand.cs:line 26\r\n at Application.Common.MediatRBehaviour.ValidationBehaviour\u00602.Handle(TRequest request, RequestHandlerDelegate\u00601 next, CancellationToken cancellationToken) in D:\\personal\\bit-hrms\\src\\Application\\Common\\MediatRBehaviour\\ValidationBehaviour.cs:line 28\r\n at Application.Common.MediatRBehaviour.TrimmingBehaviour\u00602.Handle(TRequest request, RequestHandlerDelegate\u00601 next, CancellationToken cancellationToken) in D:\\personal\\bit-hrms\\src\\Application\\Common\\MediatRBehaviour\\TrimmingBehaviour.cs:line 21\r\n at Application.Common.MediatRBehaviour.AuthorizationBehaviour\u00602.Handle(TRequest request, RequestHandlerDelegate\u00601 next, CancellationToken cancellationToken) in D:\\personal\\bit-hrms\\src\\Application\\Common\\MediatRBehaviour\\AuthorizationBehaviour.cs:line 17\r\n at Presentation.Controllers.JobTitlesController.UpdateAsync(Int32 jobTitleId, UpdateJobTitleCommand command) in D:\\personal\\bit-hrms\\src\\Presentation.Server\\Controllers\\JobTitlesController.cs:line 30\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.TaskOfIActionResultExecutor.Execute(ActionContext actionContext, IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.\u003CInvokeActionMethodAsync\u003Eg__Awaited|12_0(ControllerActionInvoker invoker, ValueTask\u00601 actionResultValueTask)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.\u003CInvokeNextActionFilterAsync\u003Eg__Awaited|10_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State\u0026 next, Scope\u0026 scope, Object\u0026 state, Boolean\u0026 isCompleted)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.\u003CInvokeInnerFilterAsync\u003Eg__Awaited|13_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.\u003CInvokeNextResourceFilter\u003Eg__Awaited|25_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Rethrow(ResourceExecutedContextSealed context)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Next(State\u0026 next, Scope\u0026 scope, Object\u0026 state, Boolean\u0026 isCompleted)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.\u003CInvokeFilterPipelineAsync\u003Eg__Awaited|20_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.\u003CInvokeAsync\u003Eg__Logged|17_1(ResourceInvoker invoker)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.\u003CInvokeAsync\u003Eg__Logged|17_1(ResourceInvoker invoker)\r\n at Microsoft.AspNetCore.Routing.EndpointMiddleware.\u003CInvoke\u003Eg__AwaitRequestTask|7_0(Endpoint endpoint, Task requestTask, ILogger logger)\r\n at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context)\r\n at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)\r\n at Swashbuckle.AspNetCore.SwaggerUI.SwaggerUIMiddleware.Invoke(HttpContext httpContext)\r\n at Swashbuckle.AspNetCore.Swagger.SwaggerMiddleware.Invoke(HttpContext httpContext, ISwaggerProvider swaggerProvider)\r\n at Serilog.AspNetCore.RequestLoggingMiddleware.Invoke(HttpContext httpContext)\r\n at Presentation.Middleware.ExceptionHandlingMiddleware.InvokeAsync(HttpContext context) in D:\\personal\\bit-hrms\\src\\Presentation.Server\\Middleware\\ExceptionHandlingMiddleware.cs:line 17" \ No newline at end of file diff --git a/tests/Tests.Integration/Tests/LeavePolicy/UpdateLeavePolicy.Should_Return_Data.received.json b/tests/Tests.Integration/Tests/LeavePolicy/UpdateLeavePolicy.Should_Return_Data.received.json deleted file mode 100644 index 9ef5964..0000000 --- a/tests/Tests.Integration/Tests/LeavePolicy/UpdateLeavePolicy.Should_Return_Data.received.json +++ /dev/null @@ -1 +0,0 @@ -"Sequence contains no elements.\r\n at Microsoft.EntityFrameworkCore.Query.ShapedQueryCompilingExpressionVisitor.SingleAsync[TSource](IAsyncEnumerable\u00601 asyncEnumerable, CancellationToken cancellationToken)\r\n at Microsoft.EntityFrameworkCore.Query.ShapedQueryCompilingExpressionVisitor.SingleAsync[TSource](IAsyncEnumerable\u00601 asyncEnumerable, CancellationToken cancellationToken)\r\n at Application.LeavePolicies.Commands.SetLeavePolicy.SetLeavePolicyCommand.Handler.Handle(SetLeavePolicyCommand request, CancellationToken cancellationToken) in D:\\personal\\bit-hrms\\src\\Application\\LeavePolicies\\Commands\\SetLeavePolicy\\SetLeavePolicyCommand.cs:line 30\r\n at Application.Common.MediatRBehaviour.ValidationBehaviour\u00602.Handle(TRequest request, RequestHandlerDelegate\u00601 next, CancellationToken cancellationToken) in D:\\personal\\bit-hrms\\src\\Application\\Common\\MediatRBehaviour\\ValidationBehaviour.cs:line 28\r\n at Application.Common.MediatRBehaviour.TrimmingBehaviour\u00602.Handle(TRequest request, RequestHandlerDelegate\u00601 next, CancellationToken cancellationToken) in D:\\personal\\bit-hrms\\src\\Application\\Common\\MediatRBehaviour\\TrimmingBehaviour.cs:line 21\r\n at Application.Common.MediatRBehaviour.AuthorizationBehaviour\u00602.Handle(TRequest request, RequestHandlerDelegate\u00601 next, CancellationToken cancellationToken) in D:\\personal\\bit-hrms\\src\\Application\\Common\\MediatRBehaviour\\AuthorizationBehaviour.cs:line 17\r\n at Presentation.Controllers.LeavePolicyController.SetAsync(SetLeavePolicyCommand command) in D:\\personal\\bit-hrms\\src\\Presentation.Server\\Controllers\\LeavePolicyController.cs:line 20\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.TaskOfIActionResultExecutor.Execute(ActionContext actionContext, IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.\u003CInvokeActionMethodAsync\u003Eg__Awaited|12_0(ControllerActionInvoker invoker, ValueTask\u00601 actionResultValueTask)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.\u003CInvokeNextActionFilterAsync\u003Eg__Awaited|10_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State\u0026 next, Scope\u0026 scope, Object\u0026 state, Boolean\u0026 isCompleted)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.\u003CInvokeInnerFilterAsync\u003Eg__Awaited|13_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.\u003CInvokeNextResourceFilter\u003Eg__Awaited|25_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Rethrow(ResourceExecutedContextSealed context)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Next(State\u0026 next, Scope\u0026 scope, Object\u0026 state, Boolean\u0026 isCompleted)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.\u003CInvokeFilterPipelineAsync\u003Eg__Awaited|20_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.\u003CInvokeAsync\u003Eg__Logged|17_1(ResourceInvoker invoker)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.\u003CInvokeAsync\u003Eg__Logged|17_1(ResourceInvoker invoker)\r\n at Microsoft.AspNetCore.Routing.EndpointMiddleware.\u003CInvoke\u003Eg__AwaitRequestTask|7_0(Endpoint endpoint, Task requestTask, ILogger logger)\r\n at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context)\r\n at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)\r\n at Swashbuckle.AspNetCore.SwaggerUI.SwaggerUIMiddleware.Invoke(HttpContext httpContext)\r\n at Swashbuckle.AspNetCore.Swagger.SwaggerMiddleware.Invoke(HttpContext httpContext, ISwaggerProvider swaggerProvider)\r\n at Serilog.AspNetCore.RequestLoggingMiddleware.Invoke(HttpContext httpContext)\r\n at Presentation.Middleware.ExceptionHandlingMiddleware.InvokeAsync(HttpContext context) in D:\\personal\\bit-hrms\\src\\Presentation.Server\\Middleware\\ExceptionHandlingMiddleware.cs:line 17" \ No newline at end of file diff --git a/tests/Tests.Integration/Tests/Reports/GetAdminBasicReports.Should_Return_Data.received.json b/tests/Tests.Integration/Tests/Reports/GetAdminBasicReports.Should_Return_Data.received.json deleted file mode 100644 index 9213768..0000000 --- a/tests/Tests.Integration/Tests/Reports/GetAdminBasicReports.Should_Return_Data.received.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "departments": 0, - "companies": 0, - "employees": 0, - "holidays": 0 -} \ No newline at end of file diff --git a/tests/Tests.Integration/Tests/Salaries/GetEstimatedSalary.Should_Return_Data_For_Month_Filter.received.json b/tests/Tests.Integration/Tests/Salaries/GetEstimatedSalary.Should_Return_Data_For_Month_Filter.received.json deleted file mode 100644 index 92d542d..0000000 --- a/tests/Tests.Integration/Tests/Salaries/GetEstimatedSalary.Should_Return_Data_For_Month_Filter.received.json +++ /dev/null @@ -1,135 +0,0 @@ -{ - "employeeId": 1, - "compensation": 0, - "deductions": [ - { - "deductionType": "Absent", - "deductionDate": "2024-05-01", - "amount": 0 - }, - { - "deductionType": "Absent", - "deductionDate": "2024-05-02", - "amount": 0 - }, - { - "deductionType": "Absent", - "deductionDate": "2024-05-03", - "amount": 0 - }, - { - "deductionType": "Absent", - "deductionDate": "2024-05-06", - "amount": 0 - }, - { - "deductionType": "Absent", - "deductionDate": "2024-05-07", - "amount": 0 - }, - { - "deductionType": "Absent", - "deductionDate": "2024-05-08", - "amount": 0 - }, - { - "deductionType": "Absent", - "deductionDate": "2024-05-09", - "amount": 0 - }, - { - "deductionType": "Absent", - "deductionDate": "2024-05-10", - "amount": 0 - }, - { - "deductionType": "Absent", - "deductionDate": "2024-05-11", - "amount": 0 - }, - { - "deductionType": "Absent", - "deductionDate": "2024-05-13", - "amount": 0 - }, - { - "deductionType": "Absent", - "deductionDate": "2024-05-14", - "amount": 0 - }, - { - "deductionType": "Absent", - "deductionDate": "2024-05-15", - "amount": 0 - }, - { - "deductionType": "Absent", - "deductionDate": "2024-05-16", - "amount": 0 - }, - { - "deductionType": "Absent", - "deductionDate": "2024-05-17", - "amount": 0 - }, - { - "deductionType": "Absent", - "deductionDate": "2024-05-20", - "amount": 0 - }, - { - "deductionType": "Absent", - "deductionDate": "2024-05-21", - "amount": 0 - }, - { - "deductionType": "Absent", - "deductionDate": "2024-05-22", - "amount": 0 - }, - { - "deductionType": "Absent", - "deductionDate": "2024-05-23", - "amount": 0 - }, - { - "deductionType": "Absent", - "deductionDate": "2024-05-24", - "amount": 0 - }, - { - "deductionType": "Absent", - "deductionDate": "2024-05-25", - "amount": 0 - }, - { - "deductionType": "Absent", - "deductionDate": "2024-05-27", - "amount": 0 - }, - { - "deductionType": "Absent", - "deductionDate": "2024-05-28", - "amount": 0 - }, - { - "deductionType": "Absent", - "deductionDate": "2024-05-29", - "amount": 0 - }, - { - "deductionType": "Absent", - "deductionDate": "2024-05-30", - "amount": 0 - }, - { - "deductionType": "Absent", - "deductionDate": "2024-05-31", - "amount": 0 - } - ], - "amountDeducted": 0, - "netAmount": 0, - "month": 5, - "year": 2024 -} \ No newline at end of file diff --git a/tests/Tests.Integration/Tests/Salaries/GetEstimatedSalary.Should_Return_Data_Of_Other_Employee_For_Company_Admin.received.json b/tests/Tests.Integration/Tests/Salaries/GetEstimatedSalary.Should_Return_Data_Of_Other_Employee_For_Company_Admin.received.json deleted file mode 100644 index 92d542d..0000000 --- a/tests/Tests.Integration/Tests/Salaries/GetEstimatedSalary.Should_Return_Data_Of_Other_Employee_For_Company_Admin.received.json +++ /dev/null @@ -1,135 +0,0 @@ -{ - "employeeId": 1, - "compensation": 0, - "deductions": [ - { - "deductionType": "Absent", - "deductionDate": "2024-05-01", - "amount": 0 - }, - { - "deductionType": "Absent", - "deductionDate": "2024-05-02", - "amount": 0 - }, - { - "deductionType": "Absent", - "deductionDate": "2024-05-03", - "amount": 0 - }, - { - "deductionType": "Absent", - "deductionDate": "2024-05-06", - "amount": 0 - }, - { - "deductionType": "Absent", - "deductionDate": "2024-05-07", - "amount": 0 - }, - { - "deductionType": "Absent", - "deductionDate": "2024-05-08", - "amount": 0 - }, - { - "deductionType": "Absent", - "deductionDate": "2024-05-09", - "amount": 0 - }, - { - "deductionType": "Absent", - "deductionDate": "2024-05-10", - "amount": 0 - }, - { - "deductionType": "Absent", - "deductionDate": "2024-05-11", - "amount": 0 - }, - { - "deductionType": "Absent", - "deductionDate": "2024-05-13", - "amount": 0 - }, - { - "deductionType": "Absent", - "deductionDate": "2024-05-14", - "amount": 0 - }, - { - "deductionType": "Absent", - "deductionDate": "2024-05-15", - "amount": 0 - }, - { - "deductionType": "Absent", - "deductionDate": "2024-05-16", - "amount": 0 - }, - { - "deductionType": "Absent", - "deductionDate": "2024-05-17", - "amount": 0 - }, - { - "deductionType": "Absent", - "deductionDate": "2024-05-20", - "amount": 0 - }, - { - "deductionType": "Absent", - "deductionDate": "2024-05-21", - "amount": 0 - }, - { - "deductionType": "Absent", - "deductionDate": "2024-05-22", - "amount": 0 - }, - { - "deductionType": "Absent", - "deductionDate": "2024-05-23", - "amount": 0 - }, - { - "deductionType": "Absent", - "deductionDate": "2024-05-24", - "amount": 0 - }, - { - "deductionType": "Absent", - "deductionDate": "2024-05-25", - "amount": 0 - }, - { - "deductionType": "Absent", - "deductionDate": "2024-05-27", - "amount": 0 - }, - { - "deductionType": "Absent", - "deductionDate": "2024-05-28", - "amount": 0 - }, - { - "deductionType": "Absent", - "deductionDate": "2024-05-29", - "amount": 0 - }, - { - "deductionType": "Absent", - "deductionDate": "2024-05-30", - "amount": 0 - }, - { - "deductionType": "Absent", - "deductionDate": "2024-05-31", - "amount": 0 - } - ], - "amountDeducted": 0, - "netAmount": 0, - "month": 5, - "year": 2024 -} \ No newline at end of file diff --git a/tests/Tests.Integration/Tests/Salaries/GetEstimatedSalary.Should_Return_Data_Of_Own_Employee_.received.json b/tests/Tests.Integration/Tests/Salaries/GetEstimatedSalary.Should_Return_Data_Of_Own_Employee_.received.json deleted file mode 100644 index da6c3d0..0000000 --- a/tests/Tests.Integration/Tests/Salaries/GetEstimatedSalary.Should_Return_Data_Of_Own_Employee_.received.json +++ /dev/null @@ -1,135 +0,0 @@ -{ - "employeeId": 0, - "compensation": 0, - "deductions": [ - { - "deductionType": "Absent", - "deductionDate": "2024-05-01", - "amount": 0 - }, - { - "deductionType": "Absent", - "deductionDate": "2024-05-02", - "amount": 0 - }, - { - "deductionType": "Absent", - "deductionDate": "2024-05-03", - "amount": 0 - }, - { - "deductionType": "Absent", - "deductionDate": "2024-05-06", - "amount": 0 - }, - { - "deductionType": "Absent", - "deductionDate": "2024-05-07", - "amount": 0 - }, - { - "deductionType": "Absent", - "deductionDate": "2024-05-08", - "amount": 0 - }, - { - "deductionType": "Absent", - "deductionDate": "2024-05-09", - "amount": 0 - }, - { - "deductionType": "Absent", - "deductionDate": "2024-05-10", - "amount": 0 - }, - { - "deductionType": "Absent", - "deductionDate": "2024-05-11", - "amount": 0 - }, - { - "deductionType": "Absent", - "deductionDate": "2024-05-13", - "amount": 0 - }, - { - "deductionType": "Absent", - "deductionDate": "2024-05-14", - "amount": 0 - }, - { - "deductionType": "Absent", - "deductionDate": "2024-05-15", - "amount": 0 - }, - { - "deductionType": "Absent", - "deductionDate": "2024-05-16", - "amount": 0 - }, - { - "deductionType": "Absent", - "deductionDate": "2024-05-17", - "amount": 0 - }, - { - "deductionType": "Absent", - "deductionDate": "2024-05-20", - "amount": 0 - }, - { - "deductionType": "Absent", - "deductionDate": "2024-05-21", - "amount": 0 - }, - { - "deductionType": "Absent", - "deductionDate": "2024-05-22", - "amount": 0 - }, - { - "deductionType": "Absent", - "deductionDate": "2024-05-23", - "amount": 0 - }, - { - "deductionType": "Absent", - "deductionDate": "2024-05-24", - "amount": 0 - }, - { - "deductionType": "Absent", - "deductionDate": "2024-05-25", - "amount": 0 - }, - { - "deductionType": "Absent", - "deductionDate": "2024-05-27", - "amount": 0 - }, - { - "deductionType": "Absent", - "deductionDate": "2024-05-28", - "amount": 0 - }, - { - "deductionType": "Absent", - "deductionDate": "2024-05-29", - "amount": 0 - }, - { - "deductionType": "Absent", - "deductionDate": "2024-05-30", - "amount": 0 - }, - { - "deductionType": "Absent", - "deductionDate": "2024-05-31", - "amount": 0 - } - ], - "amountDeducted": 0, - "netAmount": 0, - "month": 5, - "year": 2024 -} \ No newline at end of file diff --git a/tests/Tests.Integration/Tests/Salaries/GetSalaries.Should_Return_Data_For_Supplied_Month_If_Month_Supplied.received.json b/tests/Tests.Integration/Tests/Salaries/GetSalaries.Should_Return_Data_For_Supplied_Month_If_Month_Supplied.received.json deleted file mode 100644 index d001279..0000000 --- a/tests/Tests.Integration/Tests/Salaries/GetSalaries.Should_Return_Data_For_Supplied_Month_If_Month_Supplied.received.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "page": 1, - "limit": 10, - "total": 0, - "items": [] -} \ No newline at end of file diff --git a/tests/Tests.Integration/Tests/Salaries/GetSalaries.Should_Return_Date_For_Current_Month_If_Month_Not_Supplied.received.json b/tests/Tests.Integration/Tests/Salaries/GetSalaries.Should_Return_Date_For_Current_Month_If_Month_Not_Supplied.received.json deleted file mode 100644 index d001279..0000000 --- a/tests/Tests.Integration/Tests/Salaries/GetSalaries.Should_Return_Date_For_Current_Month_If_Month_Not_Supplied.received.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "page": 1, - "limit": 10, - "total": 0, - "items": [] -} \ No newline at end of file From 7290526d00cf54b45580e13a2febe789668c7eac Mon Sep 17 00:00:00 2001 From: dev-javid Date: Sun, 22 Sep 2024 13:33:52 +0530 Subject: [PATCH 3/7] Serilog-UI Basioc Auth --- .github/workflows/deploy.yml | 2 +- .../DependencyRegistration/AuthPolicy.cs | 34 ++++++++++++++- .../DependencyRegistration.cs | 9 +++- .../DependencyRegistration/Mvc.cs | 41 ------------------- .../DependencyRegistration/SerilogUI.cs | 14 ++++--- .../DependencyRegistration/Swagger.cs | 6 +-- .../Middleware/Middleware.cs | 7 +++- 7 files changed, 60 insertions(+), 53 deletions(-) delete mode 100644 src/Presentation.Server/DependencyRegistration/Mvc.cs diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 657f824..2b072b9 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -3,7 +3,7 @@ name: Deployment on: push: branches: - - main + - feature/user jobs: Deployment: diff --git a/src/Presentation.Server/DependencyRegistration/AuthPolicy.cs b/src/Presentation.Server/DependencyRegistration/AuthPolicy.cs index 658798d..d206045 100644 --- a/src/Presentation.Server/DependencyRegistration/AuthPolicy.cs +++ b/src/Presentation.Server/DependencyRegistration/AuthPolicy.cs @@ -1,6 +1,8 @@ +using static Domain.Common.Enums; + namespace Presentation.DependencyRegistration { - public static class AuthPolicy + internal static class AuthPolicy { public const string AllRoles = "ALL-ROLES-CAN-ACCESS"; public const string SuperAdmin = "ONLY-SUPER-ADMIN-CAN-ACCESS"; @@ -8,5 +10,35 @@ public static class AuthPolicy public const string CompanyAdminOrEmployee = "COMPANY-ADMIN-AND-EMPLOYEE-CAN-ACCESS"; public const string Employee = "ONLY-EMPLOYEE-CAN-ACCESS"; public const string AllowAnonymous = "ALLOW-ANONYMOUS"; + + internal static IServiceCollection AddAuthPolicy(this IServiceCollection services) + { + services.AddAuthorizationBuilder() + .AddPolicy(AllRoles, policy => policy.RequireAssertion(context => + { + return context.User.IsInRole(RoleName.SuperAdmin.ToString()) || + context.User.IsInRole(RoleName.CompanyAdmin.ToString()) || + context.User.IsInRole(RoleName.Employee.ToString()); + })) + .AddPolicy(SuperAdmin, policy => policy.RequireAssertion(context => + { + return context.User.IsInRole(RoleName.SuperAdmin.ToString()); + })) + .AddPolicy(CompanyAdmin, policy => policy.RequireAssertion(context => + { + return context.User.IsInRole(RoleName.CompanyAdmin.ToString()); + })) + .AddPolicy(CompanyAdminOrEmployee, policy => policy.RequireAssertion(context => + { + return context.User.IsInRole(RoleName.CompanyAdmin.ToString()) || + context.User.IsInRole(RoleName.Employee.ToString()); + })) + .AddPolicy(Employee, policy => policy.RequireAssertion(context => + { + return context.User.IsInRole(RoleName.Employee.ToString()); + })); + + return services; + } } } diff --git a/src/Presentation.Server/DependencyRegistration/DependencyRegistration.cs b/src/Presentation.Server/DependencyRegistration/DependencyRegistration.cs index fd5db6a..2823f58 100644 --- a/src/Presentation.Server/DependencyRegistration/DependencyRegistration.cs +++ b/src/Presentation.Server/DependencyRegistration/DependencyRegistration.cs @@ -1,3 +1,5 @@ +using Microsoft.AspNetCore.Mvc.Authorization; + namespace Presentation.DependencyRegistration { public static class DependencyRegistration @@ -9,7 +11,7 @@ public static IServiceCollection AddPresentationServices(this IServiceCollection builder.Services.AddSwagger(); services.AddHttpContextAccessor(); services.AddSerilogUI(builder.Configuration); - services.AddMvcWithAuthPolicy(); + services.AddAuthPolicy(); services.AddHealthChecks(); services.AddCors(options => options.AddPolicy("CORS", @@ -23,6 +25,11 @@ public static IServiceCollection AddPresentationServices(this IServiceCollection } })); + services.AddMvc(options => + { + options.Filters.Add(new AuthorizeFilter()); + }); + return services; } } diff --git a/src/Presentation.Server/DependencyRegistration/Mvc.cs b/src/Presentation.Server/DependencyRegistration/Mvc.cs deleted file mode 100644 index e45289a..0000000 --- a/src/Presentation.Server/DependencyRegistration/Mvc.cs +++ /dev/null @@ -1,41 +0,0 @@ -using Microsoft.AspNetCore.Mvc.Authorization; -using static Domain.Common.Enums; - -namespace Presentation.DependencyRegistration -{ - internal static class Mvc - { - internal static void AddMvcWithAuthPolicy(this IServiceCollection services) - { - services.AddAuthorizationBuilder() - .AddPolicy(AuthPolicy.AllRoles, policy => policy.RequireAssertion(context => - { - return context.User.IsInRole(RoleName.SuperAdmin.ToString()) || - context.User.IsInRole(RoleName.CompanyAdmin.ToString()) || - context.User.IsInRole(RoleName.Employee.ToString()); - })) - .AddPolicy(AuthPolicy.SuperAdmin, policy => policy.RequireAssertion(context => - { - return context.User.IsInRole(RoleName.SuperAdmin.ToString()); - })) - .AddPolicy(AuthPolicy.CompanyAdmin, policy => policy.RequireAssertion(context => - { - return context.User.IsInRole(RoleName.CompanyAdmin.ToString()); - })) - .AddPolicy(AuthPolicy.CompanyAdminOrEmployee, policy => policy.RequireAssertion(context => - { - return context.User.IsInRole(RoleName.CompanyAdmin.ToString()) || - context.User.IsInRole(RoleName.Employee.ToString()); - })) - .AddPolicy(AuthPolicy.Employee, policy => policy.RequireAssertion(context => - { - return context.User.IsInRole(RoleName.Employee.ToString()); - })); - - services.AddMvc(options => - { - options.Filters.Add(new AuthorizeFilter()); - }); - } - } -} diff --git a/src/Presentation.Server/DependencyRegistration/SerilogUI.cs b/src/Presentation.Server/DependencyRegistration/SerilogUI.cs index 59b5f1a..4762876 100644 --- a/src/Presentation.Server/DependencyRegistration/SerilogUI.cs +++ b/src/Presentation.Server/DependencyRegistration/SerilogUI.cs @@ -1,4 +1,3 @@ -using Serilog; using Serilog.Ui.Core.Extensions; using Serilog.Ui.PostgreSqlProvider.Extensions; using Serilog.Ui.Web.Extensions; @@ -11,11 +10,16 @@ internal static void AddSerilogUI(this IServiceCollection services, IConfigurati { services.AddSerilog(); - var logTable = configuration.GetValue("Serilog:WriteTo:0:Args:tableName")!; - var connectionString = configuration.GetValue("Serilog:WriteTo:0:Args:connectionString")!; - services.AddSerilogUi(options => - options.UseNpgSql(options => options.WithConnectionString(connectionString).WithTable(logTable))); + { + var logTable = configuration.GetValue("Serilog:WriteTo:0:Args:tableName")!; + var connectionString = configuration.GetValue("Serilog:WriteTo:0:Args:connectionString")!; + + options.UseNpgSql(options => options.WithConnectionString(connectionString) + .WithTable(logTable)) + .AddScopedBasicAuthFilter(); + }) + .AddControllersWithViews(); } } } diff --git a/src/Presentation.Server/DependencyRegistration/Swagger.cs b/src/Presentation.Server/DependencyRegistration/Swagger.cs index 13a9b80..7c5cdaa 100644 --- a/src/Presentation.Server/DependencyRegistration/Swagger.cs +++ b/src/Presentation.Server/DependencyRegistration/Swagger.cs @@ -27,12 +27,12 @@ public static void AddSwagger(this IServiceCollection services) options.SwaggerDoc("v1", new OpenApiInfo { Version = "v1", - Title = "Bit Xplorer HR", - Description = "Rest API for accessing CAB Portal data", + Title = "BIT-HRMS", + Description = "Rest API for accessing BIT-HRMS data", TermsOfService = new Uri(EXAMPLE_DOT_COM), Contact = new OpenApiContact { - Name = "Rawae API", + Name = "BIT-HRMS API", Url = new Uri(EXAMPLE_DOT_COM) }, }); diff --git a/src/Presentation.Server/Middleware/Middleware.cs b/src/Presentation.Server/Middleware/Middleware.cs index fe9a261..05f6d6f 100644 --- a/src/Presentation.Server/Middleware/Middleware.cs +++ b/src/Presentation.Server/Middleware/Middleware.cs @@ -26,7 +26,12 @@ public static void ConfigureMiddleware(this WebApplication app) app.UseAuthentication(); app.UseAuthorization(); - app.UseSerilogUi(); + + app.UseSerilogUi(options => + { + options.WithAuthenticationType(Serilog.Ui.Web.Models.AuthenticationType.Basic) + .WithExpandedDropdownsByDefault(); + }); app.MapControllers(); app.MapFallbackToFile("/index.html"); app.UseHealthChecks("/health"); From 1801cb7653b7aeb2614fa45446c30306633a0675 Mon Sep 17 00:00:00 2001 From: dev-javid Date: Sun, 22 Sep 2024 13:46:19 +0530 Subject: [PATCH 4/7] Update Middleware.cs --- src/Presentation.Server/Middleware/Middleware.cs | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/Presentation.Server/Middleware/Middleware.cs b/src/Presentation.Server/Middleware/Middleware.cs index 05f6d6f..97a619f 100644 --- a/src/Presentation.Server/Middleware/Middleware.cs +++ b/src/Presentation.Server/Middleware/Middleware.cs @@ -19,11 +19,6 @@ public static void ConfigureMiddleware(this WebApplication app) app.UseSwaggerUI(); } - if (!app.Environment.IsDevelopment()) - { - app.UseHttpsRedirection(); - } - app.UseAuthentication(); app.UseAuthorization(); From 7350188268665190b67f8f3d5a1213c2bf704fca Mon Sep 17 00:00:00 2001 From: dev-javid Date: Sun, 22 Sep 2024 14:57:01 +0530 Subject: [PATCH 5/7] Update Middleware.cs --- src/Presentation.Server/Middleware/Middleware.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Presentation.Server/Middleware/Middleware.cs b/src/Presentation.Server/Middleware/Middleware.cs index 97a619f..2edb455 100644 --- a/src/Presentation.Server/Middleware/Middleware.cs +++ b/src/Presentation.Server/Middleware/Middleware.cs @@ -19,6 +19,7 @@ public static void ConfigureMiddleware(this WebApplication app) app.UseSwaggerUI(); } + app.UseHttpsRedirection(); app.UseAuthentication(); app.UseAuthorization(); From bb8687e5d9a756945468f5acabdbdc8707aaca12 Mon Sep 17 00:00:00 2001 From: dev-javid Date: Mon, 23 Sep 2024 09:36:02 +0530 Subject: [PATCH 6/7] Update deploy.yml --- .github/workflows/deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 2b072b9..657f824 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -3,7 +3,7 @@ name: Deployment on: push: branches: - - feature/user + - main jobs: Deployment: From c220533de8c4b2fed8c593fc0b4e5782e46bd109 Mon Sep 17 00:00:00 2001 From: dev-javid Date: Mon, 23 Sep 2024 10:45:12 +0530 Subject: [PATCH 7/7] Update Presentation.csproj --- src/Presentation.Server/Presentation.csproj | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Presentation.Server/Presentation.csproj b/src/Presentation.Server/Presentation.csproj index 3afc1ae..1b63a86 100644 --- a/src/Presentation.Server/Presentation.csproj +++ b/src/Presentation.Server/Presentation.csproj @@ -46,4 +46,8 @@ + + + +