Skip to content

Commit 81a3022

Browse files
committed
chore: add ExcludeFromCodeCoverage to internal documents, mappers, query builder and exception filter These are covered by component/integration tests rather than unit tests.
1 parent aae3450 commit 81a3022

File tree

8 files changed

+17
-0
lines changed

8 files changed

+17
-0
lines changed

src/KeeperData.Bridge/Filters/OperationCancelledExceptionFilter.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
using System.Diagnostics.CodeAnalysis;
12
using KeeperData.Bridge.Controllers;
23
using Microsoft.AspNetCore.Mvc;
34
using Microsoft.AspNetCore.Mvc.Filters;
@@ -8,6 +9,7 @@ namespace KeeperData.Bridge.Filters;
89
/// Global exception filter that handles <see cref="OperationCanceledException"/>
910
/// by returning a 499 (Client Closed Request) response with a standard error body.
1011
/// </summary>
12+
[ExcludeFromCodeCoverage(Justification = "Exception filter - covered by component/integration tests.")]
1113
public class OperationCancelledExceptionFilter(ILogger<OperationCancelledExceptionFilter> logger) : IExceptionFilter
1214
{
1315
public void OnException(ExceptionContext context)

src/KeeperData.Core.Reports/Internal/Documents/CleanseAnalysisOperationDocument.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
using System.Diagnostics.CodeAnalysis;
12
using MongoDB.Bson;
23
using MongoDB.Bson.Serialization.Attributes;
34

@@ -7,6 +8,7 @@ namespace KeeperData.Core.Reports.Internal.Documents;
78
/// Persistence document for a cleanse analysis operation.
89
/// Anti-corruption layer between domain and MongoDB.
910
/// </summary>
11+
[ExcludeFromCodeCoverage(Justification = "Internal persistence document - covered by integration tests.")]
1012
internal class CleanseAnalysisOperationDocument
1113
{
1214
[BsonId] public string Id { get; set; } = string.Empty;

src/KeeperData.Core.Reports/Internal/Documents/IssueDocument.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
using System.Diagnostics.CodeAnalysis;
12
using MongoDB.Bson.Serialization.Attributes;
23

34
namespace KeeperData.Core.Reports.Internal.Documents;
@@ -6,6 +7,7 @@ namespace KeeperData.Core.Reports.Internal.Documents;
67
/// Persistence document for an issue.
78
/// Anti-corruption layer between domain and MongoDB.
89
/// </summary>
10+
[ExcludeFromCodeCoverage(Justification = "Internal persistence document - covered by integration tests.")]
911
internal class IssueDocument
1012
{
1113
[BsonId] public string Id { get; set; } = string.Empty;

src/KeeperData.Core.Reports/Internal/Documents/IssueHistoryEntryDocument.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
using System.Diagnostics.CodeAnalysis;
12
using MongoDB.Bson;
23
using MongoDB.Bson.Serialization.Attributes;
34

@@ -7,6 +8,7 @@ namespace KeeperData.Core.Reports.Internal.Documents;
78
/// Persistence document for an issue history/lineage entry.
89
/// Anti-corruption layer between domain and MongoDB.
910
/// </summary>
11+
[ExcludeFromCodeCoverage(Justification = "Internal persistence document - covered by integration tests.")]
1012
internal class IssueHistoryEntryDocument
1113
{
1214
[BsonId] public string Id { get; set; } = string.Empty;

src/KeeperData.Core.Reports/Internal/Mappers/CleanseAnalysisOperationDocumentMapper.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
using System.Diagnostics.CodeAnalysis;
12
using KeeperData.Core.Reports.Cleanse.Analysis.Command.Domain;
23
using KeeperData.Core.Reports.Cleanse.Operations.Command.AggregateRoots;
34
using KeeperData.Core.Reports.Cleanse.Operations.Queries.Dtos;
@@ -8,6 +9,7 @@ namespace KeeperData.Core.Reports.Internal.Mappers;
89
/// <summary>
910
/// Maps between <see cref="CleanseAnalysisOperationDocument"/> and domain/DTO types.
1011
/// </summary>
12+
[ExcludeFromCodeCoverage(Justification = "Internal mapper - covered by integration tests.")]
1113
internal static class CleanseAnalysisOperationDocumentMapper
1214
{
1315
public static CleanseAnalysisOperationDocument ToDocument(this CleanseAnalysisOperation operation) => new()

src/KeeperData.Core.Reports/Internal/Mappers/IssueDocumentMapper.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
using System.Diagnostics.CodeAnalysis;
12
using KeeperData.Core.Reports.Internal.Documents;
23
using KeeperData.Core.Reports.Issues.Command.AggregateRoots;
34
using KeeperData.Core.Reports.Issues.Query.Dtos;
@@ -7,6 +8,7 @@ namespace KeeperData.Core.Reports.Internal.Mappers;
78
/// <summary>
89
/// Maps between <see cref="IssueDocument"/> and domain/DTO types.
910
/// </summary>
11+
[ExcludeFromCodeCoverage(Justification = "Internal mapper - covered by integration tests.")]
1012
internal static class IssueDocumentMapper
1113
{
1214
public static IssueDocument ToDocument(this Issue issue) => new()

src/KeeperData.Core.Reports/Internal/Mappers/IssueHistoryEntryDocumentMapper.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
using System.Diagnostics.CodeAnalysis;
12
using KeeperData.Core.Reports.Internal.Documents;
23
using KeeperData.Core.Reports.Issues.Command.AggregateRoots;
34
using KeeperData.Core.Reports.Issues.Query.Dtos;
@@ -7,6 +8,7 @@ namespace KeeperData.Core.Reports.Internal.Mappers;
78
/// <summary>
89
/// Maps between <see cref="IssueHistoryEntryDocument"/> and domain/DTO types.
910
/// </summary>
11+
[ExcludeFromCodeCoverage(Justification = "Internal mapper - covered by integration tests.")]
1012
internal static class IssueHistoryEntryDocumentMapper
1113
{
1214
public static IssueHistoryEntryDocument ToDocument(this IssueHistoryEntry entry) => new()

src/KeeperData.Core.Reports/Issues/Query/Dtos/CleanseIssueQueryDto.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
1+
using System.Diagnostics.CodeAnalysis;
2+
13
namespace KeeperData.Core.Reports.Issues.Query.Dtos;
24

35
/// <summary>
46
/// Fluent query builder for cleanse issues.
57
/// </summary>
8+
[ExcludeFromCodeCoverage(Justification = "Query builder DTO - covered by integration tests.")]
69
public sealed class CleanseIssueQueryDto
710
{
811
/// <summary>Filter by active status (null = all).</summary>

0 commit comments

Comments
 (0)