Refactor DTOs and namespaces for maintainability
Consolidated DTOs under `DocumentService.Application.Common.DTOs.Requests` to centralize and align them with the application layer. Introduced `PdfBase64RequestBase` to encapsulate shared properties, reducing redundancy across request DTOs. Updated controllers, clients, and tests to use the new DTO structure. Removed redundant DTOs and cleaned up unused namespaces and comments. Improved documentation and ensured consistent naming conventions across the codebase.
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
using DocumentService.Application.Common.DTOs;
|
||||
using DocumentService.Client.Clients;
|
||||
using DocumentService.Client.Interfaces;
|
||||
using DocumentService.Client.Models.Requests;
|
||||
using DocumentService.Application.Common.DTOs.Requests;
|
||||
using FluentAssertions;
|
||||
using Microsoft.Extensions.Logging.Abstractions;
|
||||
using System.IO.Compression;
|
||||
@@ -14,7 +14,7 @@ namespace DocumentService.Tests.Unit.Client;
|
||||
|
||||
/// <summary>
|
||||
/// Unit tests for <see cref="PdfAttachmentClient"/>.
|
||||
/// All tests use a fake <see cref="MockHttpMessageHandler"/> — no real HTTP calls are made.
|
||||
/// All tests use a fake <see cref="MockHttpMessageHandler"/> <EFBFBD> no real HTTP calls are made.
|
||||
/// </summary>
|
||||
public class PdfAttachmentClientTests
|
||||
{
|
||||
@@ -118,7 +118,7 @@ public class PdfAttachmentClientTests
|
||||
doc.RootElement.GetProperty("base64Pdf").GetString().Should().NotBeNullOrEmpty();
|
||||
}
|
||||
|
||||
// ?? ExtractAttachmentsAsync (Stream) — ZIP unzip ?????????????????????????
|
||||
// ?? ExtractAttachmentsAsync (Stream) <EFBFBD> ZIP unzip ?????????????????????????
|
||||
|
||||
[Fact]
|
||||
public async Task ExtractAttachmentsAsync_Stream_UnzipsAndReturnsDictionary()
|
||||
@@ -169,7 +169,7 @@ public class PdfAttachmentClientTests
|
||||
foreach (var s in result.Values) s.Dispose();
|
||||
}
|
||||
|
||||
// ?? ExtractAttachmentsAsync (byte[]) — ZIP unzip ?????????????????????????
|
||||
// ?? ExtractAttachmentsAsync (byte[]) <EFBFBD> ZIP unzip ?????????????????????????
|
||||
|
||||
[Fact]
|
||||
public async Task ExtractAttachmentsAsync_Bytes_SendsJsonAndUnzips()
|
||||
|
||||
Reference in New Issue
Block a user