-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/main'
- Loading branch information
Showing
179 changed files
with
1,467 additions
and
1,540 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 13 additions & 21 deletions
34
RelationAnalysis.Migrations/RelationAnalysis.Migrations.csproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,23 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<OutputType>Exe</OutputType> | ||
<TargetFramework>net8.0</TargetFramework> | ||
<ImplicitUsings>enable</ImplicitUsings> | ||
<Nullable>enable</Nullable> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="Dotenv" Version="0.0.1.1" /> | ||
<PackageReference Include="DotNetEnv" Version="3.1.0" /> | ||
<PackageReference Include="Microsoft.Extensions.Configuration" Version="8.0.0" /> | ||
<PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="8.0.2" /> | ||
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="8.0.0" /> | ||
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="8.0.0" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<Reference Include="Microsoft.AspNetCore.Hosting"> | ||
<HintPath>..\..\..\..\..\..\usr\share\dotnet\shared\Microsoft.AspNetCore.App\8.0.8\Microsoft.AspNetCore.Hosting.dll</HintPath> | ||
</Reference> | ||
<Reference Include="Microsoft.Extensions.Configuration"> | ||
<HintPath>..\..\..\..\..\..\usr\share\dotnet\shared\Microsoft.AspNetCore.App\8.0.8\Microsoft.Extensions.Configuration.dll</HintPath> | ||
</Reference> | ||
<ItemGroup> | ||
<PackageReference Include="Dotenv" Version="0.0.1.1"/> | ||
<PackageReference Include="DotNetEnv" Version="3.1.0"/> | ||
<PackageReference Include="Microsoft.Extensions.Configuration" Version="8.0.0"/> | ||
<PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="8.0.2"/> | ||
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="8.0.0"/> | ||
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="8.0.0"/> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<PackageReference Include="Microsoft.AspNetCore.Hosting" Version="2.2.7"/> | ||
<PackageReference Include="Microsoft.Extensions.Configuration" Version="8.0.8"/> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<ProjectReference Include="..\RelationshipAnalysis\RelationshipAnalysis.csproj" /> | ||
<ProjectReference Include="..\RelationshipAnalysis\RelationshipAnalysis.csproj"/> | ||
</ItemGroup> | ||
</Project> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,7 @@ | |
using System.Net.Http.Json; | ||
using System.Text; | ||
using System.Text.Json; | ||
using Microsoft.Extensions.Options; | ||
using RelationshipAnalysis.Dto; | ||
using RelationshipAnalysis.Dto.Panel.Admin; | ||
using RelationshipAnalysis.Dto.Panel.User; | ||
|
@@ -37,10 +38,10 @@ private string GenerateAdminJwtToken() | |
FirstName = "Admin", | ||
LastName = "User", | ||
Email = "[email protected]", | ||
UserRoles = new List<UserRole> { new UserRole { Role = new Role { Name = "Admin" } } } | ||
UserRoles = new List<UserRole> { new() { Role = new Role { Name = "Admin" } } } | ||
}; | ||
|
||
return new JwtTokenGenerator(new Microsoft.Extensions.Options.OptionsWrapper<JwtSettings>(jwtSettings)) | ||
return new JwtTokenGenerator(new OptionsWrapper<JwtSettings>(jwtSettings)) | ||
.GenerateJwtToken(user); | ||
} | ||
|
||
|
@@ -92,7 +93,6 @@ public async Task GetAllUsers_ShouldReturnUsers_WhenAdminIsAuthorized() | |
Assert.NotNull(responseData); | ||
Assert.True(responseData.AllUserCount > 0); | ||
Assert.True(responseData.Users.Count > 0); | ||
|
||
} | ||
|
||
[Fact] | ||
|
@@ -126,7 +126,7 @@ public async Task CreateUser_ShouldReturnSuccess_WhenAdminIsAuthorized() | |
FirstName = "New", | ||
LastName = "User", | ||
Email = "[email protected]", | ||
Roles = [ "Admin" ] | ||
Roles = ["Admin"] | ||
}; | ||
|
||
var request = new HttpRequestMessage(HttpMethod.Post, "/api/admin/users"); | ||
|
@@ -160,7 +160,7 @@ public async Task CreateUser_ShouldReturnBadRequest_WhenUsernameIsNotUnique() | |
FirstName = "Existing", | ||
LastName = "User", | ||
Email = "[email protected]", | ||
Roles = [ "Admin" ] | ||
Roles = ["Admin"] | ||
}; | ||
|
||
var request = new HttpRequestMessage(HttpMethod.Post, "/api/admin/users"); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,7 @@ | |
using System.Net.Http.Json; | ||
using System.Text; | ||
using System.Text.Json; | ||
using Microsoft.Extensions.Options; | ||
using RelationshipAnalysis.Dto; | ||
using RelationshipAnalysis.Dto.Panel.User; | ||
using RelationshipAnalysis.Models.Auth; | ||
|
@@ -38,7 +39,7 @@ private string GenerateJwtToken() | |
Email = "[email protected]" | ||
}; | ||
|
||
return new JwtTokenGenerator(new Microsoft.Extensions.Options.OptionsWrapper<JwtSettings>(jwtSettings)).GenerateJwtToken(user); | ||
return new JwtTokenGenerator(new OptionsWrapper<JwtSettings>(jwtSettings)).GenerateJwtToken(user); | ||
} | ||
|
||
[Fact] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.