Skip to content
This repository has been archived by the owner on Oct 14, 2022. It is now read-only.

refactor: shared files #12

Merged
merged 5 commits into from
Jun 11, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions WAW.API.Tests/Drivers/Driver.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
using System;
namespace WAW.API.Tests.Drivers;

namespace WAW.API.Tests.Drivers {
public class Driver {}
}
public class Driver {}
49 changes: 0 additions & 49 deletions WAW.API.Tests/Features/Forecast.feature

This file was deleted.

81 changes: 0 additions & 81 deletions WAW.API.Tests/Hooks/ForecastHooks.cs

This file was deleted.

80 changes: 0 additions & 80 deletions WAW.API.Tests/Steps/ForecastStepDefinitions.cs

This file was deleted.

6 changes: 6 additions & 0 deletions WAW.API.Tests/WAW.API.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,10 @@
<ProjectReference Include="..\WAW.API\WAW.API.csproj" />
</ItemGroup>

<ItemGroup>
<Folder Include="Features" />
<Folder Include="Hooks" />
<Folder Include="Steps" />
</ItemGroup>

</Project>
12 changes: 12 additions & 0 deletions WAW.API/Auth/Injection/AuthInjections.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
using WAW.API.Auth.Domain.Repositories;
using WAW.API.Auth.Domain.Services;
using WAW.API.Auth.Persistence.Repositories;

namespace WAW.API.Auth.Injection;

public static class AuthInjections {
public static void Register(IServiceCollection services) {
services.AddScoped<IUserRepository, UserRepository>();
services.AddScoped<IUserService, IUserService>();
}
}
11 changes: 11 additions & 0 deletions WAW.API/Auth/Mapping/AuthModelToResourceProfile.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
using AutoMapper;
using WAW.API.Auth.Domain.Models;
using WAW.API.Auth.Resources;

namespace WAW.API.Auth.Mapping;

public static class AuthModelToResourceProfile {
public static void Register(IProfileExpression profile) {
profile.CreateMap<User, UserResource>();
}
}
11 changes: 11 additions & 0 deletions WAW.API/Auth/Mapping/AuthResourceToModelProfile.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
using AutoMapper;
using WAW.API.Auth.Domain.Models;
using WAW.API.Auth.Resources;

namespace WAW.API.Auth.Mapping;

public static class AuthResourceToModelProfile {
public static void Register(IProfileExpression profile) {
profile.CreateMap<UserRequest, User>();
}
}
11 changes: 0 additions & 11 deletions WAW.API/Auth/Mapping/ModelToResourceProfile.cs

This file was deleted.

11 changes: 0 additions & 11 deletions WAW.API/Auth/Mapping/ResourceToModelProfile.cs

This file was deleted.

4 changes: 2 additions & 2 deletions WAW.API/Auth/Persistence/Repositories/UserRepository.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
using Microsoft.EntityFrameworkCore;
using WAW.API.Auth.Domain.Models;
using WAW.API.Auth.Domain.Repositories;
using WAW.API.Weather.Persistence.Contexts;
using WAW.API.Weather.Persistence.Repositories;
using WAW.API.Shared.Persistence.Contexts;
using WAW.API.Shared.Persistence.Repositories;

namespace WAW.API.Auth.Persistence.Repositories;

Expand Down
2 changes: 1 addition & 1 deletion WAW.API/Auth/Services/UserService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
using WAW.API.Auth.Domain.Repositories;
using WAW.API.Auth.Domain.Services;
using WAW.API.Auth.Domain.Services.Communication;
using WAW.API.Weather.Domain.Repositories;
using WAW.API.Shared.Domain.Repositories;

namespace WAW.API.Auth.Services;

Expand Down
13 changes: 13 additions & 0 deletions WAW.API/Company/Injection/CompanyInjections.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
using WAW.API.Company.Domain.Repositories;
using WAW.API.Company.Domain.Services;
using WAW.API.Company.Persistence.Repositories;
using WAW.API.Company.Services;

namespace WAW.API.Company.Injection;

public static class CompanyInjections {
public static void Register(IServiceCollection services) {
services.AddScoped<ICompanyRepository, CompanyRepository>();
services.AddScoped<ICompanyService, CompanyService>();
}
}
12 changes: 12 additions & 0 deletions WAW.API/Company/Mapping/CompanyModelToResourceProfile.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
using AutoMapper;
using WAW.API.Company.Resources;

namespace WAW.API.Company.Mapping;

using Domain.Models;

public static class CompanyModelToResourceProfile {
public static void Register(IProfileExpression profile) {
profile.CreateMap<Company, CompanyResource>();
}
}
12 changes: 12 additions & 0 deletions WAW.API/Company/Mapping/CompanyResourceToModelProfile.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
using AutoMapper;
using WAW.API.Company.Resources;

namespace WAW.API.Company.Mapping;

using Domain.Models;

public static class CompanyResourceToModelProfile {
public static void Register(IProfileExpression profile) {
profile.CreateMap<CompanyRequest, Company>();
}
}
12 changes: 0 additions & 12 deletions WAW.API/Company/Mapping/ModelToResourceProfile.cs

This file was deleted.

12 changes: 0 additions & 12 deletions WAW.API/Company/Mapping/ResourceToModelProfile.cs

This file was deleted.

4 changes: 2 additions & 2 deletions WAW.API/Company/Persistence/Repositories/CompanyRepository.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using Microsoft.EntityFrameworkCore;
using WAW.API.Company.Domain.Repositories;
using WAW.API.Weather.Persistence.Contexts;
using WAW.API.Weather.Persistence.Repositories;
using WAW.API.Shared.Persistence.Contexts;
using WAW.API.Shared.Persistence.Repositories;

namespace WAW.API.Company.Persistence.Repositories;

Expand Down
2 changes: 1 addition & 1 deletion WAW.API/Company/Services/CompanyService.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using WAW.API.Company.Domain.Repositories;
using WAW.API.Company.Domain.Services;
using WAW.API.Company.Domain.Services.Communication;
using WAW.API.Weather.Domain.Repositories;
using WAW.API.Shared.Domain.Repositories;

namespace WAW.API.Company.Services;

Expand Down
Loading