Skip to content
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
32 changes: 32 additions & 0 deletions src/Directory.Packages.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<Project>
<PropertyGroup>
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
</PropertyGroup>
<ItemGroup>
<PackageVersion Include="Microsoft.AspNetCore.OpenApi" Version="10.0.0" />
<PackageVersion Include="Newtonsoft.Json" Version="13.0.4" />
<PackageVersion Include="SmallApiToolkit" Version="10.0.0" />
<PackageVersion Include="Swashbuckle.AspNetCore" Version="10.0.1" />
<PackageVersion Include="Ardalis.GuardClauses" Version="5.0.0" />
<PackageVersion Include="Mapster" Version="7.4.0" />
<PackageVersion Include="Microsoft.Extensions.Configuration.Abstractions" Version="10.0.0" />
<PackageVersion Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="10.0.0" />
<PackageVersion Include="Microsoft.Extensions.Options" Version="10.0.0" />
<PackageVersion Include="Microsoft.Extensions.Options.ConfigurationExtensions" Version="10.0.0" />
<PackageVersion Include="SmallApiToolkit.Core" Version="10.0.0" />
<PackageVersion Include="Validot" Version="2.6.0" />
<PackageVersion Include="FluentResults" Version="3.16.0" />
<PackageVersion Include="ChoETL.Yaml" Version="1.0.0.38" />
<PackageVersion Include="Mapster" Version="7.4.0" />
<PackageVersion Include="Microsoft.EntityFrameworkCore.InMemory" Version="10.0.0" />
<PackageVersion Include="Newtonsoft.Json" Version="13.0.4" />
<PackageVersion Include="YamlDotNet" Version="16.3.0" />
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="18.0.1" />
<PackageVersion Include="xunit" Version="2.9.3" />
<PackageVersion Include="xunit.runner.visualstudio" Version="3.1.5"/>
<PackageVersion Include="coverlet.collector" Version="6.0.4"/>
<PackageVersion Include="Microsoft.AspNetCore.Mvc.Testing" Version="10.0.0" />
<PackageVersion Include="Moq" Version="4.20.72" />
<PackageVersion Include="Microsoft.Extensions.Logging.Abstractions" Version="10.0.0"/>
</ItemGroup>
</Project>
2 changes: 1 addition & 1 deletion src/File.API/EndpointBuilders/FileEndpointsBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public static IEndpointRouteBuilder BuildFileEndpoints(this IEndpointRouteBuilde
{
return endpointRouteBuilder
.MapVersionGroup(1)
.MapGroup("files")
.MapGroup("file")
.BuildUploadEndpoints()
.BuildDownloadEndpoints()
.BuildGetEndpoints()
Expand Down
10 changes: 5 additions & 5 deletions src/File.API/File.API.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Ardalis.GuardClauses" Version="5.0.0" />
<PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="10.0.0" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.4" />
<PackageReference Include="SmallApiToolkit" Version="10.0.0" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="10.0.1" />
<PackageReference Include="Ardalis.GuardClauses" />
<PackageReference Include="Microsoft.AspNetCore.OpenApi" />
<PackageReference Include="Newtonsoft.Json" />
<PackageReference Include="SmallApiToolkit" />
<PackageReference Include="Swashbuckle.AspNetCore" />
</ItemGroup>

<ItemGroup>
Expand Down
16 changes: 8 additions & 8 deletions src/File.Core/File.Core.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Ardalis.GuardClauses" Version="5.0.0" />
<PackageReference Include="Mapster" Version="7.4.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.Abstractions" Version="10.0.0" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="10.0.0" />
<PackageReference Include="Microsoft.Extensions.Options" Version="10.0.0" />
<PackageReference Include="Microsoft.Extensions.Options.ConfigurationExtensions" Version="10.0.0" />
<PackageReference Include="SmallApiToolkit.Core" Version="10.0.0" />
<PackageReference Include="Validot" Version="2.6.0" />
<PackageReference Include="Ardalis.GuardClauses" />
<PackageReference Include="Mapster"/>
<PackageReference Include="Microsoft.Extensions.Configuration.Abstractions" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" />
<PackageReference Include="Microsoft.Extensions.Options" />
<PackageReference Include="Microsoft.Extensions.Options.ConfigurationExtensions" />
<PackageReference Include="SmallApiToolkit.Core" />
<PackageReference Include="Validot" />
</ItemGroup>

<ItemGroup>
Expand Down
4 changes: 2 additions & 2 deletions src/File.Domain/File.Domain.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="FluentResults" Version="3.16.0" />
<PackageReference Include="SmallApiToolkit.Core" Version="10.0.0" />
<PackageReference Include="FluentResults" />
<PackageReference Include="SmallApiToolkit.Core" />
</ItemGroup>

</Project>
14 changes: 7 additions & 7 deletions src/File.Infrastructure/File.Infrastructure.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Ardalis.GuardClauses" Version="5.0.0" />
<PackageReference Include="ChoETL.Yaml" Version="1.0.0.38" />
<PackageReference Include="Mapster" Version="7.4.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.InMemory" Version="10.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.Abstractions" Version="10.0.0" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.4" />
<PackageReference Include="YamlDotNet" Version="16.3.0" />
<PackageReference Include="Ardalis.GuardClauses" />
<PackageReference Include="ChoETL.Yaml" />
<PackageReference Include="Mapster" />
<PackageReference Include="Microsoft.EntityFrameworkCore.InMemory" />
<PackageReference Include="Microsoft.Extensions.Configuration.Abstractions" />
<PackageReference Include="Newtonsoft.Json" />
<PackageReference Include="YamlDotNet" />
</ItemGroup>

<ItemGroup>
Expand Down
113 changes: 0 additions & 113 deletions src/FileSol.sln

This file was deleted.

27 changes: 27 additions & 0 deletions src/FileSol.slnx
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<Solution>
<Folder Name="/Solution Items/">
<File Path="Directory.Packages.props" />
</Folder>
<Folder Name="/Tests/" />
<Folder Name="/Tests/IntegrationTests/">
<Project Path="Tests/IntegrationTests/File.Infrastructure.IntegrationTests/File.Infrastructure.IntegrationTests.csproj" />
</Folder>
<Folder Name="/Tests/SystemTests/">
<Project Path="Tests/SystemTests/File.API.SystemTests/File.API.SystemTests.csproj" />
</Folder>
<Folder Name="/Tests/UnitTests/">
<Project Path="Tests/UnitTests/File.API.UnitTests/File.API.UnitTests.csproj" />
<Project Path="Tests/UnitTests/File.Core.UnitTests/File.Core.UnitTests.csproj" />
<Project Path="Tests/UnitTests/File.Domain.UnitTests/File.Domain.UnitTests.csproj" />
<Project Path="Tests/UnitTests/File.Infrastructure.UnitTests/File.Infrastructure.UnitTests.csproj" />
<Project Path="Tests/UnitTests/File.UnitTests.Common/File.UnitTests.Common.csproj" />
</Folder>
<Project Path="File.API/File.API.csproj" />
<Project Path="File.Core/File.Core.csproj" />
<Project Path="File.Domain/File.Domain.csproj" />
<Project Path="File.Frontend/File.Frontend.esproj">
<Build />
<Deploy />
</Project>
<Project Path="File.Infrastructure/File.Infrastructure.csproj" />
</Solution>
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="18.0.1" />
<PackageReference Include="xunit" Version="2.9.3" />
<PackageReference Include="xunit.runner.visualstudio" Version="3.1.5">
<PackageReference Include="Microsoft.NET.Test.Sdk"/>
<PackageReference Include="xunit" />
<PackageReference Include="xunit.runner.visualstudio">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="coverlet.collector" Version="6.0.4">
<PackageReference Include="coverlet.collector">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ internal static class HttpClientExtensions
public static async Task<HttpResponseMessage> UploadAssetsFile(this HttpClient httpClient, string fileName)
{
using var content = new MultipartFormDataContent().AddFileFromAssets(fileName);
return await httpClient.PostAsync("file/v1/upload", content);
return await httpClient.PostAsync("v1/file/upload", content);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="10.0.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="18.0.1" />
<PackageReference Include="xunit" Version="2.9.3" />
<PackageReference Include="xunit.runner.visualstudio" Version="3.1.5">
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" />
<PackageReference Include="Microsoft.NET.Test.Sdk" />
<PackageReference Include="xunit"/>
<PackageReference Include="xunit.runner.visualstudio">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="coverlet.collector" Version="6.0.4">
<PackageReference Include="coverlet.collector">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ public async Task ConvertFileAsync_ToXml()
using var content = new MultipartFormDataContent().AddFileFromAssets("new.json");

//Act
using var response = await _httpClient.PostAsync("file/v1/convert?formatToExport=xml", content);
using var response = await _httpClient.PostAsync("v1/file/convert?formatToExport=xml", content);
using var stream = await response.Content.ReadAsStreamAsync();

//Assert
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public async Task DownloadFileAsync()
using var uploadResponse = (await _httpClient.UploadAssetsFile("new.json"))
.EnsureSuccessStatusCode();

using var fileInfo = await _httpClient.GetAsync("file/v1/files-info");
using var fileInfo = await _httpClient.GetAsync("v1/file");
var fileToDownload = (await fileInfo.GetResponseData<DataResponse<IEnumerable<FileInfoDto>>>())?.Data?.First();

if(fileToDownload is null)
Expand All @@ -24,7 +24,7 @@ public async Task DownloadFileAsync()
}

//Act
using var response = await _httpClient.GetAsync($"file/v1/download/?id={fileToDownload.Id}");
using var response = await _httpClient.GetAsync($"v1/file/{fileToDownload.Id}/download");
using var stream = await response.Content.ReadAsStreamAsync();

//Assert
Expand All @@ -38,7 +38,7 @@ public async Task DownloadJsonFileAsync()
using var uploadResponse = (await _httpClient.UploadAssetsFile("new.json"))
.EnsureSuccessStatusCode();

using var fileInfo = await _httpClient.GetAsync("file/v1/files-info");
using var fileInfo = await _httpClient.GetAsync("v1/file");
var fileToDownload = (await fileInfo.GetResponseData<DataResponse<IEnumerable<FileInfoDto>>>())?.Data?.First();

if (fileToDownload is null)
Expand All @@ -47,7 +47,7 @@ public async Task DownloadJsonFileAsync()
}

//Act
using var response = await _httpClient.GetAsync($"file/v1/downloadAsJson/?id={fileToDownload.Id}");
using var response = await _httpClient.GetAsync($"v1/file/{fileToDownload.Id}/download/json");
var responseFile = await response.Content.ReadFromJsonAsync<DataResponse<StringContentFileDto>>();

//Assert
Expand Down
Loading
Loading